#include <presence.hh>
Inheritance diagram for jabberoo::Presence:
Public Types | |
enum | Type { ptSubRequest, ptUnsubRequest, ptSubscribed, ptUnsubscribed, ptAvailable, ptUnavailable, ptError, ptInvisible } |
Presence type of the Packet. More... | |
enum | Show { stInvalid, stOffline, stOnline, stChat, stAway, stXA, stDND } |
How the Presence should be displayed. More... | |
Public Member Functions | |
Presence (const judo::Element &t) | |
Construct a Presence Packet based upon the given judo::Element. | |
Presence (const std::string &jid, Type ptype, Show stype=stInvalid, const std::string &status="", const std::string &priority="0") | |
Construct a Presence Packet based upon given values. | |
void | setType (Presence::Type ptype) |
Set the presence type. | |
void | setStatus (const std::string &status) |
Set the presence status message. | |
void | setShow (Presence::Show stype) |
Set the presence show. | |
void | setPriority (const std::string &priority) |
Set the presence priority. | |
Type | getType () const |
Get the presence type. | |
Show | getShow () const |
Get the presence show. | |
const std::string | getStatus () const |
Get the presence status message. | |
const std::string | getShow_str () const |
Get the Presence::Show as a string. | |
int | getPriority () const |
Get the priority of the presence. |
This class implements most of the methods needed to deal with a Jabber Presence Packet.
Definition at line 45 of file presence.hh.
|
How the Presence should be displayed. In addition to simply being available/unavailable, show hints at how a user's presence should be displayed in clients.
Definition at line 68 of file presence.hh. |
|
Definition at line 52 of file presence.hh. |
|
Construct a Presence Packet based upon the given judo::Element.
Definition at line 36 of file jabberoo-presence.cpp. |
|
Construct a Presence Packet based upon given values.
Definition at line 45 of file jabberoo-presence.cpp. References setPriority(), setShow(), setStatus(), jabberoo::Packet::setTo(), and setType(). |
|
Get the priority of the presence. The priority determines which resource messages should default to sending to if the sender has logged in multiple times. If two resources have the same priority, the most recently logged in resource is the default.
Definition at line 110 of file jabberoo-presence.cpp. References judo::Element::getChildCData(). Referenced by jabberoo::PresenceDB::insert(). |
|
Get the presence show.
Definition at line 100 of file jabberoo-presence.cpp. |
|
Get the Presence::Show as a string.
Definition at line 105 of file jabberoo-presence.cpp. |
|
Get the presence status message. In subscription request Presence Packets, the status message is the request reason. Definition at line 92 of file jabberoo-presence.cpp. References judo::Element::getChildCData(). |
|
Get the presence type.
Definition at line 87 of file jabberoo-presence.cpp. Referenced by jabberoo::PresenceDB::insert(). |
|
Set the presence priority.
Definition at line 78 of file jabberoo-presence.cpp. References judo::Element::addElement(). Referenced by Presence(). |
|
Set the presence show.
Definition at line 69 of file jabberoo-presence.cpp. References judo::Element::addElement(), and stOnline. Referenced by Presence(). |
|
Set the presence status message.
Definition at line 63 of file jabberoo-presence.cpp. References judo::Element::addElement(). Referenced by Presence(). |
|
Set the presence type.
Definition at line 56 of file jabberoo-presence.cpp. References judo::Element::putAttrib(). Referenced by Presence(). |