25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-20 17:27:00 +01:00

Parse x:data in jabber:register

This commit is contained in:
Evgeniy Khramtsov 2014-09-03 21:27:35 +04:00
parent ac2ba399a9
commit c3eaa29f70
3 changed files with 5651 additions and 4053 deletions

File diff suppressed because it is too large Load Diff

View File

@ -293,27 +293,6 @@
nick :: binary(), nick :: binary(),
password :: binary()}). password :: binary()}).
-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()}).
-record(bookmark_url, {name :: binary(), -record(bookmark_url, {name :: binary(),
url :: binary()}). url :: binary()}).
@ -376,6 +355,28 @@
items :: #pubsub_items{}, items :: #pubsub_items{},
retract :: #pubsub_retract{}}). retract :: #pubsub_retract{}}).
-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(),
xdata :: #xdata{}}).
-record(disco_info, {node :: binary(), -record(disco_info, {node :: binary(),
identities = [] :: [#identity{}], identities = [] :: [#identity{}],
features = [] :: [binary()], features = [] :: [binary()],
@ -473,3 +474,115 @@
-record(time, {tzo :: any(), -record(time, {tzo :: any(),
utc :: any()}). utc :: any()}).
-type xmpp_element() :: #session{} |
#compression{} |
#pubsub_subscription{} |
#version{} |
#pubsub_affiliation{} |
#muc_admin{} |
#sm_a{} |
#carbons_sent{} |
#p1_rebind{} |
#sasl_abort{} |
#carbons_received{} |
#pubsub_retract{} |
#compressed{} |
#block_list{} |
#'see-other-host'{} |
#starttls_proceed{} |
#sm_resumed{} |
#forwarded{} |
#privacy_list{} |
#text{} |
#vcard_org{} |
#feature_sm{} |
#pubsub_item{} |
#roster_item{} |
#pubsub_event_item{} |
#muc_item{} |
#shim{} |
#caps{} |
#muc{} |
#stream_features{} |
#stats{} |
#pubsub_items{} |
#pubsub_event_items{} |
#disco_items{} |
#pubsub_options{} |
#starttls{} |
#sasl_mechanisms{} |
#sasl_success{} |
#compress{} |
#bytestreams{} |
#vcard_key{} |
#identity{} |
#legacy_delay{} |
#muc_user_destroy{} |
#muc_owner_destroy{} |
#privacy{} |
#delay{} |
#muc_history{} |
#bookmark_url{} |
#vcard_email{} |
#vcard_label{} |
#vcard_tel{} |
#disco_info{} |
#vcard_logo{} |
#vcard_geo{} |
#vcard_photo{} |
#muc_owner{} |
#pubsub{} |
#sm_r{} |
#muc_actor{} |
#error{} |
#stream_error{} |
#feature_register{} |
#roster{} |
#muc_user{} |
#vcard_adr{} |
#register{} |
#muc_invite{} |
#carbons_disable{} |
#bookmark_conference{} |
#time{} |
#sasl_response{} |
#pubsub_subscribe{} |
#presence{} |
#message{} |
#sm_enable{} |
#starttls_failure{} |
#sasl_challenge{} |
#gone{} |
#private{} |
#compress_failure{} |
#sasl_failure{} |
#bookmark_storage{} |
#vcard_name{} |
#sm_resume{} |
#carbons_enable{} |
#carbons_private{} |
#pubsub_unsubscribe{} |
#muc_decline{} |
#sasl_auth{} |
#p1_push{} |
#pubsub_publish{} |
#unblock{} |
#p1_ack{} |
#block{} |
#xdata{} |
#iq{} |
#last{} |
#redirect{} |
#sm_enabled{} |
#pubsub_event{} |
#vcard_sound{} |
#streamhost{} |
#stat{} |
#xdata_field{} |
#bind{} |
#sm_failed{} |
#vcard{} |
#ping{} |
#disco_item{} |
#privacy_item{}.

View File

@ -944,8 +944,10 @@
'$username', '$nick', '$password', '$name', '$username', '$nick', '$password', '$name',
'$first', '$last', '$email', '$address', '$first', '$last', '$email', '$address',
'$city', '$state', '$zip', '$phone', '$url', '$city', '$state', '$zip', '$phone', '$url',
'$date', '$misc', '$text', '$key'}, '$date', '$misc', '$text', '$key', '$xdata'},
refs = [#ref{name = register_registered, min = 0, max = 1, refs = [#ref{name = xdata, min = 0, max = 1,
label = '$xdata'},
#ref{name = register_registered, min = 0, max = 1,
default = false, label = '$registered'}, default = false, label = '$registered'},
#ref{name = register_remove, min = 0, max = 1, #ref{name = register_remove, min = 0, max = 1,
default = false, label = '$remove'}, default = false, label = '$remove'},