diff options
author | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2016-02-10 16:15:43 +0300 |
---|---|---|
committer | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2016-02-10 16:15:43 +0300 |
commit | d6323a7b5e1e96c4738d521432ea5667b11b005e (patch) | |
tree | 8f2312f8291c1f01034e3ac8cdc3015b0d23a37a /tools/xmpp_codec.spec | |
parent | Mention new XEP support (diff) |
Add tests for XEP-0013
Diffstat (limited to 'tools/xmpp_codec.spec')
-rw-r--r-- | tools/xmpp_codec.spec | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/tools/xmpp_codec.spec b/tools/xmpp_codec.spec index 8d087c8b..129a4efb 100644 --- a/tools/xmpp_codec.spec +++ b/tools/xmpp_codec.spec @@ -2398,6 +2398,35 @@ #ref{name = error_unexpected_request, min = 0, max = 1, label = '$reason'}]}). +-xml(offline_purge, + #elem{name = <<"purge">>, + xmlns = <<"http://jabber.org/protocol/offline">>, + result = true}). + +-xml(offline_fetch, + #elem{name = <<"fetch">>, + xmlns = <<"http://jabber.org/protocol/offline">>, + result = true}). + +-xml(offline_item, + #elem{name = <<"item">>, + xmlns = <<"http://jabber.org/protocol/offline">>, + result = {offline_item, '$node', '$action'}, + attrs = [#attr{name = <<"node">>}, + #attr{name = <<"action">>, + dec = {dec_enum, [[view, remove]]}, + enc = {enc_enum, []}}]}). + +-xml(offline, + #elem{name = <<"offline">>, + xmlns = <<"http://jabber.org/protocol/offline">>, + result = {offline, '$items', '$purge', '$fetch'}, + refs = [#ref{name = offline_purge, min = 0, max = 1, + label = '$purge', default = false}, + #ref{name = offline_fetch, min = 0, max = 1, + label = '$fetch', default = false}, + #ref{name = offline_item, min = 0, label = '$items'}]}). + dec_tzo(Val) -> [H1, M1] = str:tokens(Val, <<":">>), H = jlib:binary_to_integer(H1), |