discohandler.h
/*
Copyright (c) 2004-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 DISCOHANDLER_H__
#define DISCOHANDLER_H__
#include "macros.h"
#include "disco.h"
#include <string>
namespace gloox
{
class IQ;
class GLOOX_API DiscoHandler
{
public:
virtual ~DiscoHandler() {}
virtual void handleDiscoInfo( const JID& from, const Disco::Info& info, int context ) = 0;
virtual void handleDiscoItems( const JID& from, const Disco::Items& items, int context ) = 0;
virtual void handleDiscoError( const JID& from, const Error* error, int context ) = 0;
virtual bool handleDiscoSet( const IQ& iq ) { (void)iq; return false; }
};
}
#endif // DISCOHANDLER_H__
gloox::DiscoHandler
A virtual interface that enables objects to receive Service Discovery (XEP-0030) events.
Definition discohandler.h:35
gloox::DiscoHandler::~DiscoHandler
virtual ~DiscoHandler()
Definition discohandler.h:40
gloox::DiscoHandler::handleDiscoItems
virtual void handleDiscoItems(const JID &from, const Disco::Items &items, int context)=0
gloox::DiscoHandler::handleDiscoSet
virtual bool handleDiscoSet(const IQ &iq)
Definition discohandler.h:77
gloox::DiscoHandler::handleDiscoInfo
virtual void handleDiscoInfo(const JID &from, const Disco::Info &info, int context)=0
gloox::DiscoHandler::handleDiscoError
virtual void handleDiscoError(const JID &from, const Error *error, int context)=0
gloox::Disco::Info
An abstraction of a Disco Info element (from Service Discovery, XEP-0030) as a StanzaExtension.
Definition disco.h:66
gloox::Disco::Items
An abstraction of a Disco query element (from Service Discovery, XEP-0030) in the disco::items namesp...
Definition disco.h:276
gloox::Error
A stanza error abstraction implemented as a StanzaExtension.
Definition error.h:35
gloox::IQ
An abstraction of an IQ stanza.
Definition iq.h:34
gloox::JID
An abstraction of a JID.
Definition jid.h:31
gloox
The namespace for the gloox library.
Definition adhoc.cpp:28