Authors: Mickael Remond (mickael.remond@process-one.net), Jean-Sébastien Pédron (js.pedron@meetic-corp.com).
| error/2 | Create an <error/> element based on the given Condition. |
| error/3 | Create an <error/> element based on the given Condition. |
| get_condition/1 | Return the child element name corresponding to the stanza error condition. |
| get_error/1 | Return the error element from Stanza. |
| get_error_type/1 | Return the type of the error element. |
| get_id/1 | Return the stanza ID. |
| get_id_from_attrs/1 | Return the stanza ID. |
| get_lang/1 | Return the language of the stanza. |
| get_lang_from_attrs/1 | Return the language of the stanza. |
| get_recipient/1 | Return the recipient. |
| get_recipient_from_attrs/1 | Return the recipient. |
| get_sender/1 | Return the sender. |
| get_sender_from_attrs/1 | Return the sender. |
| get_text/1 | Return the text that describes the error. |
| get_type/1 | Return the type of the stanza. |
| get_type_from_attrs/1 | Return the type of the stanza. |
| is_stanza_error/1 | Tell if the stanza transports an error. |
| remove_recipient/1 | Remove the recipient. |
| remove_recipient_in_attrs/1 | Remove the recipient. |
| remove_sender/1 | Remove the sender. |
| remove_sender_in_attrs/1 | Remove the sender. |
| reply/1 | Prepare a reply to Stanza. |
| reply_from_attrs/1 | Handles to and from attributes to prepare a reply stanza. |
| reply_with_error/2 | Prepare an error reply to Stanza. |
| reply_without_content/1 | Prepare a reply to Stanza with children removed. |
| set_error_type/2 | Set the type of the error element. |
| set_error_type_from_condition/2 | Set the type of the error element, based on the given condition. |
| set_id/2 | Set the ID. |
| set_id_in_attrs/2 | Set the ID. |
| set_jids/3 | Set the sender and the recipient at the same time. |
| set_jids_in_attrs/3 | Set the sender and the recipient at the same time. |
| set_lang/2 | Set the lang. |
| set_lang_in_attrs/2 | Set the lang. |
| set_recipient/2 | Set the recipient. |
| set_recipient_in_attrs/2 | Set the recipient. |
| set_sender/2 | Set the sender. |
| set_sender_in_attrs/2 | Set the sender. |
| set_type/2 | Set the type of the stanza. |
| set_type_in_attrs/2 | Set the type of the stanza. |
| stanza_error/2 | Transform Stanza in a stanza error. |
| stanza_error_without_original/2 | Transform Stanza in a stanza error. |
| to_binary/1 | Serialize a stanza using common XMPP default namespaces. |
| to_binary/2 | Serialize a stanza using the given default namespace. |
| to_binary/3 | Serialize a stanza using the given namespaces. |
| to_iolist/1 | Serialize a stanza using common XMPP default namespaces. |
| to_iolist/2 | Serialize a stanza using the given default namespace. |
| to_iolist/3 | Serialize a stanza using the given namespaces. |
| to_list/1 | Serialize a stanza using common XMPP default namespaces. |
| to_list/2 | Serialize a stanza using the given default namespace. |
| to_list/3 | Serialize a stanza using the given namespaces. |
error(NS, Condition) -> Stanza_Error
Create an <error/> element based on the given Condition.
set_error_type/2 if NS is
jabber:client or jabber:server. This does not contain any text
element.
error(NS, Condition, Text::Text_Spec) -> Stanza_Error
Create an <error/> element based on the given Condition.
set_error_type/2 if NS is
jabber:client or jabber:server. This does not contain any text
element.
get_condition(Stanza) -> Condition | undefined
throws {stanza_error, condition, no_error_element_found, Stanza} | {stanza_error, condition, no_condition_found, Error}
Return the child element name corresponding to the stanza error condition.
If the namespace isn't neitherjabber:client nor jabber:server,
the name of the first child is returned.
get_error(Xmlel::Stanza) -> Error | undefined
Return the error element from Stanza.
error and the same
namespace as the stanza.
get_error_type(Stanza) -> Type
throws {stanza_error, error_type, no_error_element_found, Stanza}
Return the type of the error element.
get_id(Xmlel::Stanza) -> ID | undefined
Return the stanza ID.
get_id_from_attrs(Attrs) -> ID | undefined
Return the stanza ID.
get_lang(Xmlel::Stanza) -> Lang | undefined
Return the language of the stanza.
get_lang_from_attrs(Attrs) -> Lang | undefined
Return the language of the stanza.
get_recipient(Xmlel::Stanza) -> Recipient | undefined
Return the recipient.
The return value should be a JID and may be parsed withexmpp_jid:parse/1.
get_recipient_from_attrs(Attrs) -> Recipient | undefined
Return the recipient.
The return value should be a JID and may be parsed withexmpp_jid:parse/1.
get_sender(Xmlel::Stanza) -> Sender | undefined
Return the sender.
The return value should be a JID and may be parsed withexmpp_jid:parse/1.
get_sender_from_attrs(Attrs) -> Sender | undefined
Return the sender.
The return value should be a JID and may be parsed withexmpp_jid:parse/1.
get_text(Stanza) -> Text | undefined
throws {stanza_error, text, no_error_element_found, Stanza}
Return the text that describes the error.
If there is no<text/> element, an empty string is returned.
get_type(Xmlel::Stanza) -> Type | undefined
Return the type of the stanza.
get_type_from_attrs(Attrs) -> Type | undefined
Return the type of the stanza.
is_stanza_error(Stanza) -> boolean()
Tell if the stanza transports an error.
remove_recipient(Xmlel::Stanza) -> New_Stanza
Remove the recipient.
remove_recipient_in_attrs(Attrs) -> New_Attrs
Remove the recipient.
remove_sender(Xmlel::Stanza) -> New_Stanza
Remove the sender.
remove_sender_in_attrs(Attrs) -> New_Attrs
Remove the sender.
reply(Xmlel::Stanza) -> Stanza_Reply
Prepare a reply to Stanza.
See also: reply_from_attrs/1.
reply_from_attrs(Attrs) -> New_Attrs
Handles to and from attributes to prepare a reply stanza.
reply_with_error(Stanza, Condition::Error) -> Stanza_Reply
Prepare an error reply to Stanza.
Error is an atom, it must be a standard condition defined by
XMPP Core.
reply_without_content(Xmlel::Stanza) -> Stanza_Reply
Prepare a reply to Stanza with children removed.
See also: reply_from_attrs/1.
set_error_type(Stanza, Type) -> New_Stanza
throws {stanza_error, error_type, no_error_element_found, Stanza}
Set the type of the error element.
set_error_type_from_condition(Stanza, Condition) -> New_Stanza
throws {stanza_error, error_type, no_error_element_found, Stanza} | {stanza_error, error_type, invalid_condition, {NS, Condition}}
Set the type of the error element, based on the given condition.
If the condition isundefined-condition, the type is unchanged.
set_id(Xmlel::Stanza, ID) -> New_Stanza
Set the ID.
IfID is undefined or empty, it's removed. If ID is random, a
random value is set.
set_id_in_attrs(Attrs, ID) -> New_Attrs
Set the ID.
IfID is undefined or empty, it's removed. If ID is random, a
random value is set.
set_jids(Stanza, From::Sender, To::Recipient) -> New_Stanza
Set the sender and the recipient at the same time.
IfSender is set to undefined, the sender is removed. If
Recipient is set to undefined, the recipient is removed.
set_jids_in_attrs(Attrs, From::Sender, To::Recipient) -> New_Attrs
Set the sender and the recipient at the same time.
IfSender is set to undefined, the sender is removed. If
Recipient is set to undefined, the recipient is removed.
set_lang(Xmlel::Stanza, Lang) -> New_Stanza
Set the lang.
IfLang is undefined or empty, it's removed.
set_lang_in_attrs(Attrs, Lang) -> New_Attrs
Set the lang.
IfLang is undefined or empty, it's removed.
set_recipient(Xmlel::Stanza, Recipient) -> New_Stanza
Set the recipient.
IfRecipient is set to undefined, the recipient is removed.
set_recipient_in_attrs(Attrs, Recipient) -> New_Attrs
Set the recipient.
IfRecipient is set to undefined, the recipient is removed.
set_sender(Xmlel::Stanza, Sender) -> New_Stanza
Set the sender.
IfSender is set to undefined, the sender is removed.
set_sender_in_attrs(Attrs, Sender) -> New_Attrs
Set the sender.
IfSender is set to undefined, the sender is removed.
set_type(Xmlel::Stanza, Type) -> New_Stanza
Set the type of the stanza.
set_type_in_attrs(Attrs, Type) -> New_Attrs
Set the type of the stanza.
stanza_error(Stanza, Error) -> Stanza_Error
Transform Stanza in a stanza error.
type attribute is set and an error condition is added. The
caller is still responsible to set or modify the to attribute
correctly.
stanza_error_without_original(Stanza, Error) -> Stanza_Error
Transform Stanza in a stanza error.
Stanza are not kept.
See also: stanza_error/2.
to_binary(El) -> XML_Text
Serialize a stanza using common XMPP default namespaces.
This function callsto_binary/2 with Default_NS set to
[?NS_JABBER_CLIENT, ?NS_JABBER_SERVER, ?NS_COMPONENT_ACCEPT,
?NS_COMPONENT_CONNECT].
to_binary(El, Default_NS) -> XML_Text
Serialize a stanza using the given default namespace.
The XMPP namespacehttp://etherx.jabber.org/streams and the
Server Dialback jabber:server:dialback are included as a prefixed
namespace, with the stream prefix.
to_binary(Iq::El, Default_NS, Prefixed_NS::Prefix) -> XML_Text
Serialize a stanza using the given namespaces.
To understandDefault_NS, see exmpp_xml:xmlel_to_xmlelement/3.
to_iolist(El) -> XML_Text
Serialize a stanza using common XMPP default namespaces.
This function callsto_iolist/2 with Default_NS set to
[?NS_JABBER_CLIENT, ?NS_JABBER_SERVER, ?NS_COMPONENT_ACCEPT,
?NS_COMPONENT_CONNECT].
to_iolist(El, Default_NS) -> XML_Text
Serialize a stanza using the given default namespace.
The XMPP namespacehttp://etherx.jabber.org/streams and the
Server Dialback jabber:server:dialback are included as a prefixed
namespace, with the stream prefix.
to_iolist(Iq::El, Default_NS, Prefixed_NS::Prefix) -> XML_Text
Serialize a stanza using the given namespaces.
To understandDefault_NS, see exmpp_xml:xmlel_to_xmlelement/3.
to_list(El) -> XML_Text
Serialize a stanza using common XMPP default namespaces.
This function callsto_list/2 with Default_NS set to
[?NS_JABBER_CLIENT, ?NS_JABBER_SERVER, ?NS_COMPONENT_ACCEPT,
?NS_COMPONENT_CONNECT].
to_list(El, Default_NS) -> XML_Text
Serialize a stanza using the given default namespace.
The XMPP namespacehttp://etherx.jabber.org/streams and the
Server Dialback jabber:server:dialback are included as a prefixed
namespace, with the stream prefix.
to_list(Iq::El, Default_NS, Prefixed_NS::Prefix) -> XML_Text
Serialize a stanza using the given namespaces.
To understandDefault_NS, see exmpp_xml:xmlel_to_xmlelement/3.
Generated by EDoc, Feb 19 2012, 12:53:55.