Authors: Jean-Sébastien Pédron (js.pedron@meetic-corp.com).
iq() = {iq, Kind, Type, ID, NS, Payload, Error, Lang, IQ_NS}
Record representing an IQ stanza.
It's created from an #xmlel usingxmlel_to_iq/1. This record
eases matching in function clauses. It may be passed to functions in
exmpp_stanza and exmpp_iq. For other operations, it
must be converted back to #xmlel using iq_to_xmlel/1.
| error/2 | Prepare an <iq/> to notify an error. |
| error/3 | Prepare an <iq/> to notify an error
with an error Error is an atom, it must be a standard condition defined by
XMPP Core. |
| error_without_original/2 | Prepare an <iq/> to notify an error. |
| get/2 | Prepare an <iq/> to transport the given get request. |
| get/3 | Prepare an <iq/> to transport the given get request. |
| get_kind/1 | Tell if an IQ is a request or a response. |
| get_payload/1 | Extract the request, the result or the error from IQ. |
| get_payload_ns_as_atom/1 | Returns the query namespace. |
| get_request/1 | Return the request contained in a get or set IQ, or returned
by an error IQ (if present). |
| get_result/1 | Return the result contained in a result IQ. |
| get_type/1 | Return the type of the given <iq/>. |
| iq_to_xmlel/1 | Convert an IQ stanza from its #iq form to its #xmlel form. |
| iq_to_xmlel/3 | Convert an IQ stanza from its #iq form to its #xmlel form and set the sender and recipient at the same time. |
| is_error/1 | Tell if the IQ is an error (response of type error). |
| is_iq/1 | Tell if El is an IQ. |
| is_iq_record/1 | Tell if El is an IQ record. |
| is_request/1 | Tell if the IQ is a request. |
| is_response/1 | Tell if the IQ is a response. |
| is_result/1 | Tell if the IQ is a result (response of type result). |
| result/1 | Prepare an <iq/> to answer to the given request. |
| result/2 | Prepare an <iq/> to answer to the given request with Result. |
| set/2 | Prepare an <iq/> to transport the given set request. |
| set/3 | Prepare an <iq/> to transport the given set request. |
| xmlel_to_iq/1 | Convert an IQ stanza from its #xmlel form to its #iq form. |
error(IQ::Request_IQ, Condition::Error) -> Response_IQ
Prepare an <iq/> to notify an error.
Error is an atom, it must be a standard condition defined by
XMPP Core.
error(IQ::Request_IQ, Condition, Text) -> Response_IQ
Prepare an <iq/> to notify an error
with an error Error is an atom, it must be a standard condition defined by
XMPP Core.
error_without_original(IQ::Request_IQ, Condition::Error) -> Response_IQ
Prepare an <iq/> to notify an error.
Child elements from Request_IQ are not kept.
Error is an atom, it must be a standard condition defined by
XMPP Core.
get(NS, Request) -> IQ
Prepare an <iq/> to transport the given get request.
get(NS, Request, ID) -> Request_IQ
Prepare an <iq/> to transport the given get request.
get_kind(IQ) -> Kind
Tell if an IQ is a request or a response.
get_payload(IQ) -> Payload
throws {iq, get_payload, unexpected_iq, IQ}
Extract the request, the result or the error from IQ.
get_payload_ns_as_atom(IQ) -> NS | undefined
Returns the query namespace. returns 'undefined' is there is no query element.
get_request(IQ) -> Request | undefined
throws {iq, get_request, unexpected_iq, IQ} | {iq, get_request, invalid_iq, IQ}
Return the request contained in a get or set IQ, or returned
by an error IQ (if present).
get_result(IQ) -> Result | undefined
throws {iq, get_request, unexpected_iq, IQ} | {iq, get_result, invalid_iq, IQ}
Return the result contained in a result IQ.
get_type(IQ) -> Type
Return the type of the given <iq/>.
iq_to_xmlel(IQ_Rec) -> IQ
Convert an IQ stanza from its #iq form to its #xmlel form.
iq_to_xmlel(IQ_Rec, Sender, Recipient) -> IQ
Convert an IQ stanza from its #iq form to its #xmlel form and set the sender and recipient at the same time.
is_error(IQ) -> boolean()
Tell if the IQ is an error (response of type error).
is_iq(IQ::El) -> boolean()
Tell if El is an IQ.
IS_IQ(El) guard expression.
is_iq_record(IQ::El) -> boolean()
Tell if El is an IQ record.
IS_IQ_RECORD(El) guard expression.
is_request(IQ) -> boolean()
Tell if the IQ is a request.
is_response(IQ) -> boolean()
Tell if the IQ is a response.
is_result(IQ) -> boolean()
Tell if the IQ is a result (response of type result).
result(Request_IQ) -> Response_IQ
Prepare an <iq/> to answer to the given request.
result(Request_IQ, Result) -> Response_IQ
Prepare an <iq/> to answer to the given request with Result.
set(NS, Request) -> Request_IQ
Prepare an <iq/> to transport the given set request.
set(NS, Request, ID) -> Request_IQ
Prepare an <iq/> to transport the given set request.
xmlel_to_iq(Xmlel::IQ) -> IQ_Rec
Convert an IQ stanza from its #xmlel form to its #iq form.
Generated by EDoc, Feb 19 2012, 12:53:55.