#include <xmpp.h>
Inheritance diagram for XMPP::Presence:
Public Types | |
Available | |
Unavailable | |
Subscribe | |
Subscribed | |
Unsubscribe | |
Unsubscribed | |
Probe | |
Error | |
Unknown = 999 | |
Online | |
Away | |
Chat | |
DND | |
XA | |
Other = 999 | |
enum | PresenceType { Available, Unavailable, Subscribe, Subscribed, Unsubscribe, Unsubscribed, Probe, Error, Unknown = 999 } |
enum | ShowType { Online, Away, Chat, DND, XA, Other = 999 } |
Public Member Functions | |
Presence () | |
Construct a new empty presence. | |
Presence (PXML &pdu) | |
Construct a presence from a (received) xml PDU. | |
Presence (PXML *pdu) | |
virtual PBoolean | IsValid () const |
virtual PresenceType | GetType (PString *typeName=0) const |
virtual ShowType | GetShow (PString *showName=0) const |
virtual BYTE | GetPriority () const |
virtual PString | GetStatus (const PString &lang=PString::Empty()) |
Get the status for the specified language. | |
virtual PXMLElement * | GetStatusElement (const PString &lang=PString::Empty()) |
virtual void | SetType (PresenceType type) |
virtual void | SetType (const PString &type) |
virtual void | SetShow (ShowType show) |
virtual void | SetShow (const PString &show) |
virtual void | SetPriority (BYTE priority) |
virtual void | SetStatus (const PString &status, const PString &lang=PString::Empty()) |
Static Public Member Functions | |
static const PString & | TypeTag () |
Various constant strings. | |
static const PString & | ShowTag () |
static const PString & | StatusTag () |
static const PString & | PriorityTag () |
static PBoolean | IsValid (const PXML *pdu) |
XMPP::Presence::Presence | ( | ) |
Construct a new empty presence.
XMPP::Presence::Presence | ( | PXML & | pdu | ) |
Construct a presence from a (received) xml PDU.
The root of the pdu MUST be a presence stanza. NOTE: the root of the pdu is cloned.
XMPP::Presence::Presence | ( | PXML * | pdu | ) |
virtual BYTE XMPP::Presence::GetPriority | ( | ) | const [virtual] |
Get the status for the specified language.
The default status (if any) is returned in case no language is specified or a matching one cannot be found
virtual PXMLElement* XMPP::Presence::GetStatusElement | ( | const PString & | lang = PString::Empty() |
) | [virtual] |
virtual PresenceType XMPP::Presence::GetType | ( | PString * | typeName = 0 |
) | const [virtual] |
virtual PBoolean XMPP::Presence::IsValid | ( | ) | const [virtual] |
Implements XMPP::Stanza.
static const PString& XMPP::Presence::PriorityTag | ( | ) | [static] |
virtual void XMPP::Presence::SetPriority | ( | BYTE | priority | ) | [virtual] |
virtual void XMPP::Presence::SetShow | ( | const PString & | show | ) | [virtual] |
virtual void XMPP::Presence::SetShow | ( | ShowType | show | ) | [virtual] |
virtual void XMPP::Presence::SetStatus | ( | const PString & | status, | |
const PString & | lang = PString::Empty() | |||
) | [virtual] |
virtual void XMPP::Presence::SetType | ( | const PString & | type | ) | [virtual] |
virtual void XMPP::Presence::SetType | ( | PresenceType | type | ) | [virtual] |
static const PString& XMPP::Presence::ShowTag | ( | ) | [static] |
static const PString& XMPP::Presence::StatusTag | ( | ) | [static] |
static const PString& XMPP::Presence::TypeTag | ( | ) | [static] |
Various constant strings.