#include <rostermanager.h>
Inherits IqHandler, PresenceHandler, SubscriptionHandler, and PrivateXMLHandler.
Inheritance diagram for RosterManager:
Public Member Functions | |
RosterManager (ClientBase *parent, bool self=false) | |
virtual | ~RosterManager () |
void | fill () |
RosterListener::Roster * | roster () |
void | subscribe (const std::string &jid, const std::string &name, StringList &groups, const std::string &msg) |
void | synchronize () |
void | add (const std::string &jid, const std::string &name, StringList &groups) |
void | unsubscribe (const std::string &jid, const std::string &msg, bool remove) |
void | ackSubscriptionRequest (const JID &to, bool ack) |
const std::string & | delimiter () const |
void | setDelimiter (const std::string &delimiter) |
void | registerRosterListener (RosterListener *rl, bool syncSubscribeReq=true) |
void | removeRosterListener () |
virtual bool | handleIq (Stanza *stanza) |
virtual bool | handleIqID (Stanza *, int) |
virtual void | handlePresence (Stanza *stanza) |
virtual void | handleSubscription (Stanza *stanza) |
virtual void | handlePrivateXML (const std::string &tag, Tag *xml) |
virtual void | handlePrivateXMLResult (const std::string uid, PrivateXMLResult result) |
It takes care of changing presence, subscriptions, etc. You can modify any number of RosterItems within the Roster at any time. These changes must be synchronized with the server by calling synchronize(). Note that incoming Roster pushes initiated by other resources may overwrite changed values. Additionally, JEP-0083 (Nested Roster Groups) is implemented herein.
Definition at line 44 of file rostermanager.h.
|
Creates a new RosterManager.
Definition at line 25 of file rostermanager.cpp. References JID::bare(), ClientBase::jid(), ClientBase::registerIqHandler(), ClientBase::registerPresenceHandler(), and ClientBase::registerSubscriptionHandler(). |
|
Virtual destructor. Definition at line 45 of file rostermanager.cpp. References ClientBase::removeIqHandler(), ClientBase::removePresenceHandler(), and ClientBase::removeSubscriptionHandler(). |
|
Use this function to acknowledge a subscription request if you requested asynchronous subscription request handling.
Definition at line 259 of file rostermanager.cpp. References Tag::addAttrib(), JID::bare(), ClientBase::jid(), and ClientBase::send(). Referenced by RosterManager::handleSubscription(). |
|
Use this function to add a contact to the roster. No subscription request is sent.
Definition at line 163 of file rostermanager.cpp. References Tag::addAttrib(), Tag::addChild(), and ClientBase::getID(). Referenced by RosterManager::subscribe(). |
|
Use this function to retrieve the delimiter of Nested Roster Groups (JEP-0083).
Definition at line 118 of file rostermanager.h. |
|
This function does the initial filling of the roster with the current server-side roster. Definition at line 68 of file rostermanager.cpp. References Tag::addAttrib(), Tag::addChild(), ClientBase::getID(), PrivateXML::requestXML(), and ClientBase::send(). Referenced by RosterManager::handlePrivateXML(), and RosterManager::handlePrivateXMLResult(). |
|
Reimplement this function if you want to be notified about incoming IQs.
Implements IqHandler. Definition at line 85 of file rostermanager.cpp. References RosterListener::roster(), gloox::STANZA_IQ_RESULT, and Stanza::subtype(). |
|
Reimplement this function if you want to be notified about incoming IQs with a specific value of the
Implements IqHandler. Definition at line 148 of file rostermanager.h. |
|
Reimplement this function if you want to be updated on incoming presence notifications.
Implements PresenceHandler. Definition at line 110 of file rostermanager.cpp. References JID::bare(), Stanza::from(), RosterListener::itemAvailable(), RosterListener::itemChanged(), RosterListener::itemUnavailable(), gloox::PRESENCE_AVAILABLE, gloox::PRESENCE_UNAVAILABLE, Stanza::show(), and Stanza::status(). |
|
Reimplement this function to receive the private XML that was requested earlier using
Implements PrivateXMLHandler. Definition at line 425 of file rostermanager.cpp. References Tag::cdata(), and RosterManager::fill(). |
|
Reimplement this function if you want to be notified about incoming subscriptions/subscription requests.
Implements SubscriptionHandler. Definition at line 272 of file rostermanager.cpp. References RosterManager::ackSubscriptionRequest(), JID::bare(), Stanza::from(), gloox::STANZA_S10N_SUBSCRIBE, Stanza::status(), RosterListener::subscriptionRequest(), and Stanza::subtype(). |
|
Register
Definition at line 331 of file rostermanager.cpp. |
|
Complementary function to registerRosterListener. Removes the current RosterListener. Roster events will not be delivered anywhere. Definition at line 337 of file rostermanager.cpp. |
|
This function returns the roster.
Definition at line 63 of file rostermanager.cpp. |
|
Use this function to set the group delimiter (JEP-0083).
Definition at line 417 of file rostermanager.cpp. References Tag::addAttrib(), and PrivateXML::storeXML(). |
|
Use this function to subscribe to a new JID. The contact is added to the roster automatically (by compliant servers, as required by RFC 3921).
Definition at line 144 of file rostermanager.cpp. References RosterManager::add(), Tag::addAttrib(), JID::full(), ClientBase::jid(), and ClientBase::send(). |
|
Synchronizes locally modified RosterItems back to the server. Definition at line 224 of file rostermanager.cpp. References Tag::addAttrib(), Tag::addChild(), and ClientBase::getID(). |
|
Use this function to unsubscribe from a JID in the roster.
Definition at line 194 of file rostermanager.cpp. References Tag::addAttrib(), Tag::addChild(), JID::bare(), ClientBase::getID(), ClientBase::jid(), and ClientBase::send(). |