pubsubresulthandler.h
/*
Copyright (c) 2007-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 PUBSUBRESULTHANDLER_H__
#define PUBSUBRESULTHANDLER_H__
#include "error.h"
#include "jid.h"
#include "macros.h"
#include "pubsub.h"
#include "tag.h"
#include <string>
#include <list>
#include <map>
namespace gloox
{
class Tag;
class Error;
class DataForm;
namespace PubSub
{
class GLOOX_API ResultHandler
{
public:
virtual ~ResultHandler() {}
virtual void handleItem( const JID& service,
const std::string& node,
const Tag* entry ) = 0;
virtual void handleItems( const std::string& id,
const JID& service,
const std::string& node,
const ItemList& itemList,
const Error* error = 0 ) = 0;
virtual void handleItemPublication( const std::string& id,
const JID& service,
const std::string& node,
const ItemList& itemList,
const Error* error = 0 ) = 0;
virtual void handleItemDeletion( const std::string& id,
const JID& service,
const std::string& node,
const ItemList& itemList,
const Error* error = 0 ) = 0;
virtual void handleSubscriptionResult( const std::string& id,
const JID& service,
const std::string& node,
const std::string& sid,
const JID& jid,
const SubscriptionType subType,
const Error* error = 0 ) = 0;
virtual void handleUnsubscriptionResult( const std::string& id,
const JID& service,
const Error* error = 0 ) = 0;
virtual void handleSubscriptionOptions( const std::string& id,
const JID& service,
const JID& jid,
const std::string& node,
const DataForm* options,
const std::string& sid = EmptyString,
const Error* error = 0 ) = 0;
virtual void handleSubscriptionOptionsResult( const std::string& id,
const JID& service,
const JID& jid,
const std::string& node,
const std::string& sid = EmptyString,
const Error* error = 0 ) = 0;
virtual void handleSubscribers( const std::string& id,
const JID& service,
const std::string& node,
const SubscriptionList& list,
const Error* error = 0 ) = 0;
virtual void handleSubscribersResult( const std::string& id,
const JID& service,
const std::string& node,
const SubscriberList* list,
const Error* error = 0 ) = 0;
virtual void handleAffiliates( const std::string& id,
const JID& service,
const std::string& node,
const AffiliateList* list,
const Error* error = 0 ) = 0;
virtual void handleAffiliatesResult( const std::string& id,
const JID& service,
const std::string& node,
const AffiliateList* list,
const Error* error = 0 ) = 0;
virtual void handleNodeConfig( const std::string& id,
const JID& service,
const std::string& node,
const DataForm* config,
const Error* error = 0 ) = 0;
virtual void handleNodeConfigResult( const std::string& id,
const JID& service,
const std::string& node,
const Error* error = 0 ) = 0;
virtual void handleNodeCreation( const std::string& id,
const JID& service,
const std::string& node,
const Error* error = 0 ) = 0;
virtual void handleNodeDeletion( const std::string& id,
const JID& service,
const std::string& node,
const Error* error = 0 ) = 0;
virtual void handleNodePurge( const std::string& id,
const JID& service,
const std::string& node,
const Error* error = 0 ) = 0;
virtual void handleSubscriptions( const std::string& id,
const JID& service,
const SubscriptionMap& subMap,
const Error* error = 0) = 0;
virtual void handleAffiliations( const std::string& id,
const JID& service,
const AffiliationMap& affMap,
const Error* error = 0 ) = 0;
virtual void handleDefaultNodeConfig( const std::string& id,
const JID& service,
const DataForm* config,
const Error* error = 0 ) = 0;
};
}
}
#endif // PUBSUBRESULTHANDLER_H__
gloox::DataForm
An abstraction of a XEP-0004 Data Form.
Definition dataform.h:57
gloox::Error
A stanza error abstraction implemented as a StanzaExtension.
Definition error.h:35
gloox::JID
An abstraction of a JID.
Definition jid.h:31
gloox::PubSub::ResultHandler
A virtual interface to receive item related requests results.
Definition pubsubresulthandler.h:50
gloox::PubSub::ResultHandler::handleItems
virtual void handleItems(const std::string &id, const JID &service, const std::string &node, const ItemList &itemList, const Error *error=0)=0
gloox::PubSub::ResultHandler::handleSubscriptionOptionsResult
virtual void handleSubscriptionOptionsResult(const std::string &id, const JID &service, const JID &jid, const std::string &node, const std::string &sid=EmptyString, const Error *error=0)=0
gloox::PubSub::ResultHandler::handleAffiliations
virtual void handleAffiliations(const std::string &id, const JID &service, const AffiliationMap &affMap, const Error *error=0)=0
gloox::PubSub::ResultHandler::handleDefaultNodeConfig
virtual void handleDefaultNodeConfig(const std::string &id, const JID &service, const DataForm *config, const Error *error=0)=0
gloox::PubSub::ResultHandler::handleNodeDeletion
virtual void handleNodeDeletion(const std::string &id, const JID &service, const std::string &node, const Error *error=0)=0
gloox::PubSub::ResultHandler::handleNodeConfigResult
virtual void handleNodeConfigResult(const std::string &id, const JID &service, const std::string &node, const Error *error=0)=0
gloox::PubSub::ResultHandler::handleSubscriptionOptions
virtual void handleSubscriptionOptions(const std::string &id, const JID &service, const JID &jid, const std::string &node, const DataForm *options, const std::string &sid=EmptyString, const Error *error=0)=0
gloox::PubSub::ResultHandler::handleSubscriptions
virtual void handleSubscriptions(const std::string &id, const JID &service, const SubscriptionMap &subMap, const Error *error=0)=0
gloox::PubSub::ResultHandler::handleUnsubscriptionResult
virtual void handleUnsubscriptionResult(const std::string &id, const JID &service, const Error *error=0)=0
gloox::PubSub::ResultHandler::handleSubscribers
virtual void handleSubscribers(const std::string &id, const JID &service, const std::string &node, const SubscriptionList &list, const Error *error=0)=0
gloox::PubSub::ResultHandler::handleItemPublication
virtual void handleItemPublication(const std::string &id, const JID &service, const std::string &node, const ItemList &itemList, const Error *error=0)=0
gloox::PubSub::ResultHandler::handleSubscriptionResult
virtual void handleSubscriptionResult(const std::string &id, const JID &service, const std::string &node, const std::string &sid, const JID &jid, const SubscriptionType subType, const Error *error=0)=0
gloox::PubSub::ResultHandler::handleItem
virtual void handleItem(const JID &service, const std::string &node, const Tag *entry)=0
gloox::PubSub::ResultHandler::handleAffiliatesResult
virtual void handleAffiliatesResult(const std::string &id, const JID &service, const std::string &node, const AffiliateList *list, const Error *error=0)=0
gloox::PubSub::ResultHandler::handleAffiliates
virtual void handleAffiliates(const std::string &id, const JID &service, const std::string &node, const AffiliateList *list, const Error *error=0)=0
gloox::PubSub::ResultHandler::handleNodePurge
virtual void handleNodePurge(const std::string &id, const JID &service, const std::string &node, const Error *error=0)=0
gloox::PubSub::ResultHandler::handleItemDeletion
virtual void handleItemDeletion(const std::string &id, const JID &service, const std::string &node, const ItemList &itemList, const Error *error=0)=0
gloox::PubSub::ResultHandler::handleNodeCreation
virtual void handleNodeCreation(const std::string &id, const JID &service, const std::string &node, const Error *error=0)=0
gloox::PubSub::ResultHandler::handleNodeConfig
virtual void handleNodeConfig(const std::string &id, const JID &service, const std::string &node, const DataForm *config, const Error *error=0)=0
gloox::PubSub::ResultHandler::handleSubscribersResult
virtual void handleSubscribersResult(const std::string &id, const JID &service, const std::string &node, const SubscriberList *list, const Error *error=0)=0
gloox::PubSub::ResultHandler::~ResultHandler
virtual ~ResultHandler()
Definition pubsubresulthandler.h:55
gloox::Tag
This is an abstraction of an XML element.
Definition tag.h:47
gloox::PubSub
Namespace holding all the Pubsub-related structures and definitions.
Definition pubsub.h:28
gloox::PubSub::SubscriptionType
SubscriptionType
Definition pubsub.h:61
gloox
The namespace for the gloox library.
Definition adhoc.cpp:28
gloox::EmptyString
const std::string EmptyString
Definition gloox.cpp:124