#include <opal.h>
Public Member Functions | |
| OpalContext () | |
| Construct an unintialised OPAL context. | |
| virtual | ~OpalContext () |
| Destroy the OPAL context, calls ShutDown(). | |
| unsigned | Initialise (const char *options, unsigned version=OPAL_C_API_VERSION) |
| bool | IsInitialised () const |
| Indicate if the OPAL context has been initialised. | |
| void | ShutDown () |
| Calls OpalShutDown() to dispose of the OPAL context. | |
| bool | GetMessage (OpalMessagePtr &message, unsigned timeout=0) |
| Calls OpalGetMessage() to get next message from the OPAL context. | |
| bool | SendMessage (const OpalMessagePtr &message, OpalMessagePtr &response) |
| Calls OpalSendMessage() to send a message to the OPAL context. | |
| bool | SetUpCall (OpalMessagePtr &response, const char *partyB, const char *partyA=NULL, const char *alertingType=NULL) |
| Execute OpalSendMessage() using OpalCmdSetUpCall. | |
| bool | AnswerCall (const char *callToken) |
| Answer a call using OpalCmdAnswerCall via OpalSendMessage(). | |
| bool | ClearCall (const char *callToken, OpalCallEndReason reason=OpalCallEndedByLocalUser) |
| Clear a call using OpalCmdClearCall via OpalSendMessage(). | |
| bool | SendUserInput (const char *callToken, const char *userInput, unsigned duration=0) |
| Send user input using OpalCmdUserInput via OpalSendMessage(). | |
Protected Attributes | |
| OpalHandle | m_handle |
It may seem odd to have a C++ wrapper around a "C" API which is itself a wrapper around a C++ API, but sometimes a C++ programmer may wish to access the OPAL system via this simplified API instead of the quite complex one in the base OPAL library.
| OpalContext::OpalContext | ( | ) |
Construct an unintialised OPAL context.
| virtual OpalContext::~OpalContext | ( | ) | [virtual] |
Destroy the OPAL context, calls ShutDown().
| bool OpalContext::AnswerCall | ( | const char * | callToken | ) |
Answer a call using OpalCmdAnswerCall via OpalSendMessage().
| callToken | Call token for call being answered. |
| bool OpalContext::ClearCall | ( | const char * | callToken, | |
| OpalCallEndReason | reason = OpalCallEndedByLocalUser | |||
| ) |
Clear a call using OpalCmdClearCall via OpalSendMessage().
| callToken | Call token for call being cleared. |
| reason | Code for the call termination, see OpalCmdClearCall. |
| bool OpalContext::GetMessage | ( | OpalMessagePtr & | message, | |
| unsigned | timeout = 0 | |||
| ) |
Calls OpalGetMessage() to get next message from the OPAL context.
| unsigned OpalContext::Initialise | ( | const char * | options, | |
| unsigned | version = OPAL_C_API_VERSION | |||
| ) |
Calls OpalIntialise() to initialise the OPAL context. Returns version of API supported by library, zero if error.
| options | List of options to pass to OpalIntialise() |
| version | Version expected by application |
| bool OpalContext::IsInitialised | ( | ) | const [inline] |
Indicate if the OPAL context has been initialised.
| bool OpalContext::SendMessage | ( | const OpalMessagePtr & | message, | |
| OpalMessagePtr & | response | |||
| ) |
Calls OpalSendMessage() to send a message to the OPAL context.
| message | Message to send to OPAL. |
| response | Response from OPAL. |
| bool OpalContext::SendUserInput | ( | const char * | callToken, | |
| const char * | userInput, | |||
| unsigned | duration = 0 | |||
| ) |
Send user input using OpalCmdUserInput via OpalSendMessage().
| callToken | Call token for the call, see OpalCmdUserInput. |
| userInput | User input string, e.g. "#", see OpalCmdUserInput. |
| duration | Duration in milliseconds for tone, see OpalCmdUserInput. |
| bool OpalContext::SetUpCall | ( | OpalMessagePtr & | response, | |
| const char * | partyB, | |||
| const char * | partyA = NULL, |
|||
| const char * | alertingType = NULL | |||
| ) |
Execute OpalSendMessage() using OpalCmdSetUpCall.
| response | Response from OPAL context on initiating call. |
| partyB | Destination address, see OpalCmdSetUpCall. |
| partyA | Calling sub-system, see OpalCmdSetUpCall. |
| alertingType | Alerting type code, see OpalCmdSetUpCall. |
| void OpalContext::ShutDown | ( | ) |
Calls OpalShutDown() to dispose of the OPAL context.
OpalHandle OpalContext::m_handle [protected] |
1.4.7