14 #ifndef ROSTERMANAGER_H__
15 #define ROSTERMANAGER_H__
17 #include "subscriptionhandler.h"
18 #include "privatexmlhandler.h"
19 #include "iqhandler.h"
20 #include "presencehandler.h"
21 #include "rosterlistener.h"
82 void subscribe(
const JID& jid,
const std::string& name =
EmptyString,
98 void add(
const JID& jid,
const std::string& name,
const StringList& groups );
108 void unsubscribe(
const JID& jid,
const std::string& msg =
EmptyString );
118 void cancel(
const JID& jid,
const std::string& msg =
EmptyString );
126 void remove(
const JID& jid );
134 void ackSubscriptionRequest(
const JID& to,
bool ack );
141 const std::string&
delimiter()
const {
return m_delimiter; }
148 void setDelimiter(
const std::string& delimiter );
165 void registerRosterListener(
RosterListener* rl,
bool syncSubscribeReq =
true );
171 void removeRosterListener();
174 virtual bool handleIq(
const IQ& iq );
177 virtual void handleIqID(
const IQ& iq,
int context );
180 virtual void handlePresence(
const Presence& presence );
183 virtual void handleSubscription(
const Subscription& subscription );
186 virtual void handlePrivateXML(
const Tag* xml );
189 virtual void handlePrivateXMLResult(
const std::string& uid, PrivateXMLResult pxResult );
192 #ifdef ROSTERMANAGER_TEST
195 typedef std::list<RosterItemData*> RosterData;
212 Query(
const JID& jid,
const std::string& name,
const StringList& groups );
218 Query(
const JID& jid );
224 Query(
const Tag* tag = 0 );
237 const RosterData& roster()
const {
return m_roster; }
240 virtual const std::string& filterString()
const;
243 virtual StanzaExtension* newInstance(
const Tag* tag )
const
245 return new Query( tag );
249 virtual Tag* tag()
const;
252 virtual StanzaExtension* clone()
const;
259 void mergePush(
const RosterData& data );
260 void mergeRoster(
const RosterData& data );
262 RosterListener* m_rosterListener;
264 ClientBase* m_parent;
265 PrivateXML* m_privateXML;
268 std::string m_delimiter;
269 bool m_syncSubscribeReq;
This is the common base class for a Jabber/XMPP Client and a Jabber Component.
An abstraction of an IQ stanza.
A virtual interface which can be reimplemented to receive IQ stanzas.
A virtual interface which can be reimplemented to receive presence stanzas.
An abstraction of a presence stanza.
A virtual interface which can be reimplemented to store and receive private XML data.
An abstraction of a roster item.
A virtual interface which can be reimplemented to receive roster updates.
This class implements Jabber/XMPP roster handling in the jabber:iq:roster namespace.
const std::string & delimiter() const
This class abstracts a stanza extension, which is usually an XML child element in a specific namespac...
A virtual interface which can be reimplemented to receive incoming subscription stanzas.
An abstraction of a subscription stanza.
This is an abstraction of an XML element.
The namespace for the gloox library.
std::list< std::string > StringList
const std::string EmptyString
std::map< const std::string, RosterItem * > Roster