gloox  1.0.1
Public Member Functions | List of all members
AdhocCommandProvider Class Reference

#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)

Detailed Description

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.

Jakob Schroeter

Definition at line 36 of file adhoccommandprovider.h.

Constructor & Destructor Documentation

virtual ~AdhocCommandProvider ( )

Virtual destructor.

Definition at line 42 of file adhoccommandprovider.h.

Member Function Documentation

virtual bool handleAdhocAccessRequest ( const JID from,
const std::string &  command 

This function gets called for each registered command when a remote entity requests the list of available commands.

fromThe requesting entity.
commandThe command's name.
True if the remote entity is allowed to see the command, false if not.
The return value of this function does not influence the execution of a command. That is, you have to implement additional access control at the execution stage.
This function should not block.

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.

fromThe sender of the command request.
commandThe name of the command to be executed.
sessionIDThe session ID. Either newly generated or taken from the command. When responding, its value must be passed to Adhoc::Command's constructor.

The documentation for this class was generated from the following file: