The CallManager class provides methods to obtain the current call information and status.
The following example demonstrates how to use the CallManager class.
result MyClass::GetCallInfo(void) { CallType callType = TYPE_UNDEFINED_CALL; CallStatus callStatus = CALL_STATUS_UNDEFINED; CallManager *pCallManager = new CallManager(); result r = pCallManager->Construct(*this); if (IsFailed(r)) { delete pCallManager; return r; } callStatus = pCallManager->GetCurrentCallStatus(); if(callStatus == CALL_STATUS_COMMUNICATING) callType = pCallManager->GetCurrentCallType(); delete pCallManager; return E_SUCCESS; } void MyClass::::OnTelephonyCallStatusChangedN(CallStatus callStatus,CallInfo * pCallInfo) { CallType callType; String number; if (callStatus == CALL_STATUS_RINGING) { callType = pCallInfo->GetCallType(); number = pCallInfo->GetNumber(); } delete pCallInfo; }
Public Member Functions | |
CallManager (void) | |
result | Construct (const ITelephonyCallEventListener &listener) |
result | Construct (void) |
CallStatus | GetCurrentCallStatus (void) const |
CallType | GetCurrentCallType (void) const |
virtual | ~CallManager (void) |
Osp::Telephony::CallManager::CallManager | ( | void | ) |
This is the default constructor for this class.
virtual Osp::Telephony::CallManager::~CallManager | ( | void | ) | [virtual] |
This is the destructor for this class.
result Osp::Telephony::CallManager::Construct | ( | void | ) |
Initializes a new instance of this class.
This is the two phase construction.
E_SUCCESS | The method is successful. |
E_SYSTEM | A system error has occurred. |
result Osp::Telephony::CallManager::Construct | ( | const ITelephonyCallEventListener & | listener | ) |
Initializes a new instance of this class.
This is the two phase construction.
[in] | listener | The listener for change in status of a call |
E_SUCCESS | The method is successful. |
E_SYSTEM | A system error has occurred. |
CallStatus Osp::Telephony::CallManager::GetCurrentCallStatus | ( | void | ) | const |
Gets the call status of the current call.
CallType Osp::Telephony::CallManager::GetCurrentCallType | ( | void | ) | const |
Gets the call type of the current call.