# XMPP::Presence Class Reference

`#include <xmpp.h>`

Inheritance diagram for XMPP::Presence:

List of all members.

## 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 PCaselessString & | TypeTag ()
| Various constant strings.
static const PCaselessString & | ShowTag ()
static const PCaselessString & | StatusTag ()
static const PCaselessString & | PriorityTag ()
static PBoolean | IsValid (const PXML *pdu)

## Member Enumeration Documentation

enum XMPP::Presence::PresenceType

Enumerator:

  Available |
  Unavailable |
  Subscribe |
  Subscribed |
  Unsubscribe |
  Unsubscribed |
  Probe |
  Error |
  Unknown |

enum XMPP::Presence::ShowType

Enumerator:

  Online |
  Away |
  Chat |
  DND |
  XA |
  Other |

## Constructor & Destructor Documentation

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 | ) |

## Member Function Documentation

virtual BYTE XMPP::Presence::GetPriority | ( |  | ) | const`[virtual]`

virtual ShowType XMPP::Presence::GetShow | ( | PString * | showName = `0` | ) | const`[virtual]`

virtual PString XMPP::Presence::GetStatus | ( | const PString & | lang = `PString::Empty()` | ) | `[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]`

static PBoolean XMPP::Presence::IsValid | ( | const PXML * | pdu | ) | `[static]`

virtual PBoolean XMPP::Presence::IsValid | ( |  | ) | const`[virtual]`

Implements XMPP::Stanza.

static const PCaselessString& 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 PCaselessString& XMPP::Presence::ShowTag | ( |  | ) | `[static]`

static const PCaselessString& XMPP::Presence::StatusTag | ( |  | ) | `[static]`

static const PCaselessString& XMPP::Presence::TypeTag | ( |  | ) | `[static]`

Various constant strings.

The documentation for this class was generated from the following file:

- xmpp.h