#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.
◆ ~Stanza()
Virtual destructor.
Definition at line 42 of file stanza.cpp.
◆ Stanza() [1/2]
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.
◆ Stanza() [2/2]
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.
◆ addExtension()
◆ embeddedStanza()
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.
◆ embeddedTag()
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.
◆ error()
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.
◆ extensions()
Returns the list of the Stanza's extensions.
- Returns
- The list of the Stanza's extensions.
Definition at line 113 of file stanza.h.
◆ findExtension() [1/2]
◆ findExtension() [2/2]
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.
◆ from()
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.
◆ hasEmbeddedStanza()
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.
◆ id()
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.
◆ removeExtensions()
void removeExtensions |
( |
| ) |
|
Removes (deletes) all the stanza's extensions.
Definition at line 64 of file stanza.cpp.
◆ setEmbeddedStanza()
void setEmbeddedStanza |
( |
| ) |
|
|
inline |
◆ setFrom()
void setFrom |
( |
const JID & |
from | ) |
|
|
inline |
◆ tag()
virtual Tag* tag |
( |
| ) |
const |
|
pure virtual |
◆ to()
Returns the receiver of the stanza.
- Returns
- The stanza's destination.
Definition at line 57 of file stanza.h.
◆ xmlLang()
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: