gloox
1.0.16
|
#include <subscription.h>
Public Types | |
enum | S10nType { Subscribe, Subscribed, Unsubscribe, Unsubscribed, Invalid } |
Public Member Functions | |
Subscription (S10nType type, const JID &to, const std::string &status=EmptyString, const std::string &xmllang=EmptyString) | |
virtual | ~Subscription () |
S10nType | subtype () const |
const std::string | status (const std::string &lang="default") const |
virtual Tag * | tag () const |
Public Member Functions inherited from Stanza | |
virtual | ~Stanza () |
void | setFrom (const JID &from) |
const JID & | from () const |
const JID & | to () const |
const std::string & | id () const |
const Error * | error () const |
const std::string & | xmlLang () const |
void | addExtension (const StanzaExtension *se) |
const StanzaExtension * | findExtension (int type) const |
template<class T > | |
const T * | findExtension (int type) const |
const StanzaExtensionList & | extensions () const |
void | removeExtensions () |
void | setEmbeddedStanza () |
bool | hasEmbeddedStanza () const |
Stanza * | embeddedStanza () const |
Tag * | embeddedTag () const |
Additional Inherited Members | |
Protected Member Functions inherited from Stanza | |
Stanza (Tag *tag) | |
Stanza (const JID &to) | |
enum S10nType |
Describes the different valid message types.
Enumerator | |
---|---|
Subscribe |
A subscription request. |
Subscribed |
A subscription notification. |
Unsubscribe |
An unsubscription request. |
Unsubscribed |
An unsubscription notification. |
Invalid |
The stanza is invalid. |
Definition at line 41 of file subscription.h.
Subscription | ( | S10nType | type, |
const JID & | to, | ||
const std::string & | status = EmptyString , |
||
const std::string & | xmllang = EmptyString |
||
) |
Creates a Subscription request.
type | The presence type. |
to | The intended receiver. Use an empty JID to create a broadcast packet. |
status | An optional status message (e.g. "please authorize me"). |
xmllang | An optional xml:lang for the status message. |
Definition at line 43 of file subscription.cpp.
|
virtual |
Destructor.
Definition at line 50 of file subscription.cpp.
|
inline |
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.
lang | The language identifier for the desired language. It must conform to section 2.12 of the XML specification and RFC 3066. If empty, the default body will be returned, if any. |
Definition at line 80 of file subscription.h.
|
inline |
Returns the subscription stanza's type.
Definition at line 69 of file subscription.h.
|
virtual |