A virtual interface for an Ad-hoc Command Provider according to XEP-0050. More...
#include <adhoccommandprovider.h>
Public Member Functions | |
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) |
A virtual interface for an Ad-hoc Command Provider according to XEP-0050.
Derived classes can be registered as Command Providers with the Adhoc object.
Definition at line 36 of file adhoccommandprovider.h.
virtual ~AdhocCommandProvider | ( | ) | [inline, virtual] |
Virtual destructor.
Definition at line 42 of file adhoccommandprovider.h.
virtual bool handleAdhocAccessRequest | ( | const JID & | from, | |
const std::string & | command | |||
) | [inline, virtual] |
This function gets called for each registered command when a remote entity requests the list of available commands.
from | The requesting entity. | |
command | The command's name. |
Definition at line 68 of file adhoccommandprovider.h.
virtual void handleAdhocCommand | ( | const JID & | from, | |
const Adhoc::Command & | command, | |||
const std::string & | sessionID | |||
) | [pure virtual] |
This function is called when an Ad-hoc Command needs to be handled. The callee is responsible for the whole command execution, i.e. session handling etc.
from | The sender of the command request. | |
command | The name of the command to be executed. | |
sessionID | The session ID. Either newly generated or taken from the command. When responding, its value must be passed to Adhoc::Command's constructor. |