adhoccommandprovider.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 ADHOCCOMMANDPROVIDER_H__
#define ADHOCCOMMANDPROVIDER_H__
#include "tag.h"
#include "jid.h"
#include "adhoc.h"
#include <list>
#include <map>
#include <string>
namespace gloox
{
class GLOOX_API AdhocCommandProvider
{
public:
virtual ~AdhocCommandProvider() {}
virtual void handleAdhocCommand( const JID& from, const Adhoc::Command& command,
const std::string& sessionID ) = 0;
virtual bool handleAdhocAccessRequest( const JID& from, const std::string& command )
{
(void)from;
(void)command;
return true;
}
};
}
#endif // ADHOCCOMMANDPROVIDER_H__
gloox::AdhocCommandProvider
A virtual interface for an Ad-hoc Command Provider according to XEP-0050.
Definition adhoccommandprovider.h:37
gloox::AdhocCommandProvider::~AdhocCommandProvider
virtual ~AdhocCommandProvider()
Definition adhoccommandprovider.h:42
gloox::AdhocCommandProvider::handleAdhocCommand
virtual void handleAdhocCommand(const JID &from, const Adhoc::Command &command, const std::string &sessionID)=0
gloox::AdhocCommandProvider::handleAdhocAccessRequest
virtual bool handleAdhocAccessRequest(const JID &from, const std::string &command)
Definition adhoccommandprovider.h:68
gloox::Adhoc::Command
An abstraction of an Adhoc Command element (from Adhoc Commands, XEP-0050) as a StanzaExtension.
Definition adhoc.h:92
gloox::JID
An abstraction of a JID.
Definition jid.h:31
gloox
The namespace for the gloox library.
Definition adhoc.cpp:28