gloox  1.0.9
Public Member Functions | List of all members
PrivacyManager Class Reference

#include <privacymanager.h>

Inheritance diagram for PrivacyManager:
Inheritance graph
[legend]

Public Member Functions

 PrivacyManager (ClientBase *parent)
virtual ~PrivacyManager ()
std::string store (const std::string &name, const PrivacyListHandler::PrivacyList &list)
std::string requestListNames ()
std::string requestList (const std::string &name)
std::string removeList (const std::string &name)
std::string setDefault (const std::string &name)
std::string unsetDefault ()
std::string setActive (const std::string &name)
std::string unsetActive ()
void registerPrivacyListHandler (PrivacyListHandler *plh)
void removePrivacyListHandler ()
virtual bool handleIq (const IQ &iq)
virtual void handleIqID (const IQ &iq, int context)
- Public Member Functions inherited from IqHandler
virtual ~IqHandler ()

Detailed Description

This class implements a manager for privacy lists as defined in section 10 of RFC 3921.

Author
Jakob Schroeter js@ca.nosp@m.maya.nosp@m..net
Since
0.3

Definition at line 34 of file privacymanager.h.

Constructor & Destructor Documentation

PrivacyManager ( ClientBase parent)

Constructs a new PrivacyManager.

Parameters
parentThe ClientBase to use for communication.

Definition at line 192 of file privacymanager.cpp.

~PrivacyManager ( )
virtual

Virtual destructor.

Definition at line 202 of file privacymanager.cpp.

Member Function Documentation

bool handleIq ( const IQ iq)
virtual

Reimplement this function if you want to be notified about incoming IQs.

Parameters
iqThe complete IQ stanza.
Returns
Indicates whether a request of type 'get' or 'set' has been handled. This includes the obligatory 'result' answer. If you return false, an 'error' will be sent.
Since
1.0

Implements IqHandler.

Definition at line 236 of file privacymanager.cpp.

void handleIqID ( const IQ iq,
int  context 
)
virtual

Reimplement this function if you want to be notified about incoming IQs with a specific value of the id attribute. You have to enable tracking of those IDs using Client::trackID(). This is usually useful for IDs that generate a positive reply, i.e. <iq type='result' id='reg'/> where a namespace filter wouldn't work.

Parameters
iqThe complete IQ stanza.
contextA value to restore context, stored with ClientBase::trackID().
Note
Only IQ stanzas of type 'result' or 'error' can arrive here.
Since
1.0

Implements IqHandler.

Definition at line 249 of file privacymanager.cpp.

void registerPrivacyListHandler ( PrivacyListHandler plh)
inline

Use this function to register an object as PrivacyListHandler. Only one PrivacyListHandler at a time is possible.

Parameters
plhThe object to register as handler for privacy list related events.

Definition at line 107 of file privacymanager.h.

std::string removeList ( const std::string &  name)
inline

Removes a list by its name.

Parameters
nameThe name of the list to remove.

Definition at line 73 of file privacymanager.h.

void removePrivacyListHandler ( )
inline

Use this function to clear the registered PrivacyListHandler.

Definition at line 113 of file privacymanager.h.

std::string requestList ( const std::string &  name)
inline

Triggers the retrieval of the named privacy lists.

Parameters
nameThe name of the list to retrieve.

Definition at line 66 of file privacymanager.h.

std::string requestListNames ( )
inline

Triggers the request of the privacy lists currently stored on the server.

Definition at line 59 of file privacymanager.h.

std::string setActive ( const std::string &  name)
inline

Sets the named list as active, i.e. active for this session

Parameters
nameThe name of the list to set active.

Definition at line 93 of file privacymanager.h.

std::string setDefault ( const std::string &  name)
inline

Sets the named list as the default list, i.e. active by default after login.

Parameters
nameThe name of the list to set as default.

Definition at line 80 of file privacymanager.h.

std::string store ( const std::string &  name,
const PrivacyListHandler::PrivacyList list 
)

Stores the given list on the server. If a list with the given name exists, the existing list is overwritten.

Parameters
nameThe list's name.
listA non empty list of privacy items which describe the list.

Definition at line 223 of file privacymanager.cpp.

std::string unsetActive ( )
inline

This function declines the use of any active list.

Definition at line 99 of file privacymanager.h.

std::string unsetDefault ( )
inline

This function declines the use of any default list.

Definition at line 86 of file privacymanager.h.


The documentation for this class was generated from the following files: