{
SysLog(NID_TEL, "Creating an IPC instance to connect with the Connectivity service daemon has failed.");
}
- else
- {
- __pTelephonyServiceProxy->SetCallManagerImpl(*this);
- }
return r;
SysTryReturnResult(NID_TEL, !phoneNumber.IsEmpty(), E_INVALID_FORMAT, "The phone number is empty string.");
SysTryReturnResult(NID_TEL, IsPhoneNumberValid(phoneNumber), E_INVALID_FORMAT, "The phone number is invalid format");
- r = __pTelephonyServiceProxy->RequestCallForward(phoneNumber);
+ r = __pTelephonyServiceProxy->RequestCallForward(this, phoneNumber);
SysTryReturnResult(NID_TEL, r == E_SUCCESS, r, "Propagating.");
__curCallFwdState = _CALL_FORWARD_REQUESTING;
SysTryReturnResult(NID_TEL, _NetworkManagerImpl::IsServiceAvailable(), E_SERVICE_UNAVAILABLE,
"The operation failed because the device is out of the coverage area or in the emergency mode.");
- result r = __pTelephonyServiceProxy->StopCallForward();
+ result r = __pTelephonyServiceProxy->StopCallForward(this);
SysTryReturnResult(NID_TEL, r == E_SUCCESS, r, "Propagating.");
__curCallFwdState = _CALL_FORWARD_STOPPING;
SysTryReturnResult(NID_TEL, _NetworkManagerImpl::IsServiceAvailable(), E_SERVICE_UNAVAILABLE,
"The operation failed because the device is out of the coverage area or in the emergency mode.");
- result r = __pTelephonyServiceProxy->GetCallForwardNumber();
+ result r = __pTelephonyServiceProxy->GetCallForwardNumber(this);
SysTryReturnResult(NID_TEL, r == E_SUCCESS, r, "Propagating.");
__isReqCallFwdNumInProgress = true;
CallType callType = TYPE_UNDEFINED_CALL;
String phoneNumber;
int callId = 0;
+ int err = 0;
_CallManagerImpl* pCallManagerImpl = static_cast <_CallManagerImpl*>(pUserData);
+ pCallManagerImpl->__curCallState = CALL_STATUS_IDLE;
if (strcmp(pNotiId, TAPI_NOTI_VOICE_CALL_STATUS_IDLE) == 0
|| strcmp(pNotiId,TAPI_NOTI_VIDEO_CALL_STATUS_IDLE) == 0)
{
TelCallStatusIdleNoti_t* pNotiData = (TelCallStatusIdleNoti_t*)pData;
callId = pNotiData->id;
- pCallManagerImpl->__curCallState = CALL_STATUS_IDLE;
+
+ err = tel_get_call_status_all(pHandle, OnCallStatusCallback, pCallManagerImpl);
+ SysLog(NID_TEL, "The tel_get_call_status_all() returned %d value", err);
}
else
{
callId = pNotiData->id;
}
- int err = tel_get_call_status_all(pHandle, OnCallStatusCallback, pCallManagerImpl);
+ err = tel_get_call_status_all(pHandle, OnCallStatusCallback, pCallManagerImpl);
SysLog(NID_TEL, "The tel_get_call_status_all() returned %d value", err);
phoneNumber = pCallManagerImpl->GetPhoneNumber(pHandle, callId);
void
_CallManagerImpl::OnTelephonyCallForwardResponseReceived(Tizen::Base::String phoneNumber, result r)
-{
+{
SysLog(NID_TEL, "The listener has called with result %s and phonenumber is %ls", GetErrorMessage(r), phoneNumber.GetPointer());
_CallForwardEventArg* pEventArg = new (std::nothrow)_CallForwardEventArg(_CALL_FORWARD_EVENT_RESPONSE_RECEIVED, phoneNumber, r);
}
}
+
void
_CallManagerImpl::OnCallStatusCallback(TelCallStatus_t* status, void* pUserData)
{
_CallManagerImpl* pImpl = static_cast<_CallManagerImpl*>(pUserData);
- // Priority : Ringing/Dialing > Communicating > Hold
- // ToDO : multi party call scenario
+ CallStatus tempCallStatus = CALL_STATUS_IDLE;
switch (status->CallState)
{
case TAPI_CALL_STATE_IDLE:
- pImpl->__curCallState = CALL_STATUS_IDLE;
+ tempCallStatus = CALL_STATUS_IDLE;
break;
case TAPI_CALL_STATE_ACTIVE:
- pImpl->__curCallState = CALL_STATUS_COMMUNICATING;
+ tempCallStatus = CALL_STATUS_COMMUNICATING;
break;
case TAPI_CALL_STATE_HELD:
- pImpl->__curCallState = CALL_STATUS_HOLDING;
+ tempCallStatus = CALL_STATUS_HOLDING;
break;
case TAPI_CALL_STATE_INCOMING:
- pImpl->__curCallState = CALL_STATUS_RINGING;
+ tempCallStatus = CALL_STATUS_RINGING;
break;
case TAPI_CALL_STATE_DIALING:
case TAPI_CALL_STATE_ALERT:
- pImpl->__curCallState = CALL_STATUS_DIALING;
+ tempCallStatus = CALL_STATUS_DIALING;
break;
default:
break;
}
+ if (tempCallStatus == CALL_STATUS_RINGING)
+ {
+ pImpl->__curCallState = CALL_STATUS_RINGING;
+ }
+ else if ((tempCallStatus == CALL_STATUS_DIALING) && (pImpl->__curCallState != CALL_STATUS_RINGING))
+ {
+ pImpl->__curCallState = CALL_STATUS_DIALING;
+ }
+ else if ((tempCallStatus == CALL_STATUS_COMMUNICATING) && (pImpl->__curCallState != CALL_STATUS_RINGING) && (pImpl->__curCallState != CALL_STATUS_DIALING))
+ {
+ pImpl->__curCallState = CALL_STATUS_COMMUNICATING;
+ }
+ else if ((tempCallStatus == CALL_STATUS_HOLDING) && (pImpl->__curCallState != CALL_STATUS_RINGING) && (pImpl->__curCallState != CALL_STATUS_DIALING) && (pImpl->__curCallState != CALL_STATUS_COMMUNICATING))
+ {
+ pImpl->__curCallState = CALL_STATUS_HOLDING;
+ }
+
return;
}
int err = TAPI_API_SUCCESS;
result r = E_SUCCESS;
+ __curCallState = CALL_STATUS_IDLE;
err = tel_get_call_status_all(__pHandle, OnCallStatusCallback, this);
SysLog(NID_TEL, "The tel_get_call_status_all() returned %d value", err);