aboutsummaryrefslogtreecommitdiff
path: root/tools/xmpp_codec.spec
diff options
context:
space:
mode:
authorEvgeniy Khramtsov <ekhramtsov@process-one.net>2014-09-13 22:54:07 +0400
committerEvgeniy Khramtsov <ekhramtsov@process-one.net>2014-09-13 22:54:07 +0400
commit72fd353988ca5e1845d1456de24a63643be6c9ae (patch)
tree253a28a7eb597e924d1ad4ce8dc91498d52e560e /tools/xmpp_codec.spec
parentMerge pull request #298 from weiss/csi (diff)
Avoid generation of excessive records
Diffstat (limited to 'tools/xmpp_codec.spec')
-rw-r--r--tools/xmpp_codec.spec18
1 files changed, 11 insertions, 7 deletions
diff --git a/tools/xmpp_codec.spec b/tools/xmpp_codec.spec
index c5d9013ed..f8ed72af9 100644
--- a/tools/xmpp_codec.spec
+++ b/tools/xmpp_codec.spec
@@ -1757,30 +1757,32 @@
result = {shim, '$headers'},
refs = [#ref{name = shim_header, label = '$headers'}]}).
+-record(chatstate, {type :: active | composing | gone | inactive | paused}).
+
-xml(chatstate_active,
#elem{name = <<"active">>,
xmlns = <<"http://jabber.org/protocol/chatstates">>,
- result = {chatstate_active}}).
+ result = {chatstate, active}}).
-xml(chatstate_composing,
#elem{name = <<"composing">>,
xmlns = <<"http://jabber.org/protocol/chatstates">>,
- result = {chatstate_composing}}).
+ result = {chatstate, composing}}).
-xml(chatstate_gone,
#elem{name = <<"gone">>,
xmlns = <<"http://jabber.org/protocol/chatstates">>,
- result = {chatstate_gone}}).
+ result = {chatstate, gone}}).
-xml(chatstate_inactive,
#elem{name = <<"inactive">>,
xmlns = <<"http://jabber.org/protocol/chatstates">>,
- result = {chatstate_inactive}}).
+ result = {chatstate, inactive}}).
-xml(chatstate_paused,
#elem{name = <<"paused">>,
xmlns = <<"http://jabber.org/protocol/chatstates">>,
- result = {chatstate_paused}}).
+ result = {chatstate, paused}}).
-xml(delay,
#elem{name = <<"delay">>,
@@ -2101,15 +2103,17 @@
result = {feature_csi, '$xmlns'},
attrs = [#attr{name = <<"xmlns">>}]}).
+-record(csi, {type :: active | inactive}).
+
-xml(csi_active,
#elem{name = <<"active">>,
xmlns = <<"urn:xmpp:csi:0">>,
- result = {csi_active}}).
+ result = {csi, active}}).
-xml(csi_inactive,
#elem{name = <<"inactive">>,
xmlns = <<"urn:xmpp:csi:0">>,
- result = {csi_inactive}}).
+ result = {csi, inactive}}).
-xml(feature_sm,
#elem{name = <<"sm">>,