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;
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 that allows to retrieve Privacy Lists.
std::list< PrivacyItem > PrivacyList
This class implements a manager for privacy lists as defined in section 10 of RFC 3921.
void removePrivacyListHandler()
std::string requestListNames()
std::string removeList(const std::string &name)
std::string setDefault(const std::string &name)
std::string unsetActive()
std::string setActive(const std::string &name)
void registerPrivacyListHandler(PrivacyListHandler *plh)
std::string unsetDefault()
std::string requestList(const std::string &name)
The namespace for the gloox library.
std::list< std::string > StringList
const std::string EmptyString