A virtual interface for an Ad-hoc Command users according to XEP-0050. More...
#include <adhochandler.h>
Public Member Functions | |
virtual | ~AdhocHandler () |
virtual void | handleAdhocSupport (const JID &remote, bool support)=0 |
virtual void | handleAdhocCommands (const JID &remote, const StringMap &commands)=0 |
virtual void | handleAdhocError (const JID &remote, StanzaError error)=0 |
virtual void | handleAdhocExecutionResult (const JID &remote, const std::string &command, Adhoc::AdhocCommandStatus status, const std::string &sessionid, const DataForm &form, int actions, Adhoc::AdhocExecuteActions defaultAction, const std::string ¬e, Adhoc::AdhocNoteType type)=0 |
A virtual interface for an Ad-hoc Command users according to XEP-0050.
Derived classes can be registered with the Adhoc object to receive notifications about Adhoc Commands remote entities support.
Definition at line 35 of file adhochandler.h.
virtual ~AdhocHandler | ( | ) | [inline, virtual] |
Virtual destructor.
Definition at line 41 of file adhochandler.h.
This function is called in response to a call to Adhoc::getCommands() and delivers a list of supported commands.
remote | The queried remote entity's JID. | |
commands | A map of supported commands and their human-readable name. The map may be empty. |
virtual void handleAdhocError | ( | const JID & | remote, | |
StanzaError | error | |||
) | [pure virtual] |
This function is called in response to a call to Adhoc::getCommands() or Adhoc::checkSupport() in case the respective request returned an error.
remote | The queried remote entity's JID. | |
error | The error condition. |
virtual void handleAdhocExecutionResult | ( | const JID & | remote, | |
const std::string & | command, | |||
Adhoc::AdhocCommandStatus | status, | |||
const std::string & | sessionid, | |||
const DataForm & | form, | |||
int | actions, | |||
Adhoc::AdhocExecuteActions | defaultAction, | |||
const std::string & | note, | |||
Adhoc::AdhocNoteType | type | |||
) | [pure virtual] |
This function is called in response to a remote command execution.
remote | The remote entity's JID. | |
command | The command being executed. | |
status | The command's execution status. | |
sessionid | The current execution cycle's ID. | |
form | A Data Form for the client to display, containing a result or additional input fields for the user to fill in. | |
actions | ORed AdhocExecuteActions which are allowed to be executed from the current stage. | |
defaultAction | The default action that will be executed if none of the allowed actions is chosen. | |
note | A textual note containing information about current conditions in a command sequence. May be empty (no note). | |
type | The note's severity. |
virtual void handleAdhocSupport | ( | const JID & | remote, | |
bool | support | |||
) | [pure virtual] |
This function is called in response to a call to Adhoc::checkSupport().