diff options
Diffstat (limited to 'tools/xmpp_codec.spec')
-rw-r--r-- | tools/xmpp_codec.spec | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/tools/xmpp_codec.spec b/tools/xmpp_codec.spec index 0e0145f72..7503eab10 100644 --- a/tools/xmpp_codec.spec +++ b/tools/xmpp_codec.spec @@ -2877,6 +2877,66 @@ #ref{name = xdata, min = 0, max = 1}, #ref{name = adhoc_command_notes, label = '$notes'}]}). +-xml(db_result, + #elem{name = <<"db:result">>, + xmlns = <<"jabber:client">>, + result = {db_result, '$from', '$to', '$type', '$key', '$error'}, + refs = [#ref{name = error, min = 0, max = 1}], + cdata = #cdata{default = <<"">>, label = '$key'}, + attrs = [#attr{name = <<"from">>, required = true, + dec = {dec_jid, []}, enc = {enc_jid, []}}, + #attr{name = <<"to">>, required = true, + dec = {dec_jid, []}, enc = {enc_jid, []}}, + #attr{name = <<"type">>, + dec = {dec_enum, [[valid, invalid, error]]}, + enc = {enc_enum, []}}]}). + +-xml(db_verify, + #elem{name = <<"db:verify">>, + xmlns = <<"jabber:client">>, + result = {db_verify, '$from', '$to', '$id', '$type', '$key', '$error'}, + refs = [#ref{name = error, min = 0, max = 1}], + cdata = #cdata{default = <<"">>, label = '$key'}, + attrs = [#attr{name = <<"from">>, required = true, + dec = {dec_jid, []}, enc = {enc_jid, []}}, + #attr{name = <<"to">>, required = true, + dec = {dec_jid, []}, enc = {enc_jid, []}}, + #attr{name = <<"id">>, required = true}, + #attr{name = <<"type">>, + dec = {dec_enum, [[valid, invalid, error]]}, + enc = {enc_enum, []}}]}). + +-xml(handshake, + #elem{name = <<"handshake">>, + xmlns = <<"jabber:client">>, + result = {handshake, '$data'}, + cdata = #cdata{default = <<"">>, label = '$data'}}). + +-xml(stream_start, + #elem{name = <<"stream:stream">>, + xmlns = [<<"jabber:client">>, <<"jabber:server">>, + <<"jabber:component:accept">>], + result = {stream_start, '$from', '$to', '$id', + '$version', '$xmlns', '$stream_xmlns', + '$db_xmlns', '$lang'}, + attrs = [#attr{name = <<"from">>, + dec = {dec_jid, []}, + enc = {enc_jid, []}}, + #attr{name = <<"to">>, + dec = {dec_jid, []}, + enc = {enc_jid, []}}, + #attr{name = <<"xmlns">>}, + #attr{name = <<"xmlns:stream">>, + label = '$stream_xmlns', + default = <<"">>}, + #attr{name = <<"xmlns:db">>, + label = '$db_xmlns', + default = <<"">>}, + #attr{name = <<"xml:lang">>, label = '$lang', + default = <<"">>}, + #attr{name = <<"version">>, default = <<"">>}, + #attr{name = <<"id">>, default = <<"">>}]}). + dec_tzo(Val) -> [H1, M1] = str:tokens(Val, <<":">>), H = jlib:binary_to_integer(H1), |