Classes | Public Types | Public Member Functions

Swift::Command Class Reference

Ad-Hoc Command (XEP-0050). More...

Inheritance diagram for Swift::Command:
Collaboration diagram for Swift::Command:

List of all members.

Classes

struct  Note

Public Types

enum  Status { Executing, Completed, Canceled, NoStatus }
enum  Action {
  Cancel, Execute, Complete, Prev,
  Next, NoAction
}
typedef boost::shared_ptr
< Command
ref

Public Member Functions

 Command (const std::string &node, const std::string &sessionID, Status status)
 Command (const std::string &node="", const std::string &sessionID="", Action action=Execute)
const std::string & getNode () const
void setNode (const std::string &node)
const std::string & getSessionID () const
void setSessionID (const std::string &id)
Action getAction () const
void setAction (Action action)
void setExecuteAction (Action action)
Action getExecuteAction () const
Status getStatus () const
void setStatus (Status status)
void addAvailableAction (Action action)
const std::vector< Action > & getAvailableActions () const
void addNote (const Note &note)
const std::vector< Note > & getNotes () const
Form::ref getForm () const
void setForm (Form::ref payload)

Detailed Description

Ad-Hoc Command (XEP-0050).

Definition at line 19 of file Command.h.


Member Typedef Documentation

typedef boost::shared_ptr<Command> Swift::Command::ref

Reimplemented from Swift::Payload.

Definition at line 21 of file Command.h.


Member Enumeration Documentation

Enumerator:
Cancel 
Execute 
Complete 
Prev 
Next 
NoAction 

Definition at line 24 of file Command.h.

Enumerator:
Executing 
Completed 
Canceled 
NoStatus 

Definition at line 23 of file Command.h.


Constructor & Destructor Documentation

Swift::Command::Command ( const std::string &  node,
const std::string &  sessionID,
Status  status 
) [inline]

Definition at line 36 of file Command.h.

References NoAction.

Swift::Command::Command ( const std::string &  node = "",
const std::string &  sessionID = "",
Action  action = Execute 
) [inline]

Definition at line 37 of file Command.h.

References NoStatus.


Member Function Documentation

void Swift::Command::addAvailableAction ( Action  action  )  [inline]

Definition at line 54 of file Command.h.

void Swift::Command::addNote ( const Note note  )  [inline]

Definition at line 56 of file Command.h.

Action Swift::Command::getAction (  )  const [inline]

Definition at line 45 of file Command.h.

const std::vector<Action>& Swift::Command::getAvailableActions (  )  const [inline]

Definition at line 55 of file Command.h.

Action Swift::Command::getExecuteAction (  )  const [inline]

Definition at line 49 of file Command.h.

Form::ref Swift::Command::getForm (  )  const [inline]

Definition at line 59 of file Command.h.

const std::string& Swift::Command::getNode (  )  const [inline]

Definition at line 39 of file Command.h.

const std::vector<Note>& Swift::Command::getNotes (  )  const [inline]

Definition at line 57 of file Command.h.

const std::string& Swift::Command::getSessionID (  )  const [inline]

Definition at line 42 of file Command.h.

Status Swift::Command::getStatus (  )  const [inline]

Definition at line 51 of file Command.h.

void Swift::Command::setAction ( Action  action  )  [inline]

Definition at line 46 of file Command.h.

void Swift::Command::setExecuteAction ( Action  action  )  [inline]

Definition at line 48 of file Command.h.

void Swift::Command::setForm ( Form::ref  payload  )  [inline]

Definition at line 60 of file Command.h.

void Swift::Command::setNode ( const std::string &  node  )  [inline]

Definition at line 40 of file Command.h.

void Swift::Command::setSessionID ( const std::string &  id  )  [inline]

Definition at line 43 of file Command.h.

void Swift::Command::setStatus ( Status  status  )  [inline]

Definition at line 52 of file Command.h.