astxx::manager::action::getvar Class Reference

#include <astxx/manager/action/getvar.h>

Inheritance diagram for astxx::manager::action::getvar:

Inheritance graph
[legend]
Collaboration diagram for astxx::manager::action::getvar:

Collaboration graph
[legend]

List of all members.


Detailed Description

Get a channel variable.

Todo:
Maybe a handle_event method should throw an exception when the channel is not found or when values are not specified.

Definition at line 41 of file getvar.h.


Public Member Functions

message::action action () const
 Format this command as a header for sending to Asterisk.
virtual void action_id (const std::string &id)
 Set the ActionID for this action.
virtual std::string action_id () const
 Get the ActionID for this action.
 getvar (const std::string &channel, const std::string &variable)
 Get a channel variable.
message::response handle_response (message::response response)
 Handle the response from Asterisk.
 operator std::string ()
 std::string conversion operator.
message::response operator() (connection &c)
 Send this action over this connection and handle the response.
std::string value ()
 Get the value.

Constructor & Destructor Documentation

astxx::manager::action::getvar::getvar ( const std::string &  channel,
const std::string &  variable 
) [inline]

Get a channel variable.

Parameters:
channel the channel to get the variable from
variable the variable to get

Definition at line 47 of file getvar.h.


Member Function Documentation

message::action astxx::manager::action::getvar::action (  )  const [inline, virtual]

Format this command as a header for sending to Asterisk.

This function is called by manager::connection::send_action() to get the data to send to Asterisk.

Returns:
a message::action message to send to Asterisk

Implements astxx::manager::basic_action.

Definition at line 50 of file getvar.h.

virtual std::string astxx::manager::basic_action::action_id (  )  const [inline, virtual, inherited]

Get the ActionID for this action.

Returns:
the ActionID for this action.

Definition at line 62 of file basic_action.h.

Referenced by astxx::manager::action::status::action(), and astxx::manager::connection::send_action_async().

message::response astxx::manager::action::getvar::handle_response ( message::response  response  )  [inline, virtual]

Handle the response from Asterisk.

Parameters:
response the response
Returns:
the response

Reimplemented from astxx::manager::basic_action.

Definition at line 61 of file getvar.h.

References astxx::manager::basic_action::handle_response().

astxx::manager::action::getvar::operator std::string (  )  [inline]

std::string conversion operator.

Returns:
the value

Definition at line 77 of file getvar.h.

message::response astxx::manager::basic_action::operator() ( connection c  )  [inherited]

Send this action over this connection and handle the response.

Parameters:
c the connection to use
This function sends this action over the give connection to Asterisk and then passes the response through basic_action::handle_response() before returning it. basic_action::handle_response() will throw exceptions for most common errors.

Returns:
the response from Asterisk

Definition at line 103 of file basic_action.cc.

References astxx::manager::basic_action::handle_response().

std::string astxx::manager::action::getvar::value (  )  [inline]

Get the value.

Returns:
the value

Definition at line 70 of file getvar.h.


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

Generated on Thu Jul 3 01:32:50 2008 for Astxx by  doxygen 1.5.6