#include <stanza.h>
This is the base class for XMPP stanza abstractions.
- Author
- Jakob Schröter js@ca.nosp@m.maya.nosp@m..net
- Since
- 0.4
Definition at line 33 of file stanza.h.
Virtual destructor.
Definition at line 42 of file stanza.cpp.
Creates a new Stanza, taking from and to addresses from the given Tag.
- Parameters
-
- Since
- 1.0
Definition at line 31 of file stanza.cpp.
Creates a new Stanza object and initializes the receiver's JID.
- Parameters
-
to | The receipient of the Stanza. |
- Since
- 1.0
Definition at line 26 of file stanza.cpp.
Stanza * embeddedStanza |
( |
| ) |
const |
This function returns the embedded Stanza. It is only needed by ClientBase/StanzaExtensionFactory. If hasEmbeddedStanza() is true, this function checks every embedded StanzaExtension for an embedded Stanza and returns the first it finds. You should not need to use this function directly.
- Returns
- The embedded Stanza. May be 0.
Definition at line 69 of file stanza.cpp.
Tag * embeddedTag |
( |
| ) |
const |
This function returns the embedded Tag that the embedded Stanza is based on. It is only needed by ClientBase/StanzaExtensionFactory. If hasEmbeddedStanza() is true, this function checks every embedded StanzaExtension for an embedded Tag and returns the first it finds. You should not need to use this function directly.
- Returns
- The embedded Tag. May be 0.
Definition at line 76 of file stanza.cpp.
const Error * error |
( |
| ) |
const |
A convenience function that returns the stanza error condition, if any.
- Returns
- The stanza error condition, may be 0.
Definition at line 47 of file stanza.cpp.
Returns the list of the Stanza's extensions.
- Returns
- The list of the Stanza's extensions.
Definition at line 113 of file stanza.h.
const T* findExtension |
( |
int |
type | ) |
const |
|
inline |
Finds a StanzaExtension of a particular type. Example:
const MyExtension* c = presence.findExtension<MyExtension>( ExtMyExt );
- Parameters
-
type | The extension type to look for. |
- Returns
- The static_cast' type, or 0 if none was found.
Definition at line 104 of file stanza.h.
const JID& from |
( |
| ) |
const |
|
inline |
Returns the JID the stanza comes from.
- Returns
- The origin of the stanza.
Definition at line 51 of file stanza.h.
bool hasEmbeddedStanza |
( |
| ) |
const |
|
inline |
This function indicates whether this Stanza instance contains an embedded Stanza that needs to be checked for further StanzaExtensions. You should not need to use this function directly.
- Returns
- Whether this Stanza instance contains an embedded Stanza.
Definition at line 135 of file stanza.h.
const std::string& id |
( |
| ) |
const |
|
inline |
Returns the id of the stanza, if set.
- Returns
- The ID of the stanza.
Definition at line 63 of file stanza.h.
void removeExtensions |
( |
| ) |
|
Removes (deletes) all the stanza's extensions.
Definition at line 64 of file stanza.cpp.
void setEmbeddedStanza |
( |
| ) |
|
|
inline |
void setFrom |
( |
const JID & |
from | ) |
|
|
inline |
virtual Tag* tag |
( |
| ) |
const |
|
pure virtual |
Returns the receiver of the stanza.
- Returns
- The stanza's destination.
Definition at line 57 of file stanza.h.
const std::string& xmlLang |
( |
| ) |
const |
|
inline |
Retrieves the value of the xml:lang attribute of this stanza. Default is 'en'.
- Returns
- The stanza's default language.
Definition at line 76 of file stanza.h.
The documentation for this class was generated from the following files: