14 #ifndef PRIVACYMANAGER_H__
15 #define PRIVACYMANAGER_H__
17 #include "iqhandler.h"
18 #include "privacylisthandler.h"
19 #include "stanzaextension.h"
60 {
return operation( PLRequestNames,
EmptyString ); }
67 {
return operation( PLRequestList, name ); }
74 {
return operation( PLRemove, name ); }
81 {
return operation( PLDefault, name ); }
87 {
return operation( PLUnsetDefault,
EmptyString ); }
94 {
return operation( PLActivate, name ); }
100 {
return operation( PLUnsetActivate,
EmptyString ); }
108 { m_privacyListHandler = plh; }
114 { m_privacyListHandler = 0; }
117 virtual bool handleIq(
const IQ& iq );
120 virtual void handleIqID(
const IQ& iq,
int context );
135 class Query :
public StanzaExtension
145 Query( IdType context,
const std::string& name,
152 Query(
const Tag* tag = 0 );
163 const std::string& active()
const {
return m_active; }
169 const std::string& def()
const {
return m_default; }
182 const StringList& names()
const {
return m_names; }
189 const std::string& name()
const
194 return (*m_names.begin());
198 virtual const std::string& filterString()
const;
201 virtual StanzaExtension* newInstance(
const Tag* tag )
const
203 return new Query( tag );
207 virtual Tag* tag()
const;
210 virtual StanzaExtension* clone()
const
212 return new Query( *
this );
218 std::string m_default;
219 std::string m_active;
223 std::string operation( IdType context,
const std::string& name );
225 ClientBase* m_parent;
226 PrivacyListHandler* m_privacyListHandler;
231 #endif // PRIVACYMANAGER_H__
This class implements a manager for privacy lists as defined in section 10 of RFC 3921...
A virtual interface that allows to retrieve Privacy Lists.
std::list< std::string > StringList
An abstraction of an IQ stanza.
std::string removeList(const std::string &name)
std::string requestList(const std::string &name)
void removePrivacyListHandler()
std::string requestListNames()
The namespace for the gloox library.
std::string setActive(const std::string &name)
void registerPrivacyListHandler(PrivacyListHandler *plh)
std::string unsetActive()
A virtual interface which can be reimplemented to receive IQ stanzas.
std::string unsetDefault()
std::string setDefault(const std::string &name)
const std::string EmptyString
This is the common base class for a Jabber/XMPP Client and a Jabber Component.
std::list< PrivacyItem > PrivacyList