#include <presenceDB.hh>
Public Member Functions | |
PresenceDB (Session &s) | |
Create a PresenceDB for a given Session. | |
void | insert (const Presence &p) |
Insert a Presence Packet into the database. | |
void | remove (const std::string &jid) |
Remove a Presence Packet from the database. | |
void | clear () |
Clear the database. | |
range | equal_range (const std::string &jid) const |
This function will throw XCP_InvalidJID if the JID is not found. | |
const_iterator | find (const std::string &jid) const |
Find Presence Packets from all JabberIDs which have the given user. | |
Presence | findExact (const std::string &jid) const |
Find the Presence Packet for an exact user/resource JabberID. | |
bool | contains (const std::string &jid) const |
Whether the PresenceDB contains a given user. | |
bool | available (const std::string &jid) const |
Whether the default Presence for user is available. |
This class keeps track of and handles all Presence packets received. This class plus the Roster class are crucial for clients which want rosters.
Definition at line 54 of file presenceDB.hh.
|
Create a PresenceDB for a given Session. This will begin keeping track of all Presence packets received in a given Session.
Definition at line 60 of file jabberoo-presencedb.cpp. |
|
Whether the default Presence for user is available.
Definition at line 215 of file jabberoo-presencedb.cpp. |
|
Clear the database. Erases all entries. Definition at line 227 of file jabberoo-presencedb.cpp. Referenced by jabberoo::Session::onDocumentEnd(). |
|
Whether the PresenceDB contains a given user.
Definition at line 210 of file jabberoo-presencedb.cpp. |
|
This function will throw XCP_InvalidJID if the JID is not found.
Definition at line 161 of file jabberoo-presencedb.cpp. |
|
Find Presence Packets from all JabberIDs which have the given user. This function will throw XCP_InvalidJID if the JID is not found.
Definition at line 199 of file jabberoo-presencedb.cpp. |
|
Find the Presence Packet for an exact user/resource JabberID. This function will throw XCP_InvalidJID if the JID is not found. Definition at line 167 of file jabberoo-presencedb.cpp. |
|
Insert a Presence Packet into the database.
Definition at line 79 of file jabberoo-presencedb.cpp. References jabberoo::Packet::getFrom(), jabberoo::Presence::getPriority(), and jabberoo::Presence::getType(). |
|
Remove a Presence Packet from the database. Currently this does *not* handle multiple entries with different resources. This function will remove all Presence Packets which match the user.
Definition at line 138 of file jabberoo-presencedb.cpp. |