#include <stanza.h>
Inherits Tag.
Inheritance diagram for Stanza:


Public Member Functions | |
| Stanza (const Tag *tag) | |
| Stanza (const std::string &name, const std::string &cdata="", const std::string &xmllang="default", bool incoming=false) | |
| virtual | ~Stanza () |
| virtual StanzaSubType | subtype () const |
| virtual const JID & | from () const |
| virtual const JID & | to () const |
| virtual const std::string & | id () const |
| virtual const std::string & | xmlns () const |
| virtual Presence | presence () const |
| virtual int | priority () const |
| virtual const std::string | status (const std::string &lang="default") const |
| virtual const std::string | body (const std::string &lang="default") const |
| virtual const std::string | subject (const std::string &lang="default") const |
| virtual const std::string | errorText (const std::string &lang="default") const |
| virtual StanzaError | error () const |
| Tag * | errorAppCondition () |
| virtual const std::string & | thread () const |
| void | setThread (const std::string &thread) |
| const std::string & | xmlLang () const |
| void | finalize () |
| void | addExtension (StanzaExtension *se) |
| const StanzaExtensionList & | extensions () const |
Static Public Member Functions | |
| static Stanza * | createIqStanza (const JID &to, const std::string &id, StanzaSubType subtype=StanzaIqGet, const std::string &xmlns="", Tag *tag=0) |
| static Stanza * | createPresenceStanza (const JID &to, const std::string &msg="", Presence status=PresenceAvailable, const std::string &xmllang="") |
| static Stanza * | createMessageStanza (const JID &to, const std::string &body, StanzaSubType subtype=StanzaMessageChat, const std::string &subject="", const std::string &thread="", const std::string &xmllang="") |
| static Stanza * | createSubscriptionStanza (const JID &to, const std::string &msg="", StanzaSubType subtype=StanzaS10nSubscribe, const std::string &xmllang="") |
You can create a new Stanza from an existing Tag (or another stanza).
Definition at line 39 of file stanza.h.
|
|
Creates a new Stanza from a deep copy of the given Tag.
Definition at line 32 of file stanza.cpp. |
|
||||||||||||||||||||
|
Creates a new Stanza with given name and optional CData.
Definition at line 24 of file stanza.cpp. |
|
|
Virtual destructor. Definition at line 48 of file stanza.cpp. |
|
|
Use this function to add a StanzaExtension to this Stanza.
Definition at line 301 of file stanza.cpp. |
|
|
Returns the body of a message stanza for the given language if available. If the requested language is not available, the default body (without a xml:lang attribute) will be returned.
|
|
||||||||||||||||||||||||
|
Creates a new IQ stanza.
Definition at line 307 of file stanza.cpp. |
|
||||||||||||||||||||||||||||
|
Creates a new message stanza.
Definition at line 382 of file stanza.cpp. |
|
||||||||||||||||||||
|
Creates a new presence stanza.
Definition at line 343 of file stanza.cpp. |
|
||||||||||||||||||||
|
Creates a new subscription stanza.
Definition at line 427 of file stanza.cpp. |
|
|
Returns the stanza error condition, if any.
|
|
|
This function can be used to retrieve the application-specific error condition of a stanza error.
|
|
|
Returns the text of a error stanza for the given language if available. If the requested language is not available, the default text (without a xml:lang attribute) will be returned.
|
|
|
Returns the list of the Stanza's extensions.
|
|
|
Use this function to parse the content of the Tag and determine type, etc. of the Stanza. This feels kind of hackish... You only need to call this if you are constructing a bare Stanza from scratch. Stanzas provided by gloox are fully parsed.
|
|
|
Returns the JID the stanza comes from.
|
|
|
Returns the id of the stanza, if set.
|
|
|
Returns the presence 'show' type of a presence stanza.
|
|
|
Returns the remote entity resource's presence priority if the stanza is a presence stanza. If the stanza is not a presence stanza or if no priority information was included, a value below -128 is returned, which is an illegal value for the priority. Legal range is between -128 and +127.
|
|
|
Sets the Stanza's thread ID. Only useful for message stanzas.
|
|
|
Returns the status text of a presence stanza for the given language if available. If the requested language is not available, the default status text (without a xml:lang attribute) will be returned.
|
|
|
Returns the subject of a message stanza for the given language if available. If the requested language is not available, the default subject (without a xml:lang attribute) will be returned.
|
|
|
Returns the sub-type of the stanza.
|
|
|
Returns the thread ID of a message stanza.
|
|
|
Returns the receiver of the stanza.
|
|
|
Retrieves the value of the xml:lang attribute of this stanza. Default is 'en'. |
|
|
Returns the value of the xmlns attribute of the first child node.
|
1.4.1