14 #ifndef PRIVACYMANAGER_H__
15 #define PRIVACYMANAGER_H__
17 #include "iqhandler.h"
18 #include "privacylisthandler.h"
19 #include "stanzaextension.h"
59 std::string requestListNames()
60 {
return operation( PLRequestNames,
EmptyString ); }
66 std::string requestList(
const std::string& name )
67 {
return operation( PLRequestList, name ); }
73 std::string removeList(
const std::string& name )
74 {
return operation( PLRemove, name ); }
80 std::string setDefault(
const std::string& name )
81 {
return operation( PLDefault, name ); }
86 std::string unsetDefault()
87 {
return operation( PLUnsetDefault,
EmptyString ); }
93 std::string setActive(
const std::string& name )
94 {
return operation( PLActivate, name ); }
99 std::string unsetActive()
100 {
return operation( PLUnsetActivate,
EmptyString ); }
108 { m_privacyListHandler = plh; }
113 void removePrivacyListHandler()
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__