|
OPAL
Version 3.14.3
|
#include <opal.h>
Public Member Functions | |
| OpalContext () | |
| Construct an unintialised OPAL context. More... | |
| virtual | ~OpalContext () |
| Destroy the OPAL context, calls ShutDown(). More... | |
| unsigned | Initialise (const char *options, unsigned version=OPAL_C_API_VERSION) |
| bool | IsInitialised () const |
| Indicate if the OPAL context has been initialised. More... | |
| void | ShutDown () |
| Calls OpalShutDown() to dispose of the OPAL context. More... | |
| bool | GetMessage (OpalMessagePtr &message, unsigned timeout=0) |
| Calls OpalGetMessage() to get next message from the OPAL context. More... | |
| bool | SendMessage (const OpalMessagePtr &message) |
| Calls OpalSendMessage() to send a message to the OPAL context. More... | |
| bool | SendMessage (const OpalMessagePtr &message, OpalMessagePtr &response) |
| bool | SetUpCall (OpalMessagePtr &response, const char *partyB, const char *partyA=NULL, const char *alertingType=NULL) |
| Execute OpalSendMessage() using OpalCmdSetUpCall. More... | |
| bool | AnswerCall (const char *callToken) |
| Answer a call using OpalCmdAnswerCall via OpalSendMessage() More... | |
| bool | ClearCall (const char *callToken, OpalCallEndReason reason=OpalCallEndedByLocalUser) |
| Clear a call using OpalCmdClearCall via OpalSendMessage() More... | |
| bool | SendUserInput (const char *callToken, const char *userInput, unsigned duration=0) |
| Send user input using OpalCmdUserInput via OpalSendMessage() More... | |
| __inline bool | GetMessageA (OpalMessagePtr &message, unsigned timeout=0) |
| __inline bool | GetMessageW (OpalMessagePtr &message, unsigned timeout=0) |
| __inline bool | SendMessageA (const OpalMessagePtr &message) |
| __inline bool | SendMessageA (const OpalMessagePtr &message, OpalMessagePtr &response) |
| __inline bool | SendMessageW (const OpalMessagePtr &message) |
| __inline bool | SendMessageW (const OpalMessagePtr &message, OpalMessagePtr &response) |
Protected Attributes | |
| OpalHandle | m_handle |
This class is a wrapper around the "C" API.
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 |
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.
Referenced by GetMessageA(), and GetMessageW().
|
inline |
References GetMessage().
|
inline |
References GetMessage().
| 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 |
|
inline |
Indicate if the OPAL context has been initialised.
References m_handle.
| bool OpalContext::SendMessage | ( | const OpalMessagePtr & | message | ) |
Calls OpalSendMessage() to send a message to the OPAL context.
| message | Message to send to OPAL. |
Referenced by SendMessageA(), and SendMessageW().
| bool OpalContext::SendMessage | ( | const OpalMessagePtr & | message, |
| OpalMessagePtr & | response | ||
| ) |
| message | Message to send to OPAL. |
| response | Response from OPAL. |
|
inline |
References SendMessage().
|
inline |
References SendMessage().
|
inline |
References SendMessage().
|
inline |
References SendMessage().
| 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.
|
protected |
Referenced by IsInitialised().