%% Created automatically by XML generator (fxml_gen.erl)
%% Source: xmpp_codec.spec
--record(vcard_xupdate, {us :: {binary(), binary()},
+-record(vcard_xupdate, {us = {<<>>, <<>>} :: {binary(), binary()},
hash :: binary()}).
-type vcard_xupdate() :: #vcard_xupdate{}.
'no-permanent-store' | 'no-permanent-storage'}).
-type hint() :: #hint{}.
--record(iq, {id :: binary(),
+-record(iq, {id = <<>> :: binary(),
type :: 'error' | 'get' | 'result' | 'set',
- lang :: binary(),
- from :: any(),
- to :: any(),
- sub_els = [] :: [any()]}).
+ lang = <<>> :: binary(),
+ from :: jid:jid(),
+ to :: jid:jid(),
+ sub_els = [] :: [xmpp_element() | fxml:xmlel()]}).
-type iq() :: #iq{}.
-record(feature_register, {}).
-type adhoc_note() :: #adhoc_note{}.
-record(address, {type :: 'bcc' | 'cc' | 'noreply' | 'ofrom' | 'replyroom' | 'replyto' | 'to',
- jid :: any(),
- desc :: binary(),
- node :: binary(),
- delivered :: any()}).
+ jid :: jid:jid(),
+ desc = <<>> :: binary(),
+ node = <<>> :: binary(),
+ delivered :: boolean()}).
-type address() :: #address{}.
--record(sasl_success, {text :: any()}).
+-record(sasl_success, {text = <<>> :: binary()}).
-type sasl_success() :: #sasl_success{}.
--record(mam_result, {xmlns :: binary(),
- queryid :: binary(),
- id :: binary(),
- sub_els = [] :: [any()]}).
+-record(mam_result, {xmlns = <<>> :: binary(),
+ queryid = <<>> :: binary(),
+ id = <<>> :: binary(),
+ sub_els = [] :: [xmpp_element() | fxml:xmlel()]}).
-type mam_result() :: #mam_result{}.
-record(rsm_first, {index :: non_neg_integer(),
- data :: binary()}).
+ data = <<>> :: binary()}).
-type rsm_first() :: #rsm_first{}.
--record(text, {lang :: binary(),
- data :: binary()}).
+-record(text, {lang = <<>> :: binary(),
+ data = <<>> :: binary()}).
-type text() :: #text{}.
--record(streamhost, {jid :: any(),
- host :: binary(),
+-record(streamhost, {jid :: jid:jid(),
+ host = <<>> :: binary(),
port = 1080 :: non_neg_integer()}).
-type streamhost() :: #streamhost{}.
-record(sm_resume, {h :: non_neg_integer(),
- previd :: binary(),
- xmlns :: binary()}).
+ previd = <<>> :: binary(),
+ xmlns = <<>> :: binary()}).
-type sm_resume() :: #sm_resume{}.
-record(carbons_enable, {}).
-record(muc_unsubscribe, {}).
-type muc_unsubscribe() :: #muc_unsubscribe{}.
--record(pubsub_unsubscribe, {node :: binary(),
- jid :: any(),
- subid :: binary()}).
+-record(pubsub_unsubscribe, {node = <<>> :: binary(),
+ jid :: jid:jid(),
+ subid = <<>> :: binary()}).
-type pubsub_unsubscribe() :: #pubsub_unsubscribe{}.
-record(mix_leave, {}).
-record(ping, {}).
-type ping() :: #ping{}.
--record(delay, {stamp :: any(),
- from :: any(),
+-record(delay, {stamp :: erlang:timestamp(),
+ from :: jid:jid(),
desc = <<>> :: binary()}).
-type delay() :: #delay{}.
-record(muc_history, {maxchars :: non_neg_integer(),
maxstanzas :: non_neg_integer(),
seconds :: non_neg_integer(),
- since :: any()}).
+ since :: erlang:timestamp()}).
-type muc_history() :: #muc_history{}.
--record(thumbnail, {uri :: binary(),
+-record(thumbnail, {uri = <<>> :: binary(),
'media-type' = <<>> :: binary(),
width :: non_neg_integer(),
height :: non_neg_integer()}).
-type thumbnail() :: #thumbnail{}.
--record(pubsub_affiliation, {node :: binary(),
+-record(pubsub_affiliation, {node = <<>> :: binary(),
type :: 'member' | 'none' | 'outcast' | 'owner' | 'publish-only' | 'publisher'}).
-type pubsub_affiliation() :: #pubsub_affiliation{}.
--record(muc_decline, {reason = <<>> :: 'undefined' | binary(),
- from :: any(),
- to :: any()}).
+-record(muc_decline, {reason = <<>> :: binary(),
+ from :: jid:jid(),
+ to :: jid:jid()}).
-type muc_decline() :: #muc_decline{}.
-record(sm_a, {h :: non_neg_integer(),
- xmlns :: binary()}).
+ xmlns = <<>> :: binary()}).
-type sm_a() :: #sm_a{}.
--record(stream_start, {from :: any(),
- to :: any(),
+-record(stream_start, {from :: jid:jid(),
+ to :: jid:jid(),
id = <<>> :: binary(),
version = <<>> :: binary(),
- xmlns :: binary(),
+ xmlns = <<>> :: binary(),
stream_xmlns = <<>> :: binary(),
db_xmlns = <<>> :: binary(),
lang = <<>> :: binary()}).
-type stream_start() :: #stream_start{}.
--record(muc_subscribe, {nick :: binary(),
+-record(muc_subscribe, {nick = <<>> :: binary(),
events = [] :: [binary()]}).
-type muc_subscribe() :: #muc_subscribe{}.
--record(stanza_id, {by :: any(),
- id :: binary()}).
+-record(stanza_id, {by :: jid:jid(),
+ id = <<>> :: binary()}).
-type stanza_id() :: #stanza_id{}.
-record(starttls_proceed, {}).
-type starttls_proceed() :: #starttls_proceed{}.
--record(client_id, {id :: binary()}).
+-record(client_id, {id = <<>> :: binary()}).
-type client_id() :: #client_id{}.
-record(sm_resumed, {h :: non_neg_integer(),
- previd :: binary(),
- xmlns :: binary()}).
+ previd = <<>> :: binary(),
+ xmlns = <<>> :: binary()}).
-type sm_resumed() :: #sm_resumed{}.
-record(forwarded, {delay :: #delay{},
- sub_els = [] :: [any()]}).
+ sub_els = [] :: [xmpp_element() | fxml:xmlel()]}).
-type forwarded() :: #forwarded{}.
-record(sm_enable, {max :: non_neg_integer(),
- resume = false :: any(),
- xmlns :: binary()}).
+ resume = false :: boolean(),
+ xmlns = <<>> :: binary()}).
-type sm_enable() :: #sm_enable{}.
-record(starttls_failure, {}).
-type starttls_failure() :: #starttls_failure{}.
--record(sasl_challenge, {text :: any()}).
+-record(sasl_challenge, {text = <<>> :: binary()}).
-type sasl_challenge() :: #sasl_challenge{}.
-record(handshake, {data = <<>> :: binary()}).
-type handshake() :: #handshake{}.
--record(gone, {uri :: binary()}).
+-record(gone, {uri = <<>> :: binary()}).
-type gone() :: #gone{}.
--record(x_conference, {jid :: any(),
+-record(x_conference, {jid :: jid:jid(),
password = <<>> :: binary(),
reason = <<>> :: binary(),
- continue :: any(),
+ continue :: boolean(),
thread = <<>> :: binary()}).
-type x_conference() :: #x_conference{}.
--record(private, {xml_els = [] :: [any()]}).
+-record(private, {xml_els = [] :: [fxml:xmlel()]}).
-type private() :: #private{}.
--record(db_verify, {from :: any(),
- to :: any(),
- id :: binary(),
+-record(db_verify, {from :: jid:jid(),
+ to :: jid:jid(),
+ id = <<>> :: binary(),
type :: 'error' | 'invalid' | 'valid',
key = <<>> :: binary(),
- sub_els = [] :: [any()]}).
+ sub_els = [] :: [xmpp_element() | fxml:xmlel()]}).
-type db_verify() :: #db_verify{}.
--record(nick, {name :: binary()}).
+-record(nick, {name = <<>> :: binary()}).
-type nick() :: #nick{}.
-record(p1_ack, {}).
-type p1_ack() :: #p1_ack{}.
--record(feature_sm, {xmlns :: binary()}).
+-record(feature_sm, {xmlns = <<>> :: binary()}).
-type feature_sm() :: #feature_sm{}.
--record(pubsub_item, {id :: binary(),
- xml_els = [] :: [any()]}).
+-record(pubsub_item, {id = <<>> :: binary(),
+ xml_els = [] :: [fxml:xmlel()]}).
-type pubsub_item() :: #pubsub_item{}.
--record(pubsub_publish, {node :: binary(),
+-record(pubsub_publish, {node = <<>> :: binary(),
items = [] :: [#pubsub_item{}]}).
-type pubsub_publish() :: #pubsub_publish{}.
--record(roster_item, {jid :: any(),
+-record(roster_item, {jid :: jid:jid(),
name = <<>> :: binary(),
groups = [] :: [binary()],
subscription = none :: 'both' | 'from' | 'none' | 'remove' | 'to',
ver :: binary()}).
-type roster_query() :: #roster_query{}.
--record(pubsub_event_item, {id :: binary(),
- node :: binary(),
- publisher :: binary(),
- xml_els = [] :: [any()]}).
+-record(pubsub_event_item, {id = <<>> :: binary(),
+ node = <<>> :: binary(),
+ publisher = <<>> :: binary(),
+ xml_els = [] :: [fxml:xmlel()]}).
-type pubsub_event_item() :: #pubsub_event_item{}.
--record(sm_r, {xmlns :: binary()}).
+-record(sm_r, {xmlns = <<>> :: binary()}).
-type sm_r() :: #sm_r{}.
--record(muc_actor, {jid :: any(),
- nick :: binary()}).
+-record(muc_actor, {jid :: jid:jid(),
+ nick = <<>> :: binary()}).
-type muc_actor() :: #muc_actor{}.
-record(stat_error, {code :: integer(),
reason = <<>> :: binary()}).
-type stat_error() :: #stat_error{}.
--record(stat, {name :: binary(),
+-record(stat, {name = <<>> :: binary(),
units = <<>> :: binary(),
value = <<>> :: binary(),
error :: #stat_error{}}).
-record(addresses, {list = [] :: [#address{}]}).
-type addresses() :: #addresses{}.
--record('see-other-host', {host :: binary()}).
+-record('see-other-host', {host :: binary() | inet:ip_address() | {binary() | inet:ip_address(),non_neg_integer()}}).
-type 'see-other-host'() :: #'see-other-host'{}.
-record(compress, {methods = [] :: [binary()]}).
status = <<>> :: binary()}).
-type last() :: #last{}.
--record(redirect, {uri :: binary()}).
+-record(redirect, {uri = <<>> :: binary()}).
-type redirect() :: #redirect{}.
--record(sm_enabled, {id :: binary(),
- location :: binary(),
+-record(sm_enabled, {id = <<>> :: binary(),
+ location = <<>> :: binary(),
max :: non_neg_integer(),
- resume = false :: any(),
- xmlns :: binary()}).
+ resume = false :: boolean(),
+ xmlns = <<>> :: binary()}).
-type sm_enabled() :: #sm_enabled{}.
--record(pubsub_event_items, {node :: binary(),
+-record(pubsub_event_items, {node = <<>> :: binary(),
retract = [] :: [binary()],
items = [] :: [#pubsub_event_item{}]}).
-type pubsub_event_items() :: #pubsub_event_items{}.
-record(muc_unique, {name = <<>> :: binary()}).
-type muc_unique() :: #muc_unique{}.
--record(sasl_response, {text :: any()}).
+-record(sasl_response, {text = <<>> :: binary()}).
-type sasl_response() :: #sasl_response{}.
--record(legacy_auth, {username :: 'none' | binary(),
- password :: 'none' | binary(),
- digest :: 'none' | binary(),
- resource :: 'none' | binary()}).
+-record(legacy_auth, {username :: binary(),
+ password :: binary(),
+ digest :: binary(),
+ resource :: binary()}).
-type legacy_auth() :: #legacy_auth{}.
--record(pubsub_subscribe, {node :: binary(),
- jid :: any()}).
+-record(pubsub_subscribe, {node = <<>> :: binary(),
+ jid :: jid:jid()}).
-type pubsub_subscribe() :: #pubsub_subscribe{}.
--record(message, {id :: binary(),
+-record(message, {id = <<>> :: binary(),
type = normal :: 'chat' | 'error' | 'groupchat' | 'headline' | 'normal',
- lang :: binary(),
- from :: any(),
- to :: any(),
+ lang = <<>> :: binary(),
+ from :: jid:jid(),
+ to :: jid:jid(),
subject = [] :: [#text{}],
body = [] :: [#text{}],
thread :: binary(),
- sub_els = [] :: [any()]}).
+ sub_els = [] :: [xmpp_element() | fxml:xmlel()]}).
-type message() :: #message{}.
--record(sasl_auth, {mechanism :: binary(),
- text :: any()}).
+-record(sasl_auth, {mechanism = <<>> :: binary(),
+ text = <<>> :: binary()}).
-type sasl_auth() :: #sasl_auth{}.
-record(p1_push, {}).
-type p1_push() :: #p1_push{}.
--record(feature_csi, {xmlns :: binary()}).
+-record(feature_csi, {xmlns = <<>> :: binary()}).
-type feature_csi() :: #feature_csi{}.
--record(disco_item, {jid :: any(),
- name :: binary(),
- node :: binary()}).
+-record(disco_item, {jid :: jid:jid(),
+ name = <<>> :: binary(),
+ node = <<>> :: binary()}).
-type disco_item() :: #disco_item{}.
--record(unblock, {items = [] :: [any()]}).
+-record(unblock, {items = [] :: [jid:jid()]}).
-type unblock() :: #unblock{}.
--record(block, {items = [] :: [any()]}).
+-record(block, {items = [] :: [jid:jid()]}).
-type block() :: #block{}.
-record(compression, {methods = [] :: [binary()]}).
-type compression() :: #compression{}.
--record(muc_subscriptions, {list = [] :: [any()]}).
+-record(muc_subscriptions, {list = [] :: [jid:jid()]}).
-type muc_subscriptions() :: #muc_subscriptions{}.
--record(pubsub_subscription, {jid :: any(),
- node :: binary(),
- subid :: binary(),
+-record(pubsub_subscription, {jid :: jid:jid(),
+ node = <<>> :: binary(),
+ subid = <<>> :: binary(),
type :: 'none' | 'pending' | 'subscribed' | 'unconfigured'}).
-type pubsub_subscription() :: #pubsub_subscription{}.
--record(bob_data, {cid :: binary(),
+-record(bob_data, {cid = <<>> :: binary(),
'max-age' :: non_neg_integer(),
- type :: binary(),
- data = <<>> :: any()}).
+ type = <<>> :: binary(),
+ data = <<>> :: binary()}).
-type bob_data() :: #bob_data{}.
-record(muc_item, {actor :: #muc_actor{},
continue :: binary(),
- reason = <<>> :: 'undefined' | binary(),
+ reason = <<>> :: binary(),
affiliation :: 'admin' | 'member' | 'none' | 'outcast' | 'owner',
role :: 'moderator' | 'none' | 'participant' | 'visitor',
- jid :: any(),
- nick :: binary()}).
+ jid :: jid:jid(),
+ nick = <<>> :: binary()}).
-type muc_item() :: #muc_item{}.
-record(muc_admin, {items = [] :: [#muc_item{}]}).
-type muc_admin() :: #muc_admin{}.
--record(shim, {headers = [] :: [{binary(),'undefined' | binary()}]}).
+-record(shim, {headers = [] :: [{binary(),binary()}]}).
-type shim() :: #shim{}.
--record(mam_prefs, {xmlns :: binary(),
+-record(mam_prefs, {xmlns = <<>> :: binary(),
default :: 'always' | 'never' | 'roster',
- always :: [any()],
- never :: [any()]}).
+ always :: [jid:jid()],
+ never :: [jid:jid()]}).
-type mam_prefs() :: #mam_prefs{}.
--record(caps, {node :: binary(),
- version :: binary(),
- hash :: binary(),
- exts = [] :: any()}).
+-record(caps, {node = <<>> :: binary(),
+ version = <<>> :: binary(),
+ hash = <<>> :: binary(),
+ exts = [] :: binary() | []}).
-type caps() :: #caps{}.
-record(muc, {history :: #muc_history{},
password :: binary()}).
-type muc() :: #muc{}.
--record(stream_features, {sub_els = [] :: [any()]}).
+-record(stream_features, {sub_els = [] :: [xmpp_element() | fxml:xmlel()]}).
-type stream_features() :: #stream_features{}.
-record(stats, {list = [] :: [#stat{}],
node = <<>> :: binary()}).
-type stats() :: #stats{}.
--record(pubsub_items, {node :: binary(),
+-record(pubsub_items, {node = <<>> :: binary(),
max_items :: non_neg_integer(),
- subid :: binary(),
+ subid = <<>> :: binary(),
items = [] :: [#pubsub_item{}]}).
-type pubsub_items() :: #pubsub_items{}.
--record(presence, {id :: binary(),
+-record(presence, {id = <<>> :: binary(),
type = available :: 'available' | 'error' | 'probe' | 'subscribe' | 'subscribed' | 'unavailable' | 'unsubscribe' | 'unsubscribed',
- lang :: binary(),
- from :: any(),
- to :: any(),
+ lang = <<>> :: binary(),
+ from :: jid:jid(),
+ to :: jid:jid(),
show :: 'away' | 'chat' | 'dnd' | 'xa',
status = [] :: [#text{}],
priority :: integer(),
- sub_els = [] :: [any()]}).
+ sub_els = [] :: [xmpp_element() | fxml:xmlel()]}).
-type presence() :: #presence{}.
--record(sic, {ip :: any(),
+-record(sic, {ip :: inet:ip_address(),
port :: non_neg_integer(),
- xmlns :: binary()}).
+ xmlns = <<>> :: binary()}).
-type sic() :: #sic{}.
-record(carbons_sent, {forwarded :: #forwarded{}}).
-type carbons_sent() :: #carbons_sent{}.
--record(mam_archived, {by :: any(),
- id :: binary()}).
+-record(mam_archived, {by :: jid:jid(),
+ id = <<>> :: binary()}).
-type mam_archived() :: #mam_archived{}.
-record(p1_rebind, {}).
userid :: binary()}).
-type vcard_email() :: #vcard_email{}.
--record(db_result, {from :: any(),
- to :: any(),
+-record(db_result, {from :: jid:jid(),
+ to :: jid:jid(),
type :: 'error' | 'invalid' | 'valid',
key = <<>> :: binary(),
- sub_els = [] :: [any()]}).
+ sub_els = [] :: [xmpp_element() | fxml:xmlel()]}).
-type db_result() :: #db_result{}.
-record(carbons_received, {forwarded :: #forwarded{}}).
-type carbons_received() :: #carbons_received{}.
--record(pubsub_retract, {node :: binary(),
- notify = false :: any(),
+-record(pubsub_retract, {node = <<>> :: binary(),
+ notify = false :: boolean(),
items = [] :: [#pubsub_item{}]}).
-type pubsub_retract() :: #pubsub_retract{}.
-record(upload_slot, {get :: binary(),
put :: binary(),
- xmlns :: binary()}).
+ xmlns = <<>> :: binary()}).
-type upload_slot() :: #upload_slot{}.
--record(mix_participant, {jid :: any(),
- nick :: binary()}).
+-record(mix_participant, {jid :: jid:jid(),
+ nick = <<>> :: binary()}).
-type mix_participant() :: #mix_participant{}.
-record(vcard_geo, {lat :: binary(),
text = [] :: [#text{}]}).
-type sasl_failure() :: #sasl_failure{}.
--record(block_list, {items = [] :: [any()]}).
+-record(block_list, {items = [] :: [jid:jid()]}).
-type block_list() :: #block_list{}.
-record(upload_request, {filename :: binary(),
size :: non_neg_integer(),
'content-type' = <<>> :: binary(),
- xmlns :: binary()}).
+ xmlns = <<>> :: binary()}).
-type upload_request() :: #upload_request{}.
--record(xdata_option, {label :: binary(),
+-record(xdata_option, {label = <<>> :: binary(),
value :: binary()}).
-type xdata_option() :: #xdata_option{}.
--record(xdata_field, {label :: binary(),
+-record(xdata_field, {label = <<>> :: binary(),
type :: 'boolean' | 'fixed' | 'hidden' | 'jid-multi' | 'jid-single' | 'list-multi' | 'list-single' | 'text-multi' | 'text-private' | 'text-single',
- var :: binary(),
+ var = <<>> :: binary(),
required = false :: boolean(),
desc :: binary(),
values = [] :: [binary()],
options = [] :: [#xdata_option{}],
- sub_els = [] :: [any()]}).
+ sub_els = [] :: [xmpp_element() | fxml:xmlel()]}).
-type xdata_field() :: #xdata_field{}.
-record(version, {name :: binary(),
os :: binary()}).
-type version() :: #version{}.
--record(bind, {jid :: any(),
- resource :: any()}).
+-record(bind, {jid :: jid:jid(),
+ resource :: binary()}).
-type bind() :: #bind{}.
-record(rosterver_feature, {}).
-type rosterver_feature() :: #rosterver_feature{}.
--record(muc_invite, {reason = <<>> :: 'undefined' | binary(),
- from :: any(),
- to :: any(),
+-record(muc_invite, {reason = <<>> :: binary(),
+ from :: jid:jid(),
+ to :: jid:jid(),
continue :: binary()}).
-type muc_invite() :: #muc_invite{}.
-type carbons_disable() :: #carbons_disable{}.
-record(bytestreams, {hosts = [] :: [#streamhost{}],
- used :: any(),
- activate :: any(),
- dstaddr :: binary(),
+ used :: jid:jid(),
+ activate :: jid:jid(),
+ dstaddr = <<>> :: binary(),
mode = tcp :: 'tcp' | 'udp',
- sid :: binary()}).
+ sid = <<>> :: binary()}).
-type bytestreams() :: #bytestreams{}.
-record(adhoc_actions, {execute :: 'complete' | 'next' | 'prev',
max :: non_neg_integer()}).
-type rsm_set() :: #rsm_set{}.
--record(mam_fin, {id :: binary(),
+-record(mam_fin, {id = <<>> :: binary(),
rsm :: #rsm_set{},
- stable :: any(),
- complete :: any()}).
+ stable :: boolean(),
+ complete :: boolean()}).
-type mam_fin() :: #mam_fin{}.
--record(disco_items, {node :: binary(),
+-record(disco_items, {node = <<>> :: binary(),
items = [] :: [#disco_item{}],
rsm :: #rsm_set{}}).
-type disco_items() :: #disco_items{}.
number :: binary()}).
-type vcard_tel() :: #vcard_tel{}.
--record(media_uri, {type :: binary(),
+-record(media_uri, {type = <<>> :: binary(),
uri = <<>> :: binary()}).
-type media_uri() :: #media_uri{}.
uri = [] :: [#media_uri{}]}).
-type media() :: #media{}.
--record(muc_destroy, {xmlns :: binary(),
- jid :: any(),
- reason = <<>> :: 'undefined' | binary(),
+-record(muc_destroy, {xmlns = <<>> :: binary(),
+ jid :: jid:jid(),
+ reason = <<>> :: binary(),
password :: binary()}).
-type muc_destroy() :: #muc_destroy{}.
suffix :: binary()}).
-type vcard_name() :: #vcard_name{}.
--record(identity, {category :: binary(),
- type :: binary(),
- lang :: binary(),
- name :: binary()}).
+-record(identity, {category = <<>> :: binary(),
+ type = <<>> :: binary(),
+ lang = <<>> :: binary(),
+ name = <<>> :: binary()}).
-type identity() :: #identity{}.
--record(bookmark_conference, {name :: binary(),
- jid :: any(),
- autojoin = false :: any(),
+-record(bookmark_conference, {name = <<>> :: binary(),
+ jid :: jid:jid(),
+ autojoin = false :: boolean(),
nick :: binary(),
password :: binary()}).
-type bookmark_conference() :: #bookmark_conference{}.
-record(xmpp_session, {optional = false :: boolean()}).
-type xmpp_session() :: #xmpp_session{}.
--record(bookmark_url, {name :: binary(),
- url :: binary()}).
+-record(bookmark_url, {name = <<>> :: binary(),
+ url = <<>> :: binary()}).
-type bookmark_url() :: #bookmark_url{}.
-record(bookmark_storage, {conference = [] :: [#bookmark_conference{}],
-type oob_x() :: #oob_x{}.
-record(vcard_sound, {phonetic :: binary(),
- binval :: any(),
+ binval :: binary(),
extval :: binary()}).
-type vcard_sound() :: #vcard_sound{}.
-record(vcard_photo, {type :: binary(),
- binval :: any(),
+ binval :: binary(),
extval :: binary()}).
-type vcard_photo() :: #vcard_photo{}.
ctry :: binary()}).
-type vcard_adr() :: #vcard_adr{}.
--record(search_item, {jid :: any(),
+-record(search_item, {jid :: jid:jid(),
first :: binary(),
last :: binary(),
nick :: binary(),
-record(xcaptcha, {xdata :: #xdata{}}).
-type xcaptcha() :: #xcaptcha{}.
--record(adhoc_command, {node :: binary(),
+-record(adhoc_command, {node = <<>> :: binary(),
action = execute :: 'cancel' | 'complete' | 'execute' | 'next' | 'prev',
- sid :: binary(),
+ sid = <<>> :: binary(),
status :: 'canceled' | 'completed' | 'executing',
- lang :: binary(),
+ lang = <<>> :: binary(),
actions :: #adhoc_actions{},
notes = [] :: [#adhoc_note{}],
xdata :: #xdata{}}).
xdata :: #xdata{}}).
-type search() :: #search{}.
--record(mam_query, {xmlns :: binary(),
- id :: binary(),
- start :: any(),
- 'end' :: any(),
- with :: any(),
+-record(mam_query, {xmlns = <<>> :: binary(),
+ id = <<>> :: binary(),
+ start :: erlang:timestamp(),
+ 'end' :: erlang:timestamp(),
+ with :: jid:jid(),
withtext :: binary(),
rsm :: #rsm_set{},
xdata :: #xdata{}}).
-type mam_query() :: #mam_query{}.
--record(pubsub_options, {node :: binary(),
- jid :: any(),
- subid :: binary(),
+-record(pubsub_options, {node = <<>> :: binary(),
+ jid :: jid:jid(),
+ subid = <<>> :: binary(),
xdata :: #xdata{}}).
-type pubsub_options() :: #pubsub_options{}.
--record(pubsub, {subscriptions :: {'none' | binary(),[#pubsub_subscription{}]},
+-record(pubsub, {subscriptions :: {binary(),[#pubsub_subscription{}]},
affiliations :: [#pubsub_affiliation{}],
publish :: #pubsub_publish{},
subscribe :: #pubsub_subscribe{},
-record(register, {registered = false :: boolean(),
remove = false :: boolean(),
instructions :: binary(),
- username :: 'none' | binary(),
- nick :: 'none' | binary(),
- password :: 'none' | binary(),
- name :: 'none' | binary(),
- first :: 'none' | binary(),
- last :: 'none' | binary(),
- email :: 'none' | binary(),
- address :: 'none' | binary(),
- city :: 'none' | binary(),
- state :: 'none' | binary(),
- zip :: 'none' | binary(),
- phone :: 'none' | binary(),
- url :: 'none' | binary(),
- date :: 'none' | binary(),
- misc :: 'none' | binary(),
- text :: 'none' | binary(),
- key :: 'none' | binary(),
+ username :: binary(),
+ nick :: binary(),
+ password :: binary(),
+ name :: binary(),
+ first :: binary(),
+ last :: binary(),
+ email :: binary(),
+ address :: binary(),
+ city :: binary(),
+ state :: binary(),
+ zip :: binary(),
+ phone :: binary(),
+ url :: binary(),
+ date :: binary(),
+ misc :: binary(),
+ text :: binary(),
+ key :: binary(),
xdata :: #xdata{},
- sub_els = [] :: [any()]}).
+ sub_els = [] :: [xmpp_element() | fxml:xmlel()]}).
-type register() :: #register{}.
--record(disco_info, {node :: binary(),
+-record(disco_info, {node = <<>> :: binary(),
identities = [] :: [#identity{}],
features = [] :: [binary()],
xdata = [] :: [#xdata{}]}).
-type disco_info() :: #disco_info{}.
--record(offline_item, {node :: binary(),
+-record(offline_item, {node = <<>> :: binary(),
action :: 'remove' | 'view'}).
-type offline_item() :: #offline_item{}.
-record(sm_failed, {reason :: atom() | #gone{} | #redirect{},
h :: non_neg_integer(),
- xmlns :: binary()}).
+ xmlns = <<>> :: binary()}).
-type sm_failed() :: #sm_failed{}.
-record(error, {type :: 'auth' | 'cancel' | 'continue' | 'modify' | 'wait',
code :: non_neg_integer(),
- by :: binary(),
+ by = <<>> :: binary(),
reason :: atom() | #gone{} | #redirect{},
text :: #text{},
- sub_els = [] :: [any()]}).
+ sub_els = [] :: [xmpp_element() | fxml:xmlel()]}).
-type error() :: #error{}.
--record(mix_join, {jid :: any(),
+-record(mix_join, {jid :: jid:jid(),
subscribe = [] :: [binary()]}).
-type mix_join() :: #mix_join{}.
-record(privacy_item, {order :: non_neg_integer(),
action :: 'allow' | 'deny',
type :: 'group' | 'jid' | 'subscription',
- value :: binary(),
+ value = <<>> :: binary(),
message = false :: boolean(),
iq = false :: boolean(),
presence_in = false :: boolean(),
presence_out = false :: boolean()}).
-type privacy_item() :: #privacy_item{}.
--record(privacy_list, {name :: binary(),
+-record(privacy_list, {name = <<>> :: binary(),
items = [] :: [#privacy_item{}]}).
-type privacy_list() :: #privacy_list{}.
-type stream_error() :: #stream_error{}.
-record(vcard_logo, {type :: binary(),
- binval :: any(),
+ binval :: binary(),
extval :: binary()}).
-type vcard_logo() :: #vcard_logo{}.
desc :: binary()}).
-type vcard_temp() :: #vcard_temp{}.
--record(time, {tzo :: any(),
- utc :: any()}).
+-record(time, {tzo :: {integer(),integer()},
+ utc :: erlang:timestamp()}).
-type time() :: #time{}.
-type xmpp_element() :: muc_admin() |
Vcard) ->
encode_vcard_temp(Vcard,
[{<<"xmlns">>, <<"vcard-temp">>}]);
-encode({vcard_xupdate, undefined, _} = X) ->
+encode({vcard_xupdate, _, _} = X) ->
encode_vcard_xupdate(X,
[{<<"xmlns">>, <<"vcard-temp:x:update">>}]);
encode({xdata_option, _, _} = Option) ->
_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _,
_}) ->
<<"vCard">>;
-get_name({vcard_xupdate, undefined, _}) -> <<"x">>;
+get_name({vcard_xupdate, _, _}) -> <<"x">>;
get_name({xdata_option, _, _}) -> <<"option">>;
get_name({xdata_field, _, _, _, _, _, _, _, _}) ->
<<"field">>;
get_ns({vcard_temp, _, _, _, _, _, _, _, _, _, _, _, _,
_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _}) ->
<<"vcard-temp">>;
-get_ns({vcard_xupdate, undefined, _}) ->
+get_ns({vcard_xupdate, _, _}) ->
<<"vcard-temp:x:update">>;
get_ns({xdata_option, _, _}) -> <<"jabber:x:data">>;
get_ns({xdata_field, _, _, _, _, _, _, _, _}) ->
email, jabberid, mailer, tz, geo, title, role, logo,
org, categories, note, prodid, rev, sort_string, sound,
uid, url, class, key, desc];
-pp(vcard_xupdate, 2) -> [us, hash];
pp(xdata_option, 2) -> [label, value];
pp(xdata_field, 8) ->
[label, type, var, required, desc, values, options,
[subscriptions, affiliations, publish, subscribe,
unsubscribe, options, items, retract];
pp(shim, 1) -> [headers];
-pp(chatstate, 1) -> [type];
pp(delay, 3) -> [stamp, from, desc];
pp(streamhost, 3) -> [jid, host, port];
pp(bytestreams, 6) ->
pp(carbons_received, 1) -> [forwarded];
pp(carbons_sent, 1) -> [forwarded];
pp(feature_csi, 1) -> [xmlns];
-pp(csi, 1) -> [type];
pp(feature_sm, 1) -> [xmlns];
pp(sm_enable, 3) -> [max, resume, xmlns];
pp(sm_enabled, 5) -> [id, location, max, resume, xmlns];
pp(mix_join, 2) -> [jid, subscribe];
pp(mix_leave, 0) -> [];
pp(mix_participant, 2) -> [jid, nick];
-pp(hint, 1) -> [type];
pp(search_item, 5) -> [jid, first, last, nick, email];
pp(search, 7) ->
[instructions, first, last, nick, email, items, xdata];
pp(thumbnail, 4) -> [uri, 'media-type', width, height];
pp(_, _) -> no.
+enc_host_port(Host) when is_binary(Host) -> Host;
+enc_host_port({{_, _, _, _, _, _, _, _} = IPv6,
+ Port}) ->
+ enc_host_port({<<$[, (enc_ip(IPv6))/binary, $]>>,
+ Port});
+enc_host_port({{_, _, _, _} = IPv4, Port}) ->
+ enc_host_port({enc_ip(IPv4), Port});
+enc_host_port({Host, Port}) ->
+ <<Host/binary, $:, (integer_to_binary(Port))/binary>>;
+enc_host_port(Addr) -> enc_ip(Addr).
+
+dec_host_port(<<$[, T/binary>>) ->
+ [IP, <<$:, Port/binary>>] = binary:split(T, <<$]>>),
+ {dec_ip(IP), dec_int(Port, 0, 65535)};
+dec_host_port(S) ->
+ case binary:split(S, <<$:>>) of
+ [S] -> try dec_ip(S) catch _:_ -> S end;
+ [S, P] ->
+ {try dec_ip(S) catch _:_ -> S end, dec_int(P, 0, 65535)}
+ end.
+
enc_ip({0, 0, 0, 0, 0, 65535, A, B}) ->
enc_ip({(A bsr 8) band 255, A band 255,
(B bsr 8) band 255, B band 255});
[encode_upload_get(Get, []) | _acc].
decode_upload_slot_attr_xmlns(__TopXMLNS, undefined) ->
- undefined;
+ <<>>;
decode_upload_slot_attr_xmlns(__TopXMLNS, _val) -> _val.
-encode_upload_slot_attr_xmlns(undefined, _acc) -> _acc;
+encode_upload_slot_attr_xmlns(<<>>, _acc) -> _acc;
encode_upload_slot_attr_xmlns(_val, _acc) ->
[{<<"xmlns">>, _val} | _acc].
decode_upload_request_attr_xmlns(__TopXMLNS,
undefined) ->
- undefined;
+ <<>>;
decode_upload_request_attr_xmlns(__TopXMLNS, _val) ->
_val.
-encode_upload_request_attr_xmlns(undefined, _acc) ->
- _acc;
+encode_upload_request_attr_xmlns(<<>>, _acc) -> _acc;
encode_upload_request_attr_xmlns(_val, _acc) ->
[{<<"xmlns">>, _val} | _acc].
'encode_sic_$port'(Port, _acc) ->
[encode_sip_port(Port, []) | _acc].
-decode_sic_attr_xmlns(__TopXMLNS, undefined) ->
- undefined;
+decode_sic_attr_xmlns(__TopXMLNS, undefined) -> <<>>;
decode_sic_attr_xmlns(__TopXMLNS, _val) -> _val.
-encode_sic_attr_xmlns(undefined, _acc) -> _acc;
+encode_sic_attr_xmlns(<<>>, _acc) -> _acc;
encode_sic_attr_xmlns(_val, _acc) ->
[{<<"xmlns">>, _val} | _acc].
[{<<"max-age">>, enc_int(_val)} | _acc].
decode_bob_data_attr_type(__TopXMLNS, undefined) ->
- undefined;
+ <<>>;
decode_bob_data_attr_type(__TopXMLNS, _val) -> _val.
-encode_bob_data_attr_type(undefined, _acc) -> _acc;
+encode_bob_data_attr_type(<<>>, _acc) -> _acc;
encode_bob_data_attr_type(_val, _acc) ->
[{<<"type">>, _val} | _acc].
[{<<"to">>, enc_jid(_val)} | _acc].
decode_stream_start_attr_xmlns(__TopXMLNS, undefined) ->
- undefined;
+ <<>>;
decode_stream_start_attr_xmlns(__TopXMLNS, _val) ->
_val.
-encode_stream_start_attr_xmlns(undefined, _acc) -> _acc;
+encode_stream_start_attr_xmlns(<<>>, _acc) -> _acc;
encode_stream_start_attr_xmlns(_val, _acc) ->
[{<<"xmlns">>, _val} | _acc].
'decode_adhoc_command_attr_xml:lang'(__TopXMLNS,
undefined) ->
- undefined;
+ <<>>;
'decode_adhoc_command_attr_xml:lang'(__TopXMLNS,
_val) ->
_val.
-'encode_adhoc_command_attr_xml:lang'(undefined, _acc) ->
+'encode_adhoc_command_attr_xml:lang'(<<>>, _acc) ->
_acc;
'encode_adhoc_command_attr_xml:lang'(_val, _acc) ->
[{<<"xml:lang">>, _val} | _acc].
decode_adhoc_command_attr_sessionid(__TopXMLNS,
undefined) ->
- undefined;
+ <<>>;
decode_adhoc_command_attr_sessionid(__TopXMLNS, _val) ->
_val.
-encode_adhoc_command_attr_sessionid(undefined, _acc) ->
- _acc;
+encode_adhoc_command_attr_sessionid(<<>>, _acc) -> _acc;
encode_adhoc_command_attr_sessionid(_val, _acc) ->
[{<<"sessionid">>, _val} | _acc].
encode_address_attr_jid(_val, _acc) ->
[{<<"jid">>, enc_jid(_val)} | _acc].
-decode_address_attr_desc(__TopXMLNS, undefined) ->
- undefined;
+decode_address_attr_desc(__TopXMLNS, undefined) -> <<>>;
decode_address_attr_desc(__TopXMLNS, _val) -> _val.
-encode_address_attr_desc(undefined, _acc) -> _acc;
+encode_address_attr_desc(<<>>, _acc) -> _acc;
encode_address_attr_desc(_val, _acc) ->
[{<<"desc">>, _val} | _acc].
-decode_address_attr_node(__TopXMLNS, undefined) ->
- undefined;
+decode_address_attr_node(__TopXMLNS, undefined) -> <<>>;
decode_address_attr_node(__TopXMLNS, _val) -> _val.
-encode_address_attr_node(undefined, _acc) -> _acc;
+encode_address_attr_node(<<>>, _acc) -> _acc;
encode_address_attr_node(_val, _acc) ->
[{<<"node">>, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"id">>, _attrs, _els}.
-decode_xevent_id_cdata(__TopXMLNS, <<>>) -> undefined;
+decode_xevent_id_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_xevent_id_cdata(__TopXMLNS, _val) -> _val.
-encode_xevent_id_cdata(undefined, _acc) -> _acc;
+encode_xevent_id_cdata(<<>>, _acc) -> _acc;
encode_xevent_id_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
{xmlel, <<"instructions">>, _attrs, _els}.
decode_search_instructions_cdata(__TopXMLNS, <<>>) ->
- undefined;
+ <<>>;
decode_search_instructions_cdata(__TopXMLNS, _val) ->
_val.
-encode_search_instructions_cdata(undefined, _acc) ->
- _acc;
+encode_search_instructions_cdata(<<>>, _acc) -> _acc;
encode_search_instructions_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
decode_mix_participant_attr_nick(__TopXMLNS,
undefined) ->
- undefined;
+ <<>>;
decode_mix_participant_attr_nick(__TopXMLNS, _val) ->
_val.
-encode_mix_participant_attr_nick(undefined, _acc) ->
- _acc;
+encode_mix_participant_attr_nick(<<>>, _acc) -> _acc;
encode_mix_participant_attr_nick(_val, _acc) ->
[{<<"nick">>, _val} | _acc].
{xmlel, <<"item">>, _attrs, _els}.
decode_offline_item_attr_node(__TopXMLNS, undefined) ->
- undefined;
+ <<>>;
decode_offline_item_attr_node(__TopXMLNS, _val) -> _val.
-encode_offline_item_attr_node(undefined, _acc) -> _acc;
+encode_offline_item_attr_node(<<>>, _acc) -> _acc;
encode_offline_item_attr_node(_val, _acc) ->
[{<<"node">>, _val} | _acc].
[{<<"h">>, enc_int(_val)} | _acc].
decode_sm_failed_attr_xmlns(__TopXMLNS, undefined) ->
- undefined;
+ <<>>;
decode_sm_failed_attr_xmlns(__TopXMLNS, _val) -> _val.
-encode_sm_failed_attr_xmlns(undefined, _acc) -> _acc;
+encode_sm_failed_attr_xmlns(<<>>, _acc) -> _acc;
encode_sm_failed_attr_xmlns(_val, _acc) ->
[{<<"xmlns">>, _val} | _acc].
encode_sm_a_attr_h(_val, _acc) ->
[{<<"h">>, enc_int(_val)} | _acc].
-decode_sm_a_attr_xmlns(__TopXMLNS, undefined) ->
- undefined;
+decode_sm_a_attr_xmlns(__TopXMLNS, undefined) -> <<>>;
decode_sm_a_attr_xmlns(__TopXMLNS, _val) -> _val.
-encode_sm_a_attr_xmlns(undefined, _acc) -> _acc;
+encode_sm_a_attr_xmlns(<<>>, _acc) -> _acc;
encode_sm_a_attr_xmlns(_val, _acc) ->
[{<<"xmlns">>, _val} | _acc].
_attrs = encode_sm_r_attr_xmlns(Xmlns, _xmlns_attrs),
{xmlel, <<"r">>, _attrs, _els}.
-decode_sm_r_attr_xmlns(__TopXMLNS, undefined) ->
- undefined;
+decode_sm_r_attr_xmlns(__TopXMLNS, undefined) -> <<>>;
decode_sm_r_attr_xmlns(__TopXMLNS, _val) -> _val.
-encode_sm_r_attr_xmlns(undefined, _acc) -> _acc;
+encode_sm_r_attr_xmlns(<<>>, _acc) -> _acc;
encode_sm_r_attr_xmlns(_val, _acc) ->
[{<<"xmlns">>, _val} | _acc].
[{<<"h">>, enc_int(_val)} | _acc].
decode_sm_resumed_attr_xmlns(__TopXMLNS, undefined) ->
- undefined;
+ <<>>;
decode_sm_resumed_attr_xmlns(__TopXMLNS, _val) -> _val.
-encode_sm_resumed_attr_xmlns(undefined, _acc) -> _acc;
+encode_sm_resumed_attr_xmlns(<<>>, _acc) -> _acc;
encode_sm_resumed_attr_xmlns(_val, _acc) ->
[{<<"xmlns">>, _val} | _acc].
[{<<"h">>, enc_int(_val)} | _acc].
decode_sm_resume_attr_xmlns(__TopXMLNS, undefined) ->
- undefined;
+ <<>>;
decode_sm_resume_attr_xmlns(__TopXMLNS, _val) -> _val.
-encode_sm_resume_attr_xmlns(undefined, _acc) -> _acc;
+encode_sm_resume_attr_xmlns(<<>>, _acc) -> _acc;
encode_sm_resume_attr_xmlns(_val, _acc) ->
[{<<"xmlns">>, _val} | _acc].
{xmlel, <<"enabled">>, _attrs, _els}.
decode_sm_enabled_attr_id(__TopXMLNS, undefined) ->
- undefined;
+ <<>>;
decode_sm_enabled_attr_id(__TopXMLNS, _val) -> _val.
-encode_sm_enabled_attr_id(undefined, _acc) -> _acc;
+encode_sm_enabled_attr_id(<<>>, _acc) -> _acc;
encode_sm_enabled_attr_id(_val, _acc) ->
[{<<"id">>, _val} | _acc].
decode_sm_enabled_attr_location(__TopXMLNS,
undefined) ->
- undefined;
+ <<>>;
decode_sm_enabled_attr_location(__TopXMLNS, _val) ->
_val.
-encode_sm_enabled_attr_location(undefined, _acc) ->
- _acc;
+encode_sm_enabled_attr_location(<<>>, _acc) -> _acc;
encode_sm_enabled_attr_location(_val, _acc) ->
[{<<"location">>, _val} | _acc].
decode_sm_enabled_attr_xmlns(__TopXMLNS, undefined) ->
- undefined;
+ <<>>;
decode_sm_enabled_attr_xmlns(__TopXMLNS, _val) -> _val.
-encode_sm_enabled_attr_xmlns(undefined, _acc) -> _acc;
+encode_sm_enabled_attr_xmlns(<<>>, _acc) -> _acc;
encode_sm_enabled_attr_xmlns(_val, _acc) ->
[{<<"xmlns">>, _val} | _acc].
[{<<"max">>, enc_int(_val)} | _acc].
decode_sm_enable_attr_xmlns(__TopXMLNS, undefined) ->
- undefined;
+ <<>>;
decode_sm_enable_attr_xmlns(__TopXMLNS, _val) -> _val.
-encode_sm_enable_attr_xmlns(undefined, _acc) -> _acc;
+encode_sm_enable_attr_xmlns(<<>>, _acc) -> _acc;
encode_sm_enable_attr_xmlns(_val, _acc) ->
[{<<"xmlns">>, _val} | _acc].
{xmlel, <<"sm">>, _attrs, _els}.
decode_feature_sm_attr_xmlns(__TopXMLNS, undefined) ->
- undefined;
+ <<>>;
decode_feature_sm_attr_xmlns(__TopXMLNS, _val) -> _val.
-encode_feature_sm_attr_xmlns(undefined, _acc) -> _acc;
+encode_feature_sm_attr_xmlns(<<>>, _acc) -> _acc;
encode_feature_sm_attr_xmlns(_val, _acc) ->
[{<<"xmlns">>, _val} | _acc].
{xmlel, <<"csi">>, _attrs, _els}.
decode_feature_csi_attr_xmlns(__TopXMLNS, undefined) ->
- undefined;
+ <<>>;
decode_feature_csi_attr_xmlns(__TopXMLNS, _val) -> _val.
-encode_feature_csi_attr_xmlns(undefined, _acc) -> _acc;
+encode_feature_csi_attr_xmlns(<<>>, _acc) -> _acc;
encode_feature_csi_attr_xmlns(_val, _acc) ->
[{<<"xmlns">>, _val} | _acc].
| _acc].
decode_mam_fin_attr_queryid(__TopXMLNS, undefined) ->
- undefined;
+ <<>>;
decode_mam_fin_attr_queryid(__TopXMLNS, _val) -> _val.
-encode_mam_fin_attr_queryid(undefined, _acc) -> _acc;
+encode_mam_fin_attr_queryid(<<>>, _acc) -> _acc;
encode_mam_fin_attr_queryid(_val, _acc) ->
[{<<"queryid">>, _val} | _acc].
[{<<"default">>, enc_enum(_val)} | _acc].
decode_mam_prefs_attr_xmlns(__TopXMLNS, undefined) ->
- undefined;
+ <<>>;
decode_mam_prefs_attr_xmlns(__TopXMLNS, _val) -> _val.
-encode_mam_prefs_attr_xmlns(undefined, _acc) -> _acc;
+encode_mam_prefs_attr_xmlns(<<>>, _acc) -> _acc;
encode_mam_prefs_attr_xmlns(_val, _acc) ->
[{<<"xmlns">>, _val} | _acc].
__TopXMLNS == <<"urn:xmpp:mam:0">>;
__TopXMLNS == <<"urn:xmpp:mam:tmp">> ->
decode_mam_always_els(__TopXMLNS, __IgnoreEls, _els,
- case decode_mam_jid(__TopXMLNS, __IgnoreEls,
- _el)
- of
- undefined -> Jids;
- _new_el -> [_new_el | Jids]
- end);
+ [decode_mam_jid(__TopXMLNS, __IgnoreEls, _el)
+ | Jids]);
<<"urn:xmpp:mam:0">> ->
decode_mam_always_els(__TopXMLNS, __IgnoreEls, _els,
- case decode_mam_jid(<<"urn:xmpp:mam:0">>,
- __IgnoreEls, _el)
- of
- undefined -> Jids;
- _new_el -> [_new_el | Jids]
- end);
+ [decode_mam_jid(<<"urn:xmpp:mam:0">>,
+ __IgnoreEls, _el)
+ | Jids]);
<<"urn:xmpp:mam:1">> ->
decode_mam_always_els(__TopXMLNS, __IgnoreEls, _els,
- case decode_mam_jid(<<"urn:xmpp:mam:1">>,
- __IgnoreEls, _el)
- of
- undefined -> Jids;
- _new_el -> [_new_el | Jids]
- end);
+ [decode_mam_jid(<<"urn:xmpp:mam:1">>,
+ __IgnoreEls, _el)
+ | Jids]);
<<"urn:xmpp:mam:tmp">> ->
decode_mam_always_els(__TopXMLNS, __IgnoreEls, _els,
- case decode_mam_jid(<<"urn:xmpp:mam:tmp">>,
- __IgnoreEls, _el)
- of
- undefined -> Jids;
- _new_el -> [_new_el | Jids]
- end);
+ [decode_mam_jid(<<"urn:xmpp:mam:tmp">>,
+ __IgnoreEls, _el)
+ | Jids]);
_ ->
decode_mam_always_els(__TopXMLNS, __IgnoreEls, _els,
Jids)
__TopXMLNS == <<"urn:xmpp:mam:0">>;
__TopXMLNS == <<"urn:xmpp:mam:tmp">> ->
decode_mam_never_els(__TopXMLNS, __IgnoreEls, _els,
- case decode_mam_jid(__TopXMLNS, __IgnoreEls, _el)
- of
- undefined -> Jids;
- _new_el -> [_new_el | Jids]
- end);
+ [decode_mam_jid(__TopXMLNS, __IgnoreEls, _el)
+ | Jids]);
<<"urn:xmpp:mam:0">> ->
decode_mam_never_els(__TopXMLNS, __IgnoreEls, _els,
- case decode_mam_jid(<<"urn:xmpp:mam:0">>,
- __IgnoreEls, _el)
- of
- undefined -> Jids;
- _new_el -> [_new_el | Jids]
- end);
+ [decode_mam_jid(<<"urn:xmpp:mam:0">>,
+ __IgnoreEls, _el)
+ | Jids]);
<<"urn:xmpp:mam:1">> ->
decode_mam_never_els(__TopXMLNS, __IgnoreEls, _els,
- case decode_mam_jid(<<"urn:xmpp:mam:1">>,
- __IgnoreEls, _el)
- of
- undefined -> Jids;
- _new_el -> [_new_el | Jids]
- end);
+ [decode_mam_jid(<<"urn:xmpp:mam:1">>,
+ __IgnoreEls, _el)
+ | Jids]);
<<"urn:xmpp:mam:tmp">> ->
decode_mam_never_els(__TopXMLNS, __IgnoreEls, _els,
- case decode_mam_jid(<<"urn:xmpp:mam:tmp">>,
- __IgnoreEls, _el)
- of
- undefined -> Jids;
- _new_el -> [_new_el | Jids]
- end);
+ [decode_mam_jid(<<"urn:xmpp:mam:tmp">>,
+ __IgnoreEls, _el)
+ | Jids]);
_ ->
decode_mam_never_els(__TopXMLNS, __IgnoreEls, _els,
Jids)
{xmlel, <<"result">>, _attrs, _els}.
decode_mam_result_attr_queryid(__TopXMLNS, undefined) ->
- undefined;
+ <<>>;
decode_mam_result_attr_queryid(__TopXMLNS, _val) ->
_val.
-encode_mam_result_attr_queryid(undefined, _acc) -> _acc;
+encode_mam_result_attr_queryid(<<>>, _acc) -> _acc;
encode_mam_result_attr_queryid(_val, _acc) ->
[{<<"queryid">>, _val} | _acc].
decode_mam_result_attr_xmlns(__TopXMLNS, undefined) ->
- undefined;
+ <<>>;
decode_mam_result_attr_xmlns(__TopXMLNS, _val) -> _val.
-encode_mam_result_attr_xmlns(undefined, _acc) -> _acc;
+encode_mam_result_attr_xmlns(<<>>, _acc) -> _acc;
encode_mam_result_attr_xmlns(_val, _acc) ->
[{<<"xmlns">>, _val} | _acc].
decode_mam_result_attr_id(__TopXMLNS, undefined) ->
- undefined;
+ <<>>;
decode_mam_result_attr_id(__TopXMLNS, _val) -> _val.
-encode_mam_result_attr_id(undefined, _acc) -> _acc;
+encode_mam_result_attr_id(<<>>, _acc) -> _acc;
encode_mam_result_attr_id(_val, _acc) ->
[{<<"id">>, _val} | _acc].
{xmlel, <<"archived">>, _attrs, _els}.
decode_mam_archived_attr_id(__TopXMLNS, undefined) ->
- undefined;
+ <<>>;
decode_mam_archived_attr_id(__TopXMLNS, _val) -> _val.
-encode_mam_archived_attr_id(undefined, _acc) -> _acc;
+encode_mam_archived_attr_id(<<>>, _acc) -> _acc;
encode_mam_archived_attr_id(_val, _acc) ->
[{<<"id">>, _val} | _acc].
| _acc].
decode_mam_query_attr_queryid(__TopXMLNS, undefined) ->
- undefined;
+ <<>>;
decode_mam_query_attr_queryid(__TopXMLNS, _val) -> _val.
-encode_mam_query_attr_queryid(undefined, _acc) -> _acc;
+encode_mam_query_attr_queryid(<<>>, _acc) -> _acc;
encode_mam_query_attr_queryid(_val, _acc) ->
[{<<"queryid">>, _val} | _acc].
decode_mam_query_attr_xmlns(__TopXMLNS, undefined) ->
- undefined;
+ <<>>;
decode_mam_query_attr_xmlns(__TopXMLNS, _val) -> _val.
-encode_mam_query_attr_xmlns(undefined, _acc) -> _acc;
+encode_mam_query_attr_xmlns(<<>>, _acc) -> _acc;
encode_mam_query_attr_xmlns(_val, _acc) ->
[{<<"xmlns">>, _val} | _acc].
encode_rsm_first_attr_index(_val, _acc) ->
[{<<"index">>, enc_int(_val)} | _acc].
-decode_rsm_first_cdata(__TopXMLNS, <<>>) -> undefined;
+decode_rsm_first_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_rsm_first_cdata(__TopXMLNS, _val) -> _val.
-encode_rsm_first_cdata(undefined, _acc) -> _acc;
+encode_rsm_first_cdata(<<>>, _acc) -> _acc;
encode_rsm_first_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"last">>, _attrs, _els}.
-decode_rsm_last_cdata(__TopXMLNS, <<>>) -> undefined;
+decode_rsm_last_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_rsm_last_cdata(__TopXMLNS, _val) -> _val.
-encode_rsm_last_cdata(undefined, _acc) -> _acc;
+encode_rsm_last_cdata(<<>>, _acc) -> _acc;
encode_rsm_last_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"after">>, _attrs, _els}.
-decode_rsm_after_cdata(__TopXMLNS, <<>>) -> undefined;
+decode_rsm_after_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_rsm_after_cdata(__TopXMLNS, _val) -> _val.
-encode_rsm_after_cdata(undefined, _acc) -> _acc;
+encode_rsm_after_cdata(<<>>, _acc) -> _acc;
encode_rsm_after_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
<<"">> when __TopXMLNS == <<"urn:xmpp:mucsub:0">> ->
decode_muc_subscriptions_els(__TopXMLNS, __IgnoreEls,
_els,
- case decode_muc_subscription(__TopXMLNS,
- __IgnoreEls,
- _el)
- of
- undefined -> List;
- _new_el -> [_new_el | List]
- end);
+ [decode_muc_subscription(__TopXMLNS,
+ __IgnoreEls,
+ _el)
+ | List]);
<<"urn:xmpp:mucsub:0">> ->
decode_muc_subscriptions_els(__TopXMLNS, __IgnoreEls,
_els,
- case
- decode_muc_subscription(<<"urn:xmpp:mucsub:0">>,
- __IgnoreEls,
- _el)
- of
- undefined -> List;
- _new_el -> [_new_el | List]
- end);
+ [decode_muc_subscription(<<"urn:xmpp:mucsub:0">>,
+ __IgnoreEls,
+ _el)
+ | List]);
_ ->
decode_muc_subscriptions_els(__TopXMLNS, __IgnoreEls,
_els, List)
decode_muc_admin_continue_attr_thread(__TopXMLNS,
undefined) ->
- undefined;
+ <<>>;
decode_muc_admin_continue_attr_thread(__TopXMLNS,
_val) ->
_val.
-encode_muc_admin_continue_attr_thread(undefined,
- _acc) ->
+encode_muc_admin_continue_attr_thread(<<>>, _acc) ->
_acc;
encode_muc_admin_continue_attr_thread(_val, _acc) ->
[{<<"thread">>, _val} | _acc].
decode_muc_admin_actor_attr_nick(__TopXMLNS,
undefined) ->
- undefined;
+ <<>>;
decode_muc_admin_actor_attr_nick(__TopXMLNS, _val) ->
_val.
-encode_muc_admin_actor_attr_nick(undefined, _acc) ->
- _acc;
+encode_muc_admin_actor_attr_nick(<<>>, _acc) -> _acc;
encode_muc_admin_actor_attr_nick(_val, _acc) ->
[{<<"nick">>, _val} | _acc].
decode_muc_admin_item_attr_nick(__TopXMLNS,
undefined) ->
- undefined;
+ <<>>;
decode_muc_admin_item_attr_nick(__TopXMLNS, _val) ->
_val.
-encode_muc_admin_item_attr_nick(undefined, _acc) ->
- _acc;
+encode_muc_admin_item_attr_nick(<<>>, _acc) -> _acc;
encode_muc_admin_item_attr_nick(_val, _acc) ->
[{<<"nick">>, _val} | _acc].
decode_muc_owner_item_attr_nick(__TopXMLNS,
undefined) ->
- undefined;
+ <<>>;
decode_muc_owner_item_attr_nick(__TopXMLNS, _val) ->
_val.
-encode_muc_owner_item_attr_nick(undefined, _acc) ->
- _acc;
+encode_muc_owner_item_attr_nick(<<>>, _acc) -> _acc;
encode_muc_owner_item_attr_nick(_val, _acc) ->
[{<<"nick">>, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"password">>, _attrs, _els}.
-decode_muc_password_cdata(__TopXMLNS, <<>>) ->
- undefined;
+decode_muc_password_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_muc_password_cdata(__TopXMLNS, _val) -> _val.
-encode_muc_password_cdata(undefined, _acc) -> _acc;
+encode_muc_password_cdata(<<>>, _acc) -> _acc;
encode_muc_password_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
[{<<"jid">>, enc_jid(_val)} | _acc].
decode_muc_user_item_attr_nick(__TopXMLNS, undefined) ->
- undefined;
+ <<>>;
decode_muc_user_item_attr_nick(__TopXMLNS, _val) ->
_val.
-encode_muc_user_item_attr_nick(undefined, _acc) -> _acc;
+encode_muc_user_item_attr_nick(<<>>, _acc) -> _acc;
encode_muc_user_item_attr_nick(_val, _acc) ->
[{<<"nick">>, _val} | _acc].
decode_muc_user_continue_attr_thread(__TopXMLNS,
undefined) ->
- undefined;
+ <<>>;
decode_muc_user_continue_attr_thread(__TopXMLNS,
_val) ->
_val.
-encode_muc_user_continue_attr_thread(undefined, _acc) ->
+encode_muc_user_continue_attr_thread(<<>>, _acc) ->
_acc;
encode_muc_user_continue_attr_thread(_val, _acc) ->
[{<<"thread">>, _val} | _acc].
decode_muc_user_actor_attr_nick(__TopXMLNS,
undefined) ->
- undefined;
+ <<>>;
decode_muc_user_actor_attr_nick(__TopXMLNS, _val) ->
_val.
-encode_muc_user_actor_attr_nick(undefined, _acc) ->
- _acc;
+encode_muc_user_actor_attr_nick(<<>>, _acc) -> _acc;
encode_muc_user_actor_attr_nick(_val, _acc) ->
[{<<"nick">>, _val} | _acc].
[{<<"jid">>, enc_jid(_val)} | _acc].
decode_muc_destroy_attr_xmlns(__TopXMLNS, undefined) ->
- undefined;
+ <<>>;
decode_muc_destroy_attr_xmlns(__TopXMLNS, _val) -> _val.
-encode_muc_destroy_attr_xmlns(undefined, _acc) -> _acc;
+encode_muc_destroy_attr_xmlns(<<>>, _acc) -> _acc;
encode_muc_destroy_attr_xmlns(_val, _acc) ->
[{<<"xmlns">>, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"reason">>, _attrs, _els}.
-decode_muc_reason_cdata(__TopXMLNS, <<>>) -> undefined;
+decode_muc_reason_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_muc_reason_cdata(__TopXMLNS, _val) -> _val.
-encode_muc_reason_cdata(undefined, _acc) -> _acc;
+encode_muc_reason_cdata(<<>>, _acc) -> _acc;
encode_muc_reason_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
decode_bytestreams_attr_dstaddr(__TopXMLNS,
undefined) ->
- undefined;
+ <<>>;
decode_bytestreams_attr_dstaddr(__TopXMLNS, _val) ->
_val.
-encode_bytestreams_attr_dstaddr(undefined, _acc) ->
- _acc;
+encode_bytestreams_attr_dstaddr(<<>>, _acc) -> _acc;
encode_bytestreams_attr_dstaddr(_val, _acc) ->
[{<<"dstaddr">>, _val} | _acc].
decode_bytestreams_attr_sid(__TopXMLNS, undefined) ->
- undefined;
+ <<>>;
decode_bytestreams_attr_sid(__TopXMLNS, _val) -> _val.
-encode_bytestreams_attr_sid(undefined, _acc) -> _acc;
+encode_bytestreams_attr_sid(<<>>, _acc) -> _acc;
encode_bytestreams_attr_sid(_val, _acc) ->
[{<<"sid">>, _val} | _acc].
encode_shim_header_attr_name(_val, _acc) ->
[{<<"name">>, _val} | _acc].
-decode_shim_header_cdata(__TopXMLNS, <<>>) -> undefined;
+decode_shim_header_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_shim_header_cdata(__TopXMLNS, _val) -> _val.
-encode_shim_header_cdata(undefined, _acc) -> _acc;
+encode_shim_header_cdata(<<>>, _acc) -> _acc;
encode_shim_header_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
decode_pubsub_options_attr_node(__TopXMLNS,
undefined) ->
- undefined;
+ <<>>;
decode_pubsub_options_attr_node(__TopXMLNS, _val) ->
_val.
-encode_pubsub_options_attr_node(undefined, _acc) ->
- _acc;
+encode_pubsub_options_attr_node(<<>>, _acc) -> _acc;
encode_pubsub_options_attr_node(_val, _acc) ->
[{<<"node">>, _val} | _acc].
decode_pubsub_options_attr_subid(__TopXMLNS,
undefined) ->
- undefined;
+ <<>>;
decode_pubsub_options_attr_subid(__TopXMLNS, _val) ->
_val.
-encode_pubsub_options_attr_subid(undefined, _acc) ->
- _acc;
+encode_pubsub_options_attr_subid(<<>>, _acc) -> _acc;
encode_pubsub_options_attr_subid(_val, _acc) ->
[{<<"subid">>, _val} | _acc].
decode_pubsub_unsubscribe_attr_node(__TopXMLNS,
undefined) ->
- undefined;
+ <<>>;
decode_pubsub_unsubscribe_attr_node(__TopXMLNS, _val) ->
_val.
-encode_pubsub_unsubscribe_attr_node(undefined, _acc) ->
- _acc;
+encode_pubsub_unsubscribe_attr_node(<<>>, _acc) -> _acc;
encode_pubsub_unsubscribe_attr_node(_val, _acc) ->
[{<<"node">>, _val} | _acc].
decode_pubsub_unsubscribe_attr_subid(__TopXMLNS,
undefined) ->
- undefined;
+ <<>>;
decode_pubsub_unsubscribe_attr_subid(__TopXMLNS,
_val) ->
_val.
-encode_pubsub_unsubscribe_attr_subid(undefined, _acc) ->
+encode_pubsub_unsubscribe_attr_subid(<<>>, _acc) ->
_acc;
encode_pubsub_unsubscribe_attr_subid(_val, _acc) ->
[{<<"subid">>, _val} | _acc].
decode_pubsub_subscribe_attr_node(__TopXMLNS,
undefined) ->
- undefined;
+ <<>>;
decode_pubsub_subscribe_attr_node(__TopXMLNS, _val) ->
_val.
-encode_pubsub_subscribe_attr_node(undefined, _acc) ->
- _acc;
+encode_pubsub_subscribe_attr_node(<<>>, _acc) -> _acc;
encode_pubsub_subscribe_attr_node(_val, _acc) ->
[{<<"node">>, _val} | _acc].
decode_pubsub_subscriptions_attr_node(__TopXMLNS,
undefined) ->
- none;
+ <<>>;
decode_pubsub_subscriptions_attr_node(__TopXMLNS,
_val) ->
_val.
-encode_pubsub_subscriptions_attr_node(none, _acc) ->
+encode_pubsub_subscriptions_attr_node(<<>>, _acc) ->
_acc;
encode_pubsub_subscriptions_attr_node(_val, _acc) ->
[{<<"node">>, _val} | _acc].
decode_pubsub_event_item_attr_id(__TopXMLNS,
undefined) ->
- undefined;
+ <<>>;
decode_pubsub_event_item_attr_id(__TopXMLNS, _val) ->
_val.
-encode_pubsub_event_item_attr_id(undefined, _acc) ->
- _acc;
+encode_pubsub_event_item_attr_id(<<>>, _acc) -> _acc;
encode_pubsub_event_item_attr_id(_val, _acc) ->
[{<<"id">>, _val} | _acc].
decode_pubsub_event_item_attr_node(__TopXMLNS,
undefined) ->
- undefined;
+ <<>>;
decode_pubsub_event_item_attr_node(__TopXMLNS, _val) ->
_val.
-encode_pubsub_event_item_attr_node(undefined, _acc) ->
- _acc;
+encode_pubsub_event_item_attr_node(<<>>, _acc) -> _acc;
encode_pubsub_event_item_attr_node(_val, _acc) ->
[{<<"node">>, _val} | _acc].
decode_pubsub_event_item_attr_publisher(__TopXMLNS,
undefined) ->
- undefined;
+ <<>>;
decode_pubsub_event_item_attr_publisher(__TopXMLNS,
_val) ->
_val.
-encode_pubsub_event_item_attr_publisher(undefined,
- _acc) ->
+encode_pubsub_event_item_attr_publisher(<<>>, _acc) ->
_acc;
encode_pubsub_event_item_attr_publisher(_val, _acc) ->
[{<<"publisher">>, _val} | _acc].
[{<<"node">>, _val} | _acc].
decode_pubsub_items_attr_subid(__TopXMLNS, undefined) ->
- undefined;
+ <<>>;
decode_pubsub_items_attr_subid(__TopXMLNS, _val) ->
_val.
-encode_pubsub_items_attr_subid(undefined, _acc) -> _acc;
+encode_pubsub_items_attr_subid(<<>>, _acc) -> _acc;
encode_pubsub_items_attr_subid(_val, _acc) ->
[{<<"subid">>, _val} | _acc].
{xmlel, <<"item">>, _attrs, _els}.
decode_pubsub_item_attr_id(__TopXMLNS, undefined) ->
- undefined;
+ <<>>;
decode_pubsub_item_attr_id(__TopXMLNS, _val) -> _val.
-encode_pubsub_item_attr_id(undefined, _acc) -> _acc;
+encode_pubsub_item_attr_id(<<>>, _acc) -> _acc;
encode_pubsub_item_attr_id(_val, _acc) ->
[{<<"id">>, _val} | _acc].
decode_pubsub_subscription_attr_node(__TopXMLNS,
undefined) ->
- undefined;
+ <<>>;
decode_pubsub_subscription_attr_node(__TopXMLNS,
_val) ->
_val.
-encode_pubsub_subscription_attr_node(undefined, _acc) ->
+encode_pubsub_subscription_attr_node(<<>>, _acc) ->
_acc;
encode_pubsub_subscription_attr_node(_val, _acc) ->
[{<<"node">>, _val} | _acc].
decode_pubsub_subscription_attr_subid(__TopXMLNS,
undefined) ->
- undefined;
+ <<>>;
decode_pubsub_subscription_attr_subid(__TopXMLNS,
_val) ->
_val.
-encode_pubsub_subscription_attr_subid(undefined,
- _acc) ->
+encode_pubsub_subscription_attr_subid(<<>>, _acc) ->
_acc;
encode_pubsub_subscription_attr_subid(_val, _acc) ->
[{<<"subid">>, _val} | _acc].
<<"">> when __TopXMLNS == <<"jabber:x:data">> ->
decode_xdata_els(__TopXMLNS, __IgnoreEls, _els, Fields,
Items,
- case decode_xdata_instructions(__TopXMLNS,
- __IgnoreEls, _el)
- of
- undefined -> Instructions;
- _new_el -> [_new_el | Instructions]
- end,
+ [decode_xdata_instructions(__TopXMLNS, __IgnoreEls,
+ _el)
+ | Instructions],
Reported, Title);
<<"jabber:x:data">> ->
decode_xdata_els(__TopXMLNS, __IgnoreEls, _els, Fields,
Items,
- case decode_xdata_instructions(<<"jabber:x:data">>,
- __IgnoreEls, _el)
- of
- undefined -> Instructions;
- _new_el -> [_new_el | Instructions]
- end,
+ [decode_xdata_instructions(<<"jabber:x:data">>,
+ __IgnoreEls, _el)
+ | Instructions],
Reported, Title);
_ ->
decode_xdata_els(__TopXMLNS, __IgnoreEls, _els, Fields,
_attrs = _xmlns_attrs,
{xmlel, <<"title">>, _attrs, _els}.
-decode_xdata_title_cdata(__TopXMLNS, <<>>) -> undefined;
+decode_xdata_title_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_xdata_title_cdata(__TopXMLNS, _val) -> _val.
-encode_xdata_title_cdata(undefined, _acc) -> _acc;
+encode_xdata_title_cdata(<<>>, _acc) -> _acc;
encode_xdata_title_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
{xmlel, <<"instructions">>, _attrs, _els}.
decode_xdata_instructions_cdata(__TopXMLNS, <<>>) ->
- undefined;
+ <<>>;
decode_xdata_instructions_cdata(__TopXMLNS, _val) ->
_val.
-encode_xdata_instructions_cdata(undefined, _acc) ->
- _acc;
+encode_xdata_instructions_cdata(<<>>, _acc) -> _acc;
encode_xdata_instructions_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
<<"">> when __TopXMLNS == <<"jabber:x:data">> ->
decode_xdata_field_els(__TopXMLNS, __IgnoreEls, _els,
Options,
- case decode_xdata_field_value(__TopXMLNS,
- __IgnoreEls, _el)
- of
- undefined -> Values;
- _new_el -> [_new_el | Values]
- end,
+ [decode_xdata_field_value(__TopXMLNS,
+ __IgnoreEls, _el)
+ | Values],
Desc, Required, __Els);
<<"jabber:x:data">> ->
decode_xdata_field_els(__TopXMLNS, __IgnoreEls, _els,
Options,
- case
- decode_xdata_field_value(<<"jabber:x:data">>,
- __IgnoreEls, _el)
- of
- undefined -> Values;
- _new_el -> [_new_el | Values]
- end,
+ [decode_xdata_field_value(<<"jabber:x:data">>,
+ __IgnoreEls, _el)
+ | Values],
Desc, Required, __Els);
_ ->
decode_xdata_field_els(__TopXMLNS, __IgnoreEls, _els,
[encode_xdata_field_required(Required, []) | _acc].
decode_xdata_field_attr_label(__TopXMLNS, undefined) ->
- undefined;
+ <<>>;
decode_xdata_field_attr_label(__TopXMLNS, _val) -> _val.
-encode_xdata_field_attr_label(undefined, _acc) -> _acc;
+encode_xdata_field_attr_label(<<>>, _acc) -> _acc;
encode_xdata_field_attr_label(_val, _acc) ->
[{<<"label">>, _val} | _acc].
[{<<"type">>, enc_enum(_val)} | _acc].
decode_xdata_field_attr_var(__TopXMLNS, undefined) ->
- undefined;
+ <<>>;
decode_xdata_field_attr_var(__TopXMLNS, _val) -> _val.
-encode_xdata_field_attr_var(undefined, _acc) -> _acc;
+encode_xdata_field_attr_var(<<>>, _acc) -> _acc;
encode_xdata_field_attr_var(_val, _acc) ->
[{<<"var">>, _val} | _acc].
decode_xdata_field_option_attr_label(__TopXMLNS,
undefined) ->
- undefined;
+ <<>>;
decode_xdata_field_option_attr_label(__TopXMLNS,
_val) ->
_val.
-encode_xdata_field_option_attr_label(undefined, _acc) ->
+encode_xdata_field_option_attr_label(<<>>, _acc) ->
_acc;
encode_xdata_field_option_attr_label(_val, _acc) ->
[{<<"label">>, _val} | _acc].
{xmlel, <<"value">>, _attrs, _els}.
decode_xdata_field_value_cdata(__TopXMLNS, <<>>) ->
- undefined;
+ <<>>;
decode_xdata_field_value_cdata(__TopXMLNS, _val) ->
_val.
-encode_xdata_field_value_cdata(undefined, _acc) -> _acc;
+encode_xdata_field_value_cdata(<<>>, _acc) -> _acc;
encode_xdata_field_value_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"desc">>, _attrs, _els}.
-decode_xdata_field_desc_cdata(__TopXMLNS, <<>>) ->
- undefined;
+decode_xdata_field_desc_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_xdata_field_desc_cdata(__TopXMLNS, _val) -> _val.
-encode_xdata_field_desc_cdata(undefined, _acc) -> _acc;
+encode_xdata_field_desc_cdata(<<>>, _acc) -> _acc;
encode_xdata_field_desc_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
{xmlel, <<"x">>, _attrs, _els}) ->
Hash = decode_vcard_xupdate_els(__TopXMLNS, __IgnoreEls,
_els, undefined),
- {vcard_xupdate, undefined, Hash}.
+ {vcard_xupdate, {<<>>, <<>>}, Hash}.
decode_vcard_xupdate_els(__TopXMLNS, __IgnoreEls, [],
Hash) ->
decode_vcard_xupdate_els(__TopXMLNS, __IgnoreEls, _els,
Hash).
-encode_vcard_xupdate({vcard_xupdate, undefined, Hash},
+encode_vcard_xupdate({vcard_xupdate, _, Hash},
_xmlns_attrs) ->
_els = lists:reverse('encode_vcard_xupdate_$hash'(Hash,
[])),
{xmlel, <<"photo">>, _attrs, _els}.
decode_vcard_xupdate_photo_cdata(__TopXMLNS, <<>>) ->
- undefined;
+ <<>>;
decode_vcard_xupdate_photo_cdata(__TopXMLNS, _val) ->
_val.
-encode_vcard_xupdate_photo_cdata(undefined, _acc) ->
- _acc;
+encode_vcard_xupdate_photo_cdata(<<>>, _acc) -> _acc;
encode_vcard_xupdate_photo_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
<<"">> when __TopXMLNS == <<"vcard-temp">> ->
decode_vcard_CATEGORIES_els(__TopXMLNS, __IgnoreEls,
_els,
- case decode_vcard_KEYWORD(__TopXMLNS,
- __IgnoreEls,
- _el)
- of
- undefined -> Keywords;
- _new_el -> [_new_el | Keywords]
- end);
+ [decode_vcard_KEYWORD(__TopXMLNS,
+ __IgnoreEls, _el)
+ | Keywords]);
<<"vcard-temp">> ->
decode_vcard_CATEGORIES_els(__TopXMLNS, __IgnoreEls,
_els,
- case
- decode_vcard_KEYWORD(<<"vcard-temp">>,
- __IgnoreEls, _el)
- of
- undefined -> Keywords;
- _new_el -> [_new_el | Keywords]
- end);
+ [decode_vcard_KEYWORD(<<"vcard-temp">>,
+ __IgnoreEls, _el)
+ | Keywords]);
_ ->
decode_vcard_CATEGORIES_els(__TopXMLNS, __IgnoreEls,
_els, Keywords)
case get_attr(<<"xmlns">>, _attrs) of
<<"">> when __TopXMLNS == <<"vcard-temp">> ->
decode_vcard_ORG_els(__TopXMLNS, __IgnoreEls, _els,
- case decode_vcard_ORGUNIT(__TopXMLNS,
- __IgnoreEls, _el)
- of
- undefined -> Units;
- _new_el -> [_new_el | Units]
- end,
+ [decode_vcard_ORGUNIT(__TopXMLNS, __IgnoreEls,
+ _el)
+ | Units],
Name);
<<"vcard-temp">> ->
decode_vcard_ORG_els(__TopXMLNS, __IgnoreEls, _els,
- case decode_vcard_ORGUNIT(<<"vcard-temp">>,
- __IgnoreEls, _el)
- of
- undefined -> Units;
- _new_el -> [_new_el | Units]
- end,
+ [decode_vcard_ORGUNIT(<<"vcard-temp">>,
+ __IgnoreEls, _el)
+ | Units],
Name);
_ ->
decode_vcard_ORG_els(__TopXMLNS, __IgnoreEls, _els,
_attrs = _xmlns_attrs,
{xmlel, <<"BINVAL">>, _attrs, _els}.
-decode_vcard_BINVAL_cdata(__TopXMLNS, <<>>) ->
- undefined;
+decode_vcard_BINVAL_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_vcard_BINVAL_cdata(__TopXMLNS, _val) ->
case catch base64:decode(_val) of
{'EXIT', _} ->
_res -> _res
end.
-encode_vcard_BINVAL_cdata(undefined, _acc) -> _acc;
+encode_vcard_BINVAL_cdata(<<>>, _acc) -> _acc;
encode_vcard_BINVAL_cdata(_val, _acc) ->
[{xmlcdata, base64:encode(_val)} | _acc].
case get_attr(<<"xmlns">>, _attrs) of
<<"">> when __TopXMLNS == <<"vcard-temp">> ->
decode_vcard_LABEL_els(__TopXMLNS, __IgnoreEls, _els,
- case decode_vcard_LINE(__TopXMLNS, __IgnoreEls,
- _el)
- of
- undefined -> Line;
- _new_el -> [_new_el | Line]
- end,
+ [decode_vcard_LINE(__TopXMLNS, __IgnoreEls,
+ _el)
+ | Line],
Home, Pref, Work, Intl, Parcel, Postal, Dom);
<<"vcard-temp">> ->
decode_vcard_LABEL_els(__TopXMLNS, __IgnoreEls, _els,
- case decode_vcard_LINE(<<"vcard-temp">>,
- __IgnoreEls, _el)
- of
- undefined -> Line;
- _new_el -> [_new_el | Line]
- end,
+ [decode_vcard_LINE(<<"vcard-temp">>,
+ __IgnoreEls, _el)
+ | Line],
Home, Pref, Work, Intl, Parcel, Postal, Dom);
_ ->
decode_vcard_LABEL_els(__TopXMLNS, __IgnoreEls, _els,
_attrs = _xmlns_attrs,
{xmlel, <<"EXTVAL">>, _attrs, _els}.
-decode_vcard_EXTVAL_cdata(__TopXMLNS, <<>>) ->
- undefined;
+decode_vcard_EXTVAL_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_vcard_EXTVAL_cdata(__TopXMLNS, _val) -> _val.
-encode_vcard_EXTVAL_cdata(undefined, _acc) -> _acc;
+encode_vcard_EXTVAL_cdata(<<>>, _acc) -> _acc;
encode_vcard_EXTVAL_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"TYPE">>, _attrs, _els}.
-decode_vcard_TYPE_cdata(__TopXMLNS, <<>>) -> undefined;
+decode_vcard_TYPE_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_vcard_TYPE_cdata(__TopXMLNS, _val) -> _val.
-encode_vcard_TYPE_cdata(undefined, _acc) -> _acc;
+encode_vcard_TYPE_cdata(<<>>, _acc) -> _acc;
encode_vcard_TYPE_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"DESC">>, _attrs, _els}.
-decode_vcard_DESC_cdata(__TopXMLNS, <<>>) -> undefined;
+decode_vcard_DESC_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_vcard_DESC_cdata(__TopXMLNS, _val) -> _val.
-encode_vcard_DESC_cdata(undefined, _acc) -> _acc;
+encode_vcard_DESC_cdata(<<>>, _acc) -> _acc;
encode_vcard_DESC_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"URL">>, _attrs, _els}.
-decode_vcard_URL_cdata(__TopXMLNS, <<>>) -> undefined;
+decode_vcard_URL_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_vcard_URL_cdata(__TopXMLNS, _val) -> _val.
-encode_vcard_URL_cdata(undefined, _acc) -> _acc;
+encode_vcard_URL_cdata(<<>>, _acc) -> _acc;
encode_vcard_URL_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"UID">>, _attrs, _els}.
-decode_vcard_UID_cdata(__TopXMLNS, <<>>) -> undefined;
+decode_vcard_UID_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_vcard_UID_cdata(__TopXMLNS, _val) -> _val.
-encode_vcard_UID_cdata(undefined, _acc) -> _acc;
+encode_vcard_UID_cdata(<<>>, _acc) -> _acc;
encode_vcard_UID_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
{xmlel, <<"SORT-STRING">>, _attrs, _els}.
decode_vcard_SORT_STRING_cdata(__TopXMLNS, <<>>) ->
- undefined;
+ <<>>;
decode_vcard_SORT_STRING_cdata(__TopXMLNS, _val) ->
_val.
-encode_vcard_SORT_STRING_cdata(undefined, _acc) -> _acc;
+encode_vcard_SORT_STRING_cdata(<<>>, _acc) -> _acc;
encode_vcard_SORT_STRING_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"REV">>, _attrs, _els}.
-decode_vcard_REV_cdata(__TopXMLNS, <<>>) -> undefined;
+decode_vcard_REV_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_vcard_REV_cdata(__TopXMLNS, _val) -> _val.
-encode_vcard_REV_cdata(undefined, _acc) -> _acc;
+encode_vcard_REV_cdata(<<>>, _acc) -> _acc;
encode_vcard_REV_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"PRODID">>, _attrs, _els}.
-decode_vcard_PRODID_cdata(__TopXMLNS, <<>>) ->
- undefined;
+decode_vcard_PRODID_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_vcard_PRODID_cdata(__TopXMLNS, _val) -> _val.
-encode_vcard_PRODID_cdata(undefined, _acc) -> _acc;
+encode_vcard_PRODID_cdata(<<>>, _acc) -> _acc;
encode_vcard_PRODID_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"NOTE">>, _attrs, _els}.
-decode_vcard_NOTE_cdata(__TopXMLNS, <<>>) -> undefined;
+decode_vcard_NOTE_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_vcard_NOTE_cdata(__TopXMLNS, _val) -> _val.
-encode_vcard_NOTE_cdata(undefined, _acc) -> _acc;
+encode_vcard_NOTE_cdata(<<>>, _acc) -> _acc;
encode_vcard_NOTE_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"KEYWORD">>, _attrs, _els}.
-decode_vcard_KEYWORD_cdata(__TopXMLNS, <<>>) ->
- undefined;
+decode_vcard_KEYWORD_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_vcard_KEYWORD_cdata(__TopXMLNS, _val) -> _val.
-encode_vcard_KEYWORD_cdata(undefined, _acc) -> _acc;
+encode_vcard_KEYWORD_cdata(<<>>, _acc) -> _acc;
encode_vcard_KEYWORD_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"ROLE">>, _attrs, _els}.
-decode_vcard_ROLE_cdata(__TopXMLNS, <<>>) -> undefined;
+decode_vcard_ROLE_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_vcard_ROLE_cdata(__TopXMLNS, _val) -> _val.
-encode_vcard_ROLE_cdata(undefined, _acc) -> _acc;
+encode_vcard_ROLE_cdata(<<>>, _acc) -> _acc;
encode_vcard_ROLE_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"TITLE">>, _attrs, _els}.
-decode_vcard_TITLE_cdata(__TopXMLNS, <<>>) -> undefined;
+decode_vcard_TITLE_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_vcard_TITLE_cdata(__TopXMLNS, _val) -> _val.
-encode_vcard_TITLE_cdata(undefined, _acc) -> _acc;
+encode_vcard_TITLE_cdata(<<>>, _acc) -> _acc;
encode_vcard_TITLE_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"TZ">>, _attrs, _els}.
-decode_vcard_TZ_cdata(__TopXMLNS, <<>>) -> undefined;
+decode_vcard_TZ_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_vcard_TZ_cdata(__TopXMLNS, _val) -> _val.
-encode_vcard_TZ_cdata(undefined, _acc) -> _acc;
+encode_vcard_TZ_cdata(<<>>, _acc) -> _acc;
encode_vcard_TZ_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"MAILER">>, _attrs, _els}.
-decode_vcard_MAILER_cdata(__TopXMLNS, <<>>) ->
- undefined;
+decode_vcard_MAILER_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_vcard_MAILER_cdata(__TopXMLNS, _val) -> _val.
-encode_vcard_MAILER_cdata(undefined, _acc) -> _acc;
+encode_vcard_MAILER_cdata(<<>>, _acc) -> _acc;
encode_vcard_MAILER_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"JABBERID">>, _attrs, _els}.
-decode_vcard_JABBERID_cdata(__TopXMLNS, <<>>) ->
- undefined;
+decode_vcard_JABBERID_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_vcard_JABBERID_cdata(__TopXMLNS, _val) -> _val.
-encode_vcard_JABBERID_cdata(undefined, _acc) -> _acc;
+encode_vcard_JABBERID_cdata(<<>>, _acc) -> _acc;
encode_vcard_JABBERID_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"BDAY">>, _attrs, _els}.
-decode_vcard_BDAY_cdata(__TopXMLNS, <<>>) -> undefined;
+decode_vcard_BDAY_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_vcard_BDAY_cdata(__TopXMLNS, _val) -> _val.
-encode_vcard_BDAY_cdata(undefined, _acc) -> _acc;
+encode_vcard_BDAY_cdata(<<>>, _acc) -> _acc;
encode_vcard_BDAY_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"NICKNAME">>, _attrs, _els}.
-decode_vcard_NICKNAME_cdata(__TopXMLNS, <<>>) ->
- undefined;
+decode_vcard_NICKNAME_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_vcard_NICKNAME_cdata(__TopXMLNS, _val) -> _val.
-encode_vcard_NICKNAME_cdata(undefined, _acc) -> _acc;
+encode_vcard_NICKNAME_cdata(<<>>, _acc) -> _acc;
encode_vcard_NICKNAME_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"FN">>, _attrs, _els}.
-decode_vcard_FN_cdata(__TopXMLNS, <<>>) -> undefined;
+decode_vcard_FN_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_vcard_FN_cdata(__TopXMLNS, _val) -> _val.
-encode_vcard_FN_cdata(undefined, _acc) -> _acc;
+encode_vcard_FN_cdata(<<>>, _acc) -> _acc;
encode_vcard_FN_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"VERSION">>, _attrs, _els}.
-decode_vcard_VERSION_cdata(__TopXMLNS, <<>>) ->
- undefined;
+decode_vcard_VERSION_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_vcard_VERSION_cdata(__TopXMLNS, _val) -> _val.
-encode_vcard_VERSION_cdata(undefined, _acc) -> _acc;
+encode_vcard_VERSION_cdata(<<>>, _acc) -> _acc;
encode_vcard_VERSION_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"CRED">>, _attrs, _els}.
-decode_vcard_CRED_cdata(__TopXMLNS, <<>>) -> undefined;
+decode_vcard_CRED_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_vcard_CRED_cdata(__TopXMLNS, _val) -> _val.
-encode_vcard_CRED_cdata(undefined, _acc) -> _acc;
+encode_vcard_CRED_cdata(<<>>, _acc) -> _acc;
encode_vcard_CRED_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"PHONETIC">>, _attrs, _els}.
-decode_vcard_PHONETIC_cdata(__TopXMLNS, <<>>) ->
- undefined;
+decode_vcard_PHONETIC_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_vcard_PHONETIC_cdata(__TopXMLNS, _val) -> _val.
-encode_vcard_PHONETIC_cdata(undefined, _acc) -> _acc;
+encode_vcard_PHONETIC_cdata(<<>>, _acc) -> _acc;
encode_vcard_PHONETIC_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"ORGUNIT">>, _attrs, _els}.
-decode_vcard_ORGUNIT_cdata(__TopXMLNS, <<>>) ->
- undefined;
+decode_vcard_ORGUNIT_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_vcard_ORGUNIT_cdata(__TopXMLNS, _val) -> _val.
-encode_vcard_ORGUNIT_cdata(undefined, _acc) -> _acc;
+encode_vcard_ORGUNIT_cdata(<<>>, _acc) -> _acc;
encode_vcard_ORGUNIT_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"ORGNAME">>, _attrs, _els}.
-decode_vcard_ORGNAME_cdata(__TopXMLNS, <<>>) ->
- undefined;
+decode_vcard_ORGNAME_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_vcard_ORGNAME_cdata(__TopXMLNS, _val) -> _val.
-encode_vcard_ORGNAME_cdata(undefined, _acc) -> _acc;
+encode_vcard_ORGNAME_cdata(<<>>, _acc) -> _acc;
encode_vcard_ORGNAME_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"LON">>, _attrs, _els}.
-decode_vcard_LON_cdata(__TopXMLNS, <<>>) -> undefined;
+decode_vcard_LON_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_vcard_LON_cdata(__TopXMLNS, _val) -> _val.
-encode_vcard_LON_cdata(undefined, _acc) -> _acc;
+encode_vcard_LON_cdata(<<>>, _acc) -> _acc;
encode_vcard_LON_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"LAT">>, _attrs, _els}.
-decode_vcard_LAT_cdata(__TopXMLNS, <<>>) -> undefined;
+decode_vcard_LAT_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_vcard_LAT_cdata(__TopXMLNS, _val) -> _val.
-encode_vcard_LAT_cdata(undefined, _acc) -> _acc;
+encode_vcard_LAT_cdata(<<>>, _acc) -> _acc;
encode_vcard_LAT_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"USERID">>, _attrs, _els}.
-decode_vcard_USERID_cdata(__TopXMLNS, <<>>) ->
- undefined;
+decode_vcard_USERID_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_vcard_USERID_cdata(__TopXMLNS, _val) -> _val.
-encode_vcard_USERID_cdata(undefined, _acc) -> _acc;
+encode_vcard_USERID_cdata(<<>>, _acc) -> _acc;
encode_vcard_USERID_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"NUMBER">>, _attrs, _els}.
-decode_vcard_NUMBER_cdata(__TopXMLNS, <<>>) ->
- undefined;
+decode_vcard_NUMBER_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_vcard_NUMBER_cdata(__TopXMLNS, _val) -> _val.
-encode_vcard_NUMBER_cdata(undefined, _acc) -> _acc;
+encode_vcard_NUMBER_cdata(<<>>, _acc) -> _acc;
encode_vcard_NUMBER_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"LINE">>, _attrs, _els}.
-decode_vcard_LINE_cdata(__TopXMLNS, <<>>) -> undefined;
+decode_vcard_LINE_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_vcard_LINE_cdata(__TopXMLNS, _val) -> _val.
-encode_vcard_LINE_cdata(undefined, _acc) -> _acc;
+encode_vcard_LINE_cdata(<<>>, _acc) -> _acc;
encode_vcard_LINE_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"CTRY">>, _attrs, _els}.
-decode_vcard_CTRY_cdata(__TopXMLNS, <<>>) -> undefined;
+decode_vcard_CTRY_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_vcard_CTRY_cdata(__TopXMLNS, _val) -> _val.
-encode_vcard_CTRY_cdata(undefined, _acc) -> _acc;
+encode_vcard_CTRY_cdata(<<>>, _acc) -> _acc;
encode_vcard_CTRY_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"PCODE">>, _attrs, _els}.
-decode_vcard_PCODE_cdata(__TopXMLNS, <<>>) -> undefined;
+decode_vcard_PCODE_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_vcard_PCODE_cdata(__TopXMLNS, _val) -> _val.
-encode_vcard_PCODE_cdata(undefined, _acc) -> _acc;
+encode_vcard_PCODE_cdata(<<>>, _acc) -> _acc;
encode_vcard_PCODE_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"REGION">>, _attrs, _els}.
-decode_vcard_REGION_cdata(__TopXMLNS, <<>>) ->
- undefined;
+decode_vcard_REGION_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_vcard_REGION_cdata(__TopXMLNS, _val) -> _val.
-encode_vcard_REGION_cdata(undefined, _acc) -> _acc;
+encode_vcard_REGION_cdata(<<>>, _acc) -> _acc;
encode_vcard_REGION_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"LOCALITY">>, _attrs, _els}.
-decode_vcard_LOCALITY_cdata(__TopXMLNS, <<>>) ->
- undefined;
+decode_vcard_LOCALITY_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_vcard_LOCALITY_cdata(__TopXMLNS, _val) -> _val.
-encode_vcard_LOCALITY_cdata(undefined, _acc) -> _acc;
+encode_vcard_LOCALITY_cdata(<<>>, _acc) -> _acc;
encode_vcard_LOCALITY_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"STREET">>, _attrs, _els}.
-decode_vcard_STREET_cdata(__TopXMLNS, <<>>) ->
- undefined;
+decode_vcard_STREET_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_vcard_STREET_cdata(__TopXMLNS, _val) -> _val.
-encode_vcard_STREET_cdata(undefined, _acc) -> _acc;
+encode_vcard_STREET_cdata(<<>>, _acc) -> _acc;
encode_vcard_STREET_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"EXTADD">>, _attrs, _els}.
-decode_vcard_EXTADD_cdata(__TopXMLNS, <<>>) ->
- undefined;
+decode_vcard_EXTADD_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_vcard_EXTADD_cdata(__TopXMLNS, _val) -> _val.
-encode_vcard_EXTADD_cdata(undefined, _acc) -> _acc;
+encode_vcard_EXTADD_cdata(<<>>, _acc) -> _acc;
encode_vcard_EXTADD_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"POBOX">>, _attrs, _els}.
-decode_vcard_POBOX_cdata(__TopXMLNS, <<>>) -> undefined;
+decode_vcard_POBOX_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_vcard_POBOX_cdata(__TopXMLNS, _val) -> _val.
-encode_vcard_POBOX_cdata(undefined, _acc) -> _acc;
+encode_vcard_POBOX_cdata(<<>>, _acc) -> _acc;
encode_vcard_POBOX_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"SUFFIX">>, _attrs, _els}.
-decode_vcard_SUFFIX_cdata(__TopXMLNS, <<>>) ->
- undefined;
+decode_vcard_SUFFIX_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_vcard_SUFFIX_cdata(__TopXMLNS, _val) -> _val.
-encode_vcard_SUFFIX_cdata(undefined, _acc) -> _acc;
+encode_vcard_SUFFIX_cdata(<<>>, _acc) -> _acc;
encode_vcard_SUFFIX_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"PREFIX">>, _attrs, _els}.
-decode_vcard_PREFIX_cdata(__TopXMLNS, <<>>) ->
- undefined;
+decode_vcard_PREFIX_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_vcard_PREFIX_cdata(__TopXMLNS, _val) -> _val.
-encode_vcard_PREFIX_cdata(undefined, _acc) -> _acc;
+encode_vcard_PREFIX_cdata(<<>>, _acc) -> _acc;
encode_vcard_PREFIX_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"MIDDLE">>, _attrs, _els}.
-decode_vcard_MIDDLE_cdata(__TopXMLNS, <<>>) ->
- undefined;
+decode_vcard_MIDDLE_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_vcard_MIDDLE_cdata(__TopXMLNS, _val) -> _val.
-encode_vcard_MIDDLE_cdata(undefined, _acc) -> _acc;
+encode_vcard_MIDDLE_cdata(<<>>, _acc) -> _acc;
encode_vcard_MIDDLE_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"GIVEN">>, _attrs, _els}.
-decode_vcard_GIVEN_cdata(__TopXMLNS, <<>>) -> undefined;
+decode_vcard_GIVEN_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_vcard_GIVEN_cdata(__TopXMLNS, _val) -> _val.
-encode_vcard_GIVEN_cdata(undefined, _acc) -> _acc;
+encode_vcard_GIVEN_cdata(<<>>, _acc) -> _acc;
encode_vcard_GIVEN_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"FAMILY">>, _attrs, _els}.
-decode_vcard_FAMILY_cdata(__TopXMLNS, <<>>) ->
- undefined;
+decode_vcard_FAMILY_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_vcard_FAMILY_cdata(__TopXMLNS, _val) -> _val.
-encode_vcard_FAMILY_cdata(undefined, _acc) -> _acc;
+encode_vcard_FAMILY_cdata(<<>>, _acc) -> _acc;
encode_vcard_FAMILY_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
__TopXMLNS}});
decode_stream_error_see_other_host_cdata(__TopXMLNS,
_val) ->
- _val.
+ case catch dec_host_port(_val) of
+ {'EXIT', _} ->
+ erlang:error({xmpp_codec,
+ {bad_cdata_value, <<>>, <<"see-other-host">>,
+ __TopXMLNS}});
+ _res -> _res
+ end.
encode_stream_error_see_other_host_cdata(_val, _acc) ->
- [{xmlcdata, _val} | _acc].
+ [{xmlcdata, enc_host_port(_val)} | _acc].
decode_stream_error_restricted_xml(__TopXMLNS,
__IgnoreEls,
'decode_stream_error_text_attr_xml:lang'(__TopXMLNS,
undefined) ->
- undefined;
+ <<>>;
'decode_stream_error_text_attr_xml:lang'(__TopXMLNS,
_val) ->
_val.
-'encode_stream_error_text_attr_xml:lang'(undefined,
- _acc) ->
+'encode_stream_error_text_attr_xml:lang'(<<>>, _acc) ->
_acc;
'encode_stream_error_text_attr_xml:lang'(_val, _acc) ->
[{<<"xml:lang">>, _val} | _acc].
decode_stream_error_text_cdata(__TopXMLNS, <<>>) ->
- undefined;
+ <<>>;
decode_stream_error_text_cdata(__TopXMLNS, _val) ->
_val.
-encode_stream_error_text_cdata(undefined, _acc) -> _acc;
+encode_stream_error_text_cdata(<<>>, _acc) -> _acc;
encode_stream_error_text_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"key">>, _attrs, _els}.
-decode_register_key_cdata(__TopXMLNS, <<>>) -> none;
+decode_register_key_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_register_key_cdata(__TopXMLNS, _val) -> _val.
-encode_register_key_cdata(none, _acc) -> _acc;
+encode_register_key_cdata(<<>>, _acc) -> _acc;
encode_register_key_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"text">>, _attrs, _els}.
-decode_register_text_cdata(__TopXMLNS, <<>>) -> none;
+decode_register_text_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_register_text_cdata(__TopXMLNS, _val) -> _val.
-encode_register_text_cdata(none, _acc) -> _acc;
+encode_register_text_cdata(<<>>, _acc) -> _acc;
encode_register_text_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"misc">>, _attrs, _els}.
-decode_register_misc_cdata(__TopXMLNS, <<>>) -> none;
+decode_register_misc_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_register_misc_cdata(__TopXMLNS, _val) -> _val.
-encode_register_misc_cdata(none, _acc) -> _acc;
+encode_register_misc_cdata(<<>>, _acc) -> _acc;
encode_register_misc_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"date">>, _attrs, _els}.
-decode_register_date_cdata(__TopXMLNS, <<>>) -> none;
+decode_register_date_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_register_date_cdata(__TopXMLNS, _val) -> _val.
-encode_register_date_cdata(none, _acc) -> _acc;
+encode_register_date_cdata(<<>>, _acc) -> _acc;
encode_register_date_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"url">>, _attrs, _els}.
-decode_register_url_cdata(__TopXMLNS, <<>>) -> none;
+decode_register_url_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_register_url_cdata(__TopXMLNS, _val) -> _val.
-encode_register_url_cdata(none, _acc) -> _acc;
+encode_register_url_cdata(<<>>, _acc) -> _acc;
encode_register_url_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"phone">>, _attrs, _els}.
-decode_register_phone_cdata(__TopXMLNS, <<>>) -> none;
+decode_register_phone_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_register_phone_cdata(__TopXMLNS, _val) -> _val.
-encode_register_phone_cdata(none, _acc) -> _acc;
+encode_register_phone_cdata(<<>>, _acc) -> _acc;
encode_register_phone_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"zip">>, _attrs, _els}.
-decode_register_zip_cdata(__TopXMLNS, <<>>) -> none;
+decode_register_zip_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_register_zip_cdata(__TopXMLNS, _val) -> _val.
-encode_register_zip_cdata(none, _acc) -> _acc;
+encode_register_zip_cdata(<<>>, _acc) -> _acc;
encode_register_zip_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"state">>, _attrs, _els}.
-decode_register_state_cdata(__TopXMLNS, <<>>) -> none;
+decode_register_state_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_register_state_cdata(__TopXMLNS, _val) -> _val.
-encode_register_state_cdata(none, _acc) -> _acc;
+encode_register_state_cdata(<<>>, _acc) -> _acc;
encode_register_state_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"city">>, _attrs, _els}.
-decode_register_city_cdata(__TopXMLNS, <<>>) -> none;
+decode_register_city_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_register_city_cdata(__TopXMLNS, _val) -> _val.
-encode_register_city_cdata(none, _acc) -> _acc;
+encode_register_city_cdata(<<>>, _acc) -> _acc;
encode_register_city_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"address">>, _attrs, _els}.
-decode_register_address_cdata(__TopXMLNS, <<>>) -> none;
+decode_register_address_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_register_address_cdata(__TopXMLNS, _val) -> _val.
-encode_register_address_cdata(none, _acc) -> _acc;
+encode_register_address_cdata(<<>>, _acc) -> _acc;
encode_register_address_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"email">>, _attrs, _els}.
-decode_register_email_cdata(__TopXMLNS, <<>>) -> none;
+decode_register_email_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_register_email_cdata(__TopXMLNS, _val) -> _val.
-encode_register_email_cdata(none, _acc) -> _acc;
+encode_register_email_cdata(<<>>, _acc) -> _acc;
encode_register_email_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"last">>, _attrs, _els}.
-decode_register_last_cdata(__TopXMLNS, <<>>) -> none;
+decode_register_last_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_register_last_cdata(__TopXMLNS, _val) -> _val.
-encode_register_last_cdata(none, _acc) -> _acc;
+encode_register_last_cdata(<<>>, _acc) -> _acc;
encode_register_last_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"first">>, _attrs, _els}.
-decode_register_first_cdata(__TopXMLNS, <<>>) -> none;
+decode_register_first_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_register_first_cdata(__TopXMLNS, _val) -> _val.
-encode_register_first_cdata(none, _acc) -> _acc;
+encode_register_first_cdata(<<>>, _acc) -> _acc;
encode_register_first_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"name">>, _attrs, _els}.
-decode_register_name_cdata(__TopXMLNS, <<>>) -> none;
+decode_register_name_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_register_name_cdata(__TopXMLNS, _val) -> _val.
-encode_register_name_cdata(none, _acc) -> _acc;
+encode_register_name_cdata(<<>>, _acc) -> _acc;
encode_register_name_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
{xmlel, <<"password">>, _attrs, _els}.
decode_register_password_cdata(__TopXMLNS, <<>>) ->
- none;
+ <<>>;
decode_register_password_cdata(__TopXMLNS, _val) ->
_val.
-encode_register_password_cdata(none, _acc) -> _acc;
+encode_register_password_cdata(<<>>, _acc) -> _acc;
encode_register_password_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"nick">>, _attrs, _els}.
-decode_register_nick_cdata(__TopXMLNS, <<>>) -> none;
+decode_register_nick_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_register_nick_cdata(__TopXMLNS, _val) -> _val.
-encode_register_nick_cdata(none, _acc) -> _acc;
+encode_register_nick_cdata(<<>>, _acc) -> _acc;
encode_register_nick_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
{xmlel, <<"username">>, _attrs, _els}.
decode_register_username_cdata(__TopXMLNS, <<>>) ->
- none;
+ <<>>;
decode_register_username_cdata(__TopXMLNS, _val) ->
_val.
-encode_register_username_cdata(none, _acc) -> _acc;
+encode_register_username_cdata(<<>>, _acc) -> _acc;
encode_register_username_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
{xmlel, <<"instructions">>, _attrs, _els}.
decode_register_instructions_cdata(__TopXMLNS, <<>>) ->
- undefined;
+ <<>>;
decode_register_instructions_cdata(__TopXMLNS, _val) ->
_val.
-encode_register_instructions_cdata(undefined, _acc) ->
- _acc;
+encode_register_instructions_cdata(<<>>, _acc) -> _acc;
encode_register_instructions_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_xmlns_attrs)))),
{xmlel, <<"c">>, _attrs, _els}.
-decode_caps_attr_hash(__TopXMLNS, undefined) ->
- undefined;
+decode_caps_attr_hash(__TopXMLNS, undefined) -> <<>>;
decode_caps_attr_hash(__TopXMLNS, _val) -> _val.
-encode_caps_attr_hash(undefined, _acc) -> _acc;
+encode_caps_attr_hash(<<>>, _acc) -> _acc;
encode_caps_attr_hash(_val, _acc) ->
[{<<"hash">>, _val} | _acc].
-decode_caps_attr_node(__TopXMLNS, undefined) ->
- undefined;
+decode_caps_attr_node(__TopXMLNS, undefined) -> <<>>;
decode_caps_attr_node(__TopXMLNS, _val) -> _val.
-encode_caps_attr_node(undefined, _acc) -> _acc;
+encode_caps_attr_node(<<>>, _acc) -> _acc;
encode_caps_attr_node(_val, _acc) ->
[{<<"node">>, _val} | _acc].
encode_caps_attr_ext(_val, _acc) ->
[{<<"ext">>, join(_val, 32)} | _acc].
-decode_caps_attr_ver(__TopXMLNS, undefined) ->
- undefined;
+decode_caps_attr_ver(__TopXMLNS, undefined) -> <<>>;
decode_caps_attr_ver(__TopXMLNS, _val) -> _val.
-encode_caps_attr_ver(undefined, _acc) -> _acc;
+encode_caps_attr_ver(<<>>, _acc) -> _acc;
encode_caps_attr_ver(_val, _acc) ->
[{<<"ver">>, _val} | _acc].
when __TopXMLNS ==
<<"http://jabber.org/features/compress">> ->
decode_compression_els(__TopXMLNS, __IgnoreEls, _els,
- case decode_compression_method(__TopXMLNS,
- __IgnoreEls,
- _el)
- of
- undefined -> Methods;
- _new_el -> [_new_el | Methods]
- end);
+ [decode_compression_method(__TopXMLNS,
+ __IgnoreEls, _el)
+ | Methods]);
<<"http://jabber.org/features/compress">> ->
decode_compression_els(__TopXMLNS, __IgnoreEls, _els,
- case
- decode_compression_method(<<"http://jabber.org/features/compress">>,
- __IgnoreEls, _el)
- of
- undefined -> Methods;
- _new_el -> [_new_el | Methods]
- end);
+ [decode_compression_method(<<"http://jabber.org/features/compress">>,
+ __IgnoreEls, _el)
+ | Methods]);
_ ->
decode_compression_els(__TopXMLNS, __IgnoreEls, _els,
Methods)
{xmlel, <<"method">>, _attrs, _els}.
decode_compression_method_cdata(__TopXMLNS, <<>>) ->
- undefined;
+ <<>>;
decode_compression_method_cdata(__TopXMLNS, _val) ->
_val.
-encode_compression_method_cdata(undefined, _acc) ->
- _acc;
+encode_compression_method_cdata(<<>>, _acc) -> _acc;
encode_compression_method_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
when __TopXMLNS ==
<<"http://jabber.org/protocol/compress">> ->
decode_compress_els(__TopXMLNS, __IgnoreEls, _els,
- case decode_compress_method(__TopXMLNS,
- __IgnoreEls, _el)
- of
- undefined -> Methods;
- _new_el -> [_new_el | Methods]
- end);
+ [decode_compress_method(__TopXMLNS, __IgnoreEls,
+ _el)
+ | Methods]);
<<"http://jabber.org/protocol/compress">> ->
decode_compress_els(__TopXMLNS, __IgnoreEls, _els,
- case
- decode_compress_method(<<"http://jabber.org/protocol/compress">>,
- __IgnoreEls, _el)
- of
- undefined -> Methods;
- _new_el -> [_new_el | Methods]
- end);
+ [decode_compress_method(<<"http://jabber.org/protocol/compress">>,
+ __IgnoreEls, _el)
+ | Methods]);
_ ->
decode_compress_els(__TopXMLNS, __IgnoreEls, _els,
Methods)
_attrs = _xmlns_attrs,
{xmlel, <<"method">>, _attrs, _els}.
-decode_compress_method_cdata(__TopXMLNS, <<>>) ->
- undefined;
+decode_compress_method_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_compress_method_cdata(__TopXMLNS, _val) -> _val.
-encode_compress_method_cdata(undefined, _acc) -> _acc;
+encode_compress_method_cdata(<<>>, _acc) -> _acc;
encode_compress_method_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
<<"urn:ietf:params:xml:ns:xmpp-sasl">> ->
decode_sasl_mechanisms_els(__TopXMLNS, __IgnoreEls,
_els,
- case decode_sasl_mechanism(__TopXMLNS,
- __IgnoreEls,
- _el)
- of
- undefined -> List;
- _new_el -> [_new_el | List]
- end);
+ [decode_sasl_mechanism(__TopXMLNS,
+ __IgnoreEls, _el)
+ | List]);
<<"urn:ietf:params:xml:ns:xmpp-sasl">> ->
decode_sasl_mechanisms_els(__TopXMLNS, __IgnoreEls,
_els,
- case
- decode_sasl_mechanism(<<"urn:ietf:params:xml:ns:xmpp-sasl">>,
- __IgnoreEls, _el)
- of
- undefined -> List;
- _new_el -> [_new_el | List]
- end);
+ [decode_sasl_mechanism(<<"urn:ietf:params:xml:ns:xmpp-sasl">>,
+ __IgnoreEls, _el)
+ | List]);
_ ->
decode_sasl_mechanisms_els(__TopXMLNS, __IgnoreEls,
_els, List)
_attrs = _xmlns_attrs,
{xmlel, <<"mechanism">>, _attrs, _els}.
-decode_sasl_mechanism_cdata(__TopXMLNS, <<>>) ->
- undefined;
+decode_sasl_mechanism_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_sasl_mechanism_cdata(__TopXMLNS, _val) -> _val.
-encode_sasl_mechanism_cdata(undefined, _acc) -> _acc;
+encode_sasl_mechanism_cdata(<<>>, _acc) -> _acc;
encode_sasl_mechanism_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
'decode_sasl_failure_text_attr_xml:lang'(__TopXMLNS,
undefined) ->
- undefined;
+ <<>>;
'decode_sasl_failure_text_attr_xml:lang'(__TopXMLNS,
_val) ->
_val.
-'encode_sasl_failure_text_attr_xml:lang'(undefined,
- _acc) ->
+'encode_sasl_failure_text_attr_xml:lang'(<<>>, _acc) ->
_acc;
'encode_sasl_failure_text_attr_xml:lang'(_val, _acc) ->
[{<<"xml:lang">>, _val} | _acc].
decode_sasl_failure_text_cdata(__TopXMLNS, <<>>) ->
- undefined;
+ <<>>;
decode_sasl_failure_text_cdata(__TopXMLNS, _val) ->
_val.
-encode_sasl_failure_text_cdata(undefined, _acc) -> _acc;
+encode_sasl_failure_text_cdata(<<>>, _acc) -> _acc;
encode_sasl_failure_text_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"success">>, _attrs, _els}.
-decode_sasl_success_cdata(__TopXMLNS, <<>>) ->
- undefined;
+decode_sasl_success_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_sasl_success_cdata(__TopXMLNS, _val) ->
case catch base64:decode(_val) of
{'EXIT', _} ->
_res -> _res
end.
-encode_sasl_success_cdata(undefined, _acc) -> _acc;
+encode_sasl_success_cdata(<<>>, _acc) -> _acc;
encode_sasl_success_cdata(_val, _acc) ->
[{xmlcdata, base64:encode(_val)} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"response">>, _attrs, _els}.
-decode_sasl_response_cdata(__TopXMLNS, <<>>) ->
- undefined;
+decode_sasl_response_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_sasl_response_cdata(__TopXMLNS, _val) ->
case catch base64:decode(_val) of
{'EXIT', _} ->
_res -> _res
end.
-encode_sasl_response_cdata(undefined, _acc) -> _acc;
+encode_sasl_response_cdata(<<>>, _acc) -> _acc;
encode_sasl_response_cdata(_val, _acc) ->
[{xmlcdata, base64:encode(_val)} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"challenge">>, _attrs, _els}.
-decode_sasl_challenge_cdata(__TopXMLNS, <<>>) ->
- undefined;
+decode_sasl_challenge_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_sasl_challenge_cdata(__TopXMLNS, _val) ->
case catch base64:decode(_val) of
{'EXIT', _} ->
_res -> _res
end.
-encode_sasl_challenge_cdata(undefined, _acc) -> _acc;
+encode_sasl_challenge_cdata(<<>>, _acc) -> _acc;
encode_sasl_challenge_cdata(_val, _acc) ->
[{xmlcdata, base64:encode(_val)} | _acc].
encode_sasl_auth_attr_mechanism(_val, _acc) ->
[{<<"mechanism">>, _val} | _acc].
-decode_sasl_auth_cdata(__TopXMLNS, <<>>) -> undefined;
+decode_sasl_auth_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_sasl_auth_cdata(__TopXMLNS, _val) ->
case catch base64:decode(_val) of
{'EXIT', _} ->
_res -> _res
end.
-encode_sasl_auth_cdata(undefined, _acc) -> _acc;
+encode_sasl_auth_cdata(<<>>, _acc) -> _acc;
encode_sasl_auth_cdata(_val, _acc) ->
[{xmlcdata, base64:encode(_val)} | _acc].
{xmlel, <<"resource">>, _attrs, _els}.
decode_legacy_auth_resource_cdata(__TopXMLNS, <<>>) ->
- none;
+ <<>>;
decode_legacy_auth_resource_cdata(__TopXMLNS, _val) ->
_val.
-encode_legacy_auth_resource_cdata(none, _acc) -> _acc;
+encode_legacy_auth_resource_cdata(<<>>, _acc) -> _acc;
encode_legacy_auth_resource_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
{xmlel, <<"digest">>, _attrs, _els}.
decode_legacy_auth_digest_cdata(__TopXMLNS, <<>>) ->
- none;
+ <<>>;
decode_legacy_auth_digest_cdata(__TopXMLNS, _val) ->
_val.
-encode_legacy_auth_digest_cdata(none, _acc) -> _acc;
+encode_legacy_auth_digest_cdata(<<>>, _acc) -> _acc;
encode_legacy_auth_digest_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
{xmlel, <<"password">>, _attrs, _els}.
decode_legacy_auth_password_cdata(__TopXMLNS, <<>>) ->
- none;
+ <<>>;
decode_legacy_auth_password_cdata(__TopXMLNS, _val) ->
_val.
-encode_legacy_auth_password_cdata(none, _acc) -> _acc;
+encode_legacy_auth_password_cdata(<<>>, _acc) -> _acc;
encode_legacy_auth_password_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
{xmlel, <<"username">>, _attrs, _els}.
decode_legacy_auth_username_cdata(__TopXMLNS, <<>>) ->
- none;
+ <<>>;
decode_legacy_auth_username_cdata(__TopXMLNS, _val) ->
_val.
-encode_legacy_auth_username_cdata(none, _acc) -> _acc;
+encode_legacy_auth_username_cdata(<<>>, _acc) -> _acc;
encode_legacy_auth_username_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"resource">>, _attrs, _els}.
-decode_bind_resource_cdata(__TopXMLNS, <<>>) ->
- undefined;
+decode_bind_resource_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_bind_resource_cdata(__TopXMLNS, _val) ->
case catch resourceprep(_val) of
{'EXIT', _} ->
_res -> _res
end.
-encode_bind_resource_cdata(undefined, _acc) -> _acc;
+encode_bind_resource_cdata(<<>>, _acc) -> _acc;
encode_bind_resource_cdata(_val, _acc) ->
[{xmlcdata, resourceprep(_val)} | _acc].
encode_error_attr_code(_val, _acc) ->
[{<<"code">>, enc_int(_val)} | _acc].
-decode_error_attr_by(__TopXMLNS, undefined) ->
- undefined;
+decode_error_attr_by(__TopXMLNS, undefined) -> <<>>;
decode_error_attr_by(__TopXMLNS, _val) -> _val.
-encode_error_attr_by(undefined, _acc) -> _acc;
+encode_error_attr_by(<<>>, _acc) -> _acc;
encode_error_attr_by(_val, _acc) ->
[{<<"by">>, _val} | _acc].
'decode_error_text_attr_xml:lang'(__TopXMLNS,
undefined) ->
- undefined;
+ <<>>;
'decode_error_text_attr_xml:lang'(__TopXMLNS, _val) ->
_val.
-'encode_error_text_attr_xml:lang'(undefined, _acc) ->
- _acc;
+'encode_error_text_attr_xml:lang'(<<>>, _acc) -> _acc;
'encode_error_text_attr_xml:lang'(_val, _acc) ->
[{<<"xml:lang">>, _val} | _acc].
-decode_error_text_cdata(__TopXMLNS, <<>>) -> undefined;
+decode_error_text_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_error_text_cdata(__TopXMLNS, _val) -> _val.
-encode_error_text_cdata(undefined, _acc) -> _acc;
+encode_error_text_cdata(<<>>, _acc) -> _acc;
encode_error_text_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"redirect">>, _attrs, _els}.
-decode_error_redirect_cdata(__TopXMLNS, <<>>) ->
- undefined;
+decode_error_redirect_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_error_redirect_cdata(__TopXMLNS, _val) -> _val.
-encode_error_redirect_cdata(undefined, _acc) -> _acc;
+encode_error_redirect_cdata(<<>>, _acc) -> _acc;
encode_error_redirect_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"gone">>, _attrs, _els}.
-decode_error_gone_cdata(__TopXMLNS, <<>>) -> undefined;
+decode_error_gone_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_error_gone_cdata(__TopXMLNS, _val) -> _val.
-encode_error_gone_cdata(undefined, _acc) -> _acc;
+encode_error_gone_cdata(<<>>, _acc) -> _acc;
encode_error_gone_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
'encode_presence_$priority'(Priority, _acc) ->
[encode_presence_priority(Priority, []) | _acc].
-decode_presence_attr_id(__TopXMLNS, undefined) ->
- undefined;
+decode_presence_attr_id(__TopXMLNS, undefined) -> <<>>;
decode_presence_attr_id(__TopXMLNS, _val) -> _val.
-encode_presence_attr_id(undefined, _acc) -> _acc;
+encode_presence_attr_id(<<>>, _acc) -> _acc;
encode_presence_attr_id(_val, _acc) ->
[{<<"id">>, _val} | _acc].
'decode_presence_attr_xml:lang'(__TopXMLNS,
undefined) ->
- undefined;
+ <<>>;
'decode_presence_attr_xml:lang'(__TopXMLNS, _val) ->
_val.
-'encode_presence_attr_xml:lang'(undefined, _acc) ->
- _acc;
+'encode_presence_attr_xml:lang'(<<>>, _acc) -> _acc;
'encode_presence_attr_xml:lang'(_val, _acc) ->
[{<<"xml:lang">>, _val} | _acc].
'decode_presence_status_attr_xml:lang'(__TopXMLNS,
undefined) ->
- undefined;
+ <<>>;
'decode_presence_status_attr_xml:lang'(__TopXMLNS,
_val) ->
_val.
-'encode_presence_status_attr_xml:lang'(undefined,
- _acc) ->
+'encode_presence_status_attr_xml:lang'(<<>>, _acc) ->
_acc;
'encode_presence_status_attr_xml:lang'(_val, _acc) ->
[{<<"xml:lang">>, _val} | _acc].
-decode_presence_status_cdata(__TopXMLNS, <<>>) ->
- undefined;
+decode_presence_status_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_presence_status_cdata(__TopXMLNS, _val) -> _val.
-encode_presence_status_cdata(undefined, _acc) -> _acc;
+encode_presence_status_cdata(<<>>, _acc) -> _acc;
encode_presence_status_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
'encode_message_$body'(_els,
[encode_message_body(Body, []) | _acc]).
-decode_message_attr_id(__TopXMLNS, undefined) ->
- undefined;
+decode_message_attr_id(__TopXMLNS, undefined) -> <<>>;
decode_message_attr_id(__TopXMLNS, _val) -> _val.
-encode_message_attr_id(undefined, _acc) -> _acc;
+encode_message_attr_id(<<>>, _acc) -> _acc;
encode_message_attr_id(_val, _acc) ->
[{<<"id">>, _val} | _acc].
[{<<"to">>, enc_jid(_val)} | _acc].
'decode_message_attr_xml:lang'(__TopXMLNS, undefined) ->
- undefined;
+ <<>>;
'decode_message_attr_xml:lang'(__TopXMLNS, _val) ->
_val.
-'encode_message_attr_xml:lang'(undefined, _acc) -> _acc;
+'encode_message_attr_xml:lang'(<<>>, _acc) -> _acc;
'encode_message_attr_xml:lang'(_val, _acc) ->
[{<<"xml:lang">>, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"thread">>, _attrs, _els}.
-decode_message_thread_cdata(__TopXMLNS, <<>>) ->
- undefined;
+decode_message_thread_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_message_thread_cdata(__TopXMLNS, _val) -> _val.
-encode_message_thread_cdata(undefined, _acc) -> _acc;
+encode_message_thread_cdata(<<>>, _acc) -> _acc;
encode_message_thread_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
'decode_message_body_attr_xml:lang'(__TopXMLNS,
undefined) ->
- undefined;
+ <<>>;
'decode_message_body_attr_xml:lang'(__TopXMLNS, _val) ->
_val.
-'encode_message_body_attr_xml:lang'(undefined, _acc) ->
- _acc;
+'encode_message_body_attr_xml:lang'(<<>>, _acc) -> _acc;
'encode_message_body_attr_xml:lang'(_val, _acc) ->
[{<<"xml:lang">>, _val} | _acc].
-decode_message_body_cdata(__TopXMLNS, <<>>) ->
- undefined;
+decode_message_body_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_message_body_cdata(__TopXMLNS, _val) -> _val.
-encode_message_body_cdata(undefined, _acc) -> _acc;
+encode_message_body_cdata(<<>>, _acc) -> _acc;
encode_message_body_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
'decode_message_subject_attr_xml:lang'(__TopXMLNS,
undefined) ->
- undefined;
+ <<>>;
'decode_message_subject_attr_xml:lang'(__TopXMLNS,
_val) ->
_val.
-'encode_message_subject_attr_xml:lang'(undefined,
- _acc) ->
+'encode_message_subject_attr_xml:lang'(<<>>, _acc) ->
_acc;
'encode_message_subject_attr_xml:lang'(_val, _acc) ->
[{<<"xml:lang">>, _val} | _acc].
-decode_message_subject_cdata(__TopXMLNS, <<>>) ->
- undefined;
+decode_message_subject_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_message_subject_cdata(__TopXMLNS, _val) -> _val.
-encode_message_subject_cdata(undefined, _acc) -> _acc;
+encode_message_subject_cdata(<<>>, _acc) -> _acc;
encode_message_subject_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
[{<<"to">>, enc_jid(_val)} | _acc].
'decode_iq_attr_xml:lang'(__TopXMLNS, undefined) ->
- undefined;
+ <<>>;
'decode_iq_attr_xml:lang'(__TopXMLNS, _val) -> _val.
-'encode_iq_attr_xml:lang'(undefined, _acc) -> _acc;
+'encode_iq_attr_xml:lang'(<<>>, _acc) -> _acc;
'encode_iq_attr_xml:lang'(_val, _acc) ->
[{<<"xml:lang">>, _val} | _acc].
{xmlel, <<"password">>, _attrs, _els}.
decode_conference_password_cdata(__TopXMLNS, <<>>) ->
- undefined;
+ <<>>;
decode_conference_password_cdata(__TopXMLNS, _val) ->
_val.
-encode_conference_password_cdata(undefined, _acc) ->
- _acc;
+encode_conference_password_cdata(<<>>, _acc) -> _acc;
encode_conference_password_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
_attrs = _xmlns_attrs,
{xmlel, <<"nick">>, _attrs, _els}.
-decode_conference_nick_cdata(__TopXMLNS, <<>>) ->
- undefined;
+decode_conference_nick_cdata(__TopXMLNS, <<>>) -> <<>>;
decode_conference_nick_cdata(__TopXMLNS, _val) -> _val.
-encode_conference_nick_cdata(undefined, _acc) -> _acc;
+encode_conference_nick_cdata(<<>>, _acc) -> _acc;
encode_conference_nick_cdata(_val, _acc) ->
[{xmlcdata, _val} | _acc].
| _acc].
decode_disco_items_attr_node(__TopXMLNS, undefined) ->
- undefined;
+ <<>>;
decode_disco_items_attr_node(__TopXMLNS, _val) -> _val.
-encode_disco_items_attr_node(undefined, _acc) -> _acc;
+encode_disco_items_attr_node(<<>>, _acc) -> _acc;
encode_disco_items_attr_node(_val, _acc) ->
[{<<"node">>, _val} | _acc].
[{<<"jid">>, enc_jid(_val)} | _acc].
decode_disco_item_attr_name(__TopXMLNS, undefined) ->
- undefined;
+ <<>>;
decode_disco_item_attr_name(__TopXMLNS, _val) -> _val.
-encode_disco_item_attr_name(undefined, _acc) -> _acc;
+encode_disco_item_attr_name(<<>>, _acc) -> _acc;
encode_disco_item_attr_name(_val, _acc) ->
[{<<"name">>, _val} | _acc].
decode_disco_item_attr_node(__TopXMLNS, undefined) ->
- undefined;
+ <<>>;
decode_disco_item_attr_node(__TopXMLNS, _val) -> _val.
-encode_disco_item_attr_node(undefined, _acc) -> _acc;
+encode_disco_item_attr_node(<<>>, _acc) -> _acc;
encode_disco_item_attr_node(_val, _acc) ->
[{<<"node">>, _val} | _acc].
| _acc]).
decode_disco_info_attr_node(__TopXMLNS, undefined) ->
- undefined;
+ <<>>;
decode_disco_info_attr_node(__TopXMLNS, _val) -> _val.
-encode_disco_info_attr_node(undefined, _acc) -> _acc;
+encode_disco_info_attr_node(<<>>, _acc) -> _acc;
encode_disco_info_attr_node(_val, _acc) ->
[{<<"node">>, _val} | _acc].
'decode_disco_identity_attr_xml:lang'(__TopXMLNS,
undefined) ->
- undefined;
+ <<>>;
'decode_disco_identity_attr_xml:lang'(__TopXMLNS,
_val) ->
_val.
-'encode_disco_identity_attr_xml:lang'(undefined,
- _acc) ->
+'encode_disco_identity_attr_xml:lang'(<<>>, _acc) ->
_acc;
'encode_disco_identity_attr_xml:lang'(_val, _acc) ->
[{<<"xml:lang">>, _val} | _acc].
decode_disco_identity_attr_name(__TopXMLNS,
undefined) ->
- undefined;
+ <<>>;
decode_disco_identity_attr_name(__TopXMLNS, _val) ->
_val.
-encode_disco_identity_attr_name(undefined, _acc) ->
- _acc;
+encode_disco_identity_attr_name(<<>>, _acc) -> _acc;
encode_disco_identity_attr_name(_val, _acc) ->
[{<<"name">>, _val} | _acc].
case get_attr(<<"xmlns">>, _attrs) of
<<"">> when __TopXMLNS == <<"urn:xmpp:blocking">> ->
decode_block_list_els(__TopXMLNS, __IgnoreEls, _els,
- case decode_block_item(__TopXMLNS, __IgnoreEls,
- _el)
- of
- undefined -> Items;
- _new_el -> [_new_el | Items]
- end);
+ [decode_block_item(__TopXMLNS, __IgnoreEls, _el)
+ | Items]);
<<"urn:xmpp:blocking">> ->
decode_block_list_els(__TopXMLNS, __IgnoreEls, _els,
- case decode_block_item(<<"urn:xmpp:blocking">>,
- __IgnoreEls, _el)
- of
- undefined -> Items;
- _new_el -> [_new_el | Items]
- end);
+ [decode_block_item(<<"urn:xmpp:blocking">>,
+ __IgnoreEls, _el)
+ | Items]);
_ ->
decode_block_list_els(__TopXMLNS, __IgnoreEls, _els,
Items)
case get_attr(<<"xmlns">>, _attrs) of
<<"">> when __TopXMLNS == <<"urn:xmpp:blocking">> ->
decode_unblock_els(__TopXMLNS, __IgnoreEls, _els,
- case decode_block_item(__TopXMLNS, __IgnoreEls,
- _el)
- of
- undefined -> Items;
- _new_el -> [_new_el | Items]
- end);
+ [decode_block_item(__TopXMLNS, __IgnoreEls, _el)
+ | Items]);
<<"urn:xmpp:blocking">> ->
decode_unblock_els(__TopXMLNS, __IgnoreEls, _els,
- case decode_block_item(<<"urn:xmpp:blocking">>,
- __IgnoreEls, _el)
- of
- undefined -> Items;
- _new_el -> [_new_el | Items]
- end);
+ [decode_block_item(<<"urn:xmpp:blocking">>,
+ __IgnoreEls, _el)
+ | Items]);
_ ->
decode_unblock_els(__TopXMLNS, __IgnoreEls, _els, Items)
end;
case get_attr(<<"xmlns">>, _attrs) of
<<"">> when __TopXMLNS == <<"urn:xmpp:blocking">> ->
decode_block_els(__TopXMLNS, __IgnoreEls, _els,
- case decode_block_item(__TopXMLNS, __IgnoreEls, _el)
- of
- undefined -> Items;
- _new_el -> [_new_el | Items]
- end);
+ [decode_block_item(__TopXMLNS, __IgnoreEls, _el)
+ | Items]);
<<"urn:xmpp:blocking">> ->
decode_block_els(__TopXMLNS, __IgnoreEls, _els,
- case decode_block_item(<<"urn:xmpp:blocking">>,
- __IgnoreEls, _el)
- of
- undefined -> Items;
- _new_el -> [_new_el | Items]
- end);
+ [decode_block_item(<<"urn:xmpp:blocking">>,
+ __IgnoreEls, _el)
+ | Items]);
_ ->
decode_block_els(__TopXMLNS, __IgnoreEls, _els, Items)
end;
[{<<"type">>, enc_enum(_val)} | _acc].
decode_privacy_item_attr_value(__TopXMLNS, undefined) ->
- undefined;
+ <<>>;
decode_privacy_item_attr_value(__TopXMLNS, _val) ->
_val.
-encode_privacy_item_attr_value(undefined, _acc) -> _acc;
+encode_privacy_item_attr_value(<<>>, _acc) -> _acc;
encode_privacy_item_attr_value(_val, _acc) ->
[{<<"value">>, _val} | _acc].