privacymanager.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef PRIVACYMANAGER_H__
00015 #define PRIVACYMANAGER_H__
00016
00017 #include "iqhandler.h"
00018 #include "privacylisthandler.h"
00019
00020 #include <string>
00021
00022 namespace gloox
00023 {
00024
00025 class ClientBase;
00026
00033 class GLOOX_API PrivacyManager : public IqHandler
00034 {
00035 public:
00040 PrivacyManager( ClientBase *parent );
00041
00045 virtual ~PrivacyManager();
00046
00050 std::string requestListNames();
00051
00056 std::string requestList( const std::string& name );
00057
00064 std::string store( const std::string& name,
00065 const PrivacyListHandler::PrivacyList& list );
00066
00071 std::string removeList( const std::string& name );
00072
00077 std::string setDefault( const std::string& name );
00078
00082 std::string unsetDefault();
00083
00088 std::string setActive( const std::string& name );
00089
00093 std::string unsetActive();
00094
00100 void registerPrivacyListHandler( PrivacyListHandler *plh );
00101
00105 void removePrivacyListHandler();
00106
00107
00108 virtual bool handleIq( Stanza *stanza );
00109
00110
00111 virtual bool handleIqID( Stanza *stanza, int context );
00112
00113 private:
00114 enum IdType
00115 {
00116 PLRequestNames,
00117 PLRequestList,
00118 PLActivate,
00119 PLDefault,
00120 PLUnsetActivate,
00121 PLUnsetDefault,
00122 PLRemove,
00123 PLStore
00124 };
00125
00126 ClientBase *m_parent;
00127 PrivacyListHandler *m_privacyListHandler;
00128 };
00129
00130 }
00131
00132 #endif // PRIVACYMANAGER_H__