privacylisthandler.h
/*
Copyright (c) 2005-2023 by Jakob Schröter <js@camaya.net>
This file is part of the gloox library. http://camaya.net/gloox
This software is distributed under a license. The full license
agreement can be found in the file LICENSE in this distribution.
This software may not be copied, modified, sold or distributed
other than expressed in the named license agreement.
This software is distributed without any warranty.
*/
#ifndef PRIVACYLISTHANDLER_H__
#define PRIVACYLISTHANDLER_H__
#include "privacyitem.h"
#include "gloox.h"
#include <string>
#include <list>
namespace gloox
{
enum PrivacyListResult
{
ResultStoreSuccess,
ResultActivateSuccess,
ResultDefaultSuccess,
ResultRemoveSuccess,
ResultRequestNamesSuccess,
ResultRequestListSuccess,
ResultConflict,
ResultItemNotFound,
ResultBadRequest,
ResultUnknownError
};
class GLOOX_API PrivacyListHandler
{
public:
typedef std::list<PrivacyItem> PrivacyList;
virtual ~PrivacyListHandler() {}
virtual void handlePrivacyListNames( const std::string& active, const std::string& def,
const StringList& lists ) = 0;
virtual void handlePrivacyList( const std::string& name, const PrivacyList& items ) = 0;
virtual void handlePrivacyListChanged( const std::string& name ) = 0;
virtual void handlePrivacyListResult( const std::string& id, PrivacyListResult plResult ) = 0;
};
}
#endif // PRIVACYLISTHANDLER_H__
gloox::PrivacyListHandler
A virtual interface that allows to retrieve Privacy Lists.
Definition privacylisthandler.h:51
gloox::PrivacyListHandler::handlePrivacyList
virtual void handlePrivacyList(const std::string &name, const PrivacyList &items)=0
gloox::PrivacyListHandler::PrivacyList
std::list< PrivacyItem > PrivacyList
Definition privacylisthandler.h:57
gloox::PrivacyListHandler::~PrivacyListHandler
virtual ~PrivacyListHandler()
Definition privacylisthandler.h:62
gloox::PrivacyListHandler::handlePrivacyListNames
virtual void handlePrivacyListNames(const std::string &active, const std::string &def, const StringList &lists)=0
gloox::PrivacyListHandler::handlePrivacyListChanged
virtual void handlePrivacyListChanged(const std::string &name)=0
gloox::PrivacyListHandler::handlePrivacyListResult
virtual void handlePrivacyListResult(const std::string &id, PrivacyListResult plResult)=0
gloox
The namespace for the gloox library.
Definition adhoc.cpp:28
gloox::StringList
std::list< std::string > StringList
Definition gloox.h:1251
gloox::PrivacyListResult
PrivacyListResult
Definition privacylisthandler.h:30
gloox::ResultRemoveSuccess
@ ResultRemoveSuccess
Definition privacylisthandler.h:34
gloox::ResultUnknownError
@ ResultUnknownError
Definition privacylisthandler.h:41
gloox::ResultBadRequest
@ ResultBadRequest
Definition privacylisthandler.h:40
gloox::ResultActivateSuccess
@ ResultActivateSuccess
Definition privacylisthandler.h:32
gloox::ResultStoreSuccess
@ ResultStoreSuccess
Definition privacylisthandler.h:31
gloox::ResultRequestListSuccess
@ ResultRequestListSuccess
Definition privacylisthandler.h:36
gloox::ResultRequestNamesSuccess
@ ResultRequestNamesSuccess
Definition privacylisthandler.h:35
gloox::ResultItemNotFound
@ ResultItemNotFound
Definition privacylisthandler.h:39
gloox::ResultConflict
@ ResultConflict
Definition privacylisthandler.h:37
gloox::ResultDefaultSuccess
@ ResultDefaultSuccess
Definition privacylisthandler.h:33