aboutsummaryrefslogtreecommitdiff
path: root/tools/xmpp_codec.spec
diff options
context:
space:
mode:
authorEvgeniy Khramtsov <ekhramtsov@process-one.net>2013-06-26 03:00:27 +1000
committerEvgeniy Khramtsov <ekhramtsov@process-one.net>2013-06-26 03:06:11 +1000
commitc05edabe58dfc7b2e1c2ee9bf66daf33b200b7bf (patch)
treeca3e51e6184f700abbf39d6d98509689cb7af966 /tools/xmpp_codec.spec
parentfix feature build on node disco#info (diff)
Add more pubsub test cases
Diffstat (limited to '')
-rw-r--r--tools/xmpp_codec.spec73
1 files changed, 68 insertions, 5 deletions
diff --git a/tools/xmpp_codec.spec b/tools/xmpp_codec.spec
index 5173dbd91..bf224780f 100644
--- a/tools/xmpp_codec.spec
+++ b/tools/xmpp_codec.spec
@@ -29,12 +29,15 @@
{version,
#elem{name = <<"query">>,
xmlns = <<"jabber:iq:version">>,
- result = {version, '$version_name', '$version_ver', '$version_os'},
+ result = {version, '$name', '$ver', '$os'},
refs = [#ref{name = version_name,
+ label = '$name',
min = 0, max = 1},
#ref{name = version_ver,
+ label = '$ver',
min = 0, max = 1},
#ref{name = version_os,
+ label = '$os',
min = 0, max = 1}]}}.
{roster_group,
@@ -174,11 +177,13 @@
{disco_identity,
#elem{name = <<"identity">>,
xmlns = <<"http://jabber.org/protocol/disco#info">>,
- result = {identity, '$category', '$type', '$name'},
+ result = {identity, '$category', '$type', '$lang', '$name'},
attrs = [#attr{name = <<"category">>,
required = true},
#attr{name = <<"type">>,
required = true},
+ #attr{name = <<"xml:lang">>,
+ label = '$lang'},
#attr{name = <<"name">>}]}}.
{disco_feature,
@@ -1665,8 +1670,19 @@
{pubsub_subscribe,
#elem{name = <<"subscribe">>,
xmlns = <<"http://jabber.org/protocol/pubsub">>,
- result = {'$node', '$jid'},
+ result = {pubsub_subscribe, '$node', '$jid'},
+ attrs = [#attr{name = <<"node">>},
+ #attr{name = <<"jid">>,
+ required = true,
+ dec = {dec_jid, []},
+ enc = {enc_jid, []}}]}}.
+
+{pubsub_unsubscribe,
+ #elem{name = <<"unsubscribe">>,
+ xmlns = <<"http://jabber.org/protocol/pubsub">>,
+ result = {pubsub_unsubscribe, '$node', '$jid', '$subid'},
attrs = [#attr{name = <<"node">>},
+ #attr{name = <<"subid">>},
#attr{name = <<"jid">>,
required = true,
dec = {dec_jid, []},
@@ -1675,25 +1691,72 @@
{pubsub_publish,
#elem{name = <<"publish">>,
xmlns = <<"http://jabber.org/protocol/pubsub">>,
- result = {'$node', '$items'},
+ result = {pubsub_publish, '$node', '$items'},
attrs = [#attr{name = <<"node">>,
required = true}],
refs = [#ref{name = pubsub_item, label = '$items'}]}}.
+{pubsub_options,
+ #elem{name = <<"options">>,
+ xmlns = <<"http://jabber.org/protocol/pubsub">>,
+ result = {pubsub_options, '$node', '$jid', '$subid', '$xdata'},
+ attrs = [#attr{name = <<"node">>},
+ #attr{name = <<"subid">>},
+ #attr{name = <<"jid">>,
+ required = true,
+ dec = {dec_jid, []},
+ enc = {enc_jid, []}}],
+ refs = [#ref{name = xdata, min = 0, max = 1,
+ label = '$xdata'}]}}.
+
+{pubsub_retract,
+ #elem{name = <<"retract">>,
+ xmlns = <<"http://jabber.org/protocol/pubsub">>,
+ result = {pubsub_retract, '$node', '$notify', '$items'},
+ attrs = [#attr{name = <<"node">>,
+ required = true},
+ #attr{name = <<"notify">>,
+ default = false,
+ dec = {dec_bool, []},
+ enc = {enc_bool, []}}],
+ refs = [#ref{name = pubsub_item, label = '$items'}]}}.
+
{pubsub,
#elem{name = <<"pubsub">>,
xmlns = <<"http://jabber.org/protocol/pubsub">>,
result = {pubsub, '$subscriptions', '$affiliations', '$publish',
- '$subscribe'},
+ '$subscribe', '$unsubscribe', '$options', '$items',
+ '$retract'},
refs = [#ref{name = pubsub_subscriptions, label = '$subscriptions',
min = 0, max = 1},
#ref{name = pubsub_affiliations, label = '$affiliations',
min = 0, max = 1},
#ref{name = pubsub_subscribe, label = '$subscribe',
min = 0, max = 1},
+ #ref{name = pubsub_unsubscribe, label = '$unsubscribe',
+ min = 0, max = 1},
+ #ref{name = pubsub_options, label = '$options',
+ min = 0, max = 1},
+ #ref{name = pubsub_items, label = '$items',
+ min = 0, max = 1},
+ #ref{name = pubsub_retract, label = '$retract',
+ min = 0, max = 1},
#ref{name = pubsub_publish, label = '$publish',
min = 0, max = 1}]}}.
+{shim_header,
+ #elem{name = <<"header">>,
+ xmlns = <<"http://jabber.org/protocol/shim">>,
+ result = {'$name', '$cdata'},
+ attrs = [#attr{name = <<"name">>,
+ required = true}]}}.
+
+{shim_headers,
+ #elem{name = <<"headers">>,
+ xmlns = <<"http://jabber.org/protocol/shim">>,
+ result = {shim, '$headers'},
+ refs = [#ref{name = shim_header, label = '$headers'}]}}.
+
{delay,
#elem{name = <<"delay">>,
xmlns = <<"urn:xmpp:delay">>,