gloox
1.0
|
#include <adhoc.h>
Classes | |
class | Note |
Public Types | |
enum | Action { Execute = 1, Cancel = 2, Previous = 4, Next = 8, Complete = 16, InvalidAction = 32 } |
enum | Status { Executing, Completed, Canceled, InvalidStatus } |
typedef std::list< const Note * > | NoteList |
Public Member Functions | |
Command (const std::string &node, const std::string &sessionid, Action action, DataForm *form=0) | |
Command (const std::string &node, const std::string &sessionid, Status status, DataForm *form=0) | |
Command (const std::string &node, const std::string &sessionid, Status status, Action executeAction, int allowedActions=Complete, DataForm *form=0) | |
Command (const std::string &node, Action action, DataForm *form=0) | |
Command (const Tag *tag=0) | |
virtual | ~Command () |
const std::string & | node () const |
const std::string & | sessionID () const |
Status | status () const |
Action | action () const |
int | actions () const |
const NoteList & | notes () const |
void | addNote (const Note *note) |
const DataForm * | form () const |
virtual const std::string & | filterString () const |
virtual StanzaExtension * | newInstance (const Tag *tag) const |
virtual Tag * | tag () const |
virtual StanzaExtension * | clone () const |
An abstraction of an Adhoc Command element (from Adhoc Commands, XEP-0050) as a StanzaExtension.
enum Action |
Specifies the action to undertake with the given command.
enum Status |
Command | ( | const std::string & | node, |
const std::string & | sessionid, | ||
Action | action, | ||
DataForm * | form = 0 |
||
) |
Creates a Command object that can be used to perform the provided Action. This constructor is used best to continue execution of a multi stage command (for which the session ID must be known).
Command | ( | const std::string & | node, |
const std::string & | sessionid, | ||
Status | status, | ||
DataForm * | form = 0 |
||
) |
Creates a Command object that can be used to perform the provided Action. This constructor is used best to reply to an execute request.
Command | ( | const std::string & | node, |
const std::string & | sessionid, | ||
Status | status, | ||
Action | executeAction, | ||
int | allowedActions = Complete , |
||
DataForm * | form = 0 |
||
) |
Creates a Command object that can be used to perform the provided Action. This constructor is used best to reply to a multi stage command that is not yet completed (for which the session ID must be known).
node | The node (command) to perform the action on. |
sessionid | The (possibly newly created) session ID of the adhoc command session. |
status | The execution status. |
executeAction | The action to execute. |
allowedActions | Allowed reply actions. |
form | An optional DataForm to include in the reply. Will be deleted in Command's destructor. |
Creates a Command object that can be used to perform the provided Action. This constructor is used best to execute the initial step of a command (single or multi stage).
int actions | ( | ) | const [inline] |
virtual StanzaExtension* clone | ( | ) | const [inline, virtual] |
Returns an identical copy of the current StanzaExtension.
Implements StanzaExtension.
const std::string & filterString | ( | ) | const [virtual] |
Returns an XPath expression that describes a path to child elements of a stanza that an extension handles.
Implements StanzaExtension.
virtual StanzaExtension* newInstance | ( | const Tag * | tag | ) | const [inline, virtual] |
Returns a new Instance of the derived type. Usually, for a derived class FooExtension, the implementation of this function looks like:
StanzaExtension* FooExtension::newInstance( const Tag* tag ) const { return new FooExtension( tag ); }
Implements StanzaExtension.
const std::string& node | ( | ) | const [inline] |
const std::string& sessionID | ( | ) | const [inline] |
Returns a Tag representation of the extension.
Implements StanzaExtension.