Change-Id: I3005a8ecb2461280af8ca8a546261a49c0c979b8
Signed-off-by: Jaemin Ahn <j.m.ahn@samsung.com>
{
SysLog(NID_TEL, "Creating an IPC instance to connect with the Connectivity service daemon has failed.");
}
{
SysLog(NID_TEL, "Creating an IPC instance to connect with the Connectivity service daemon has failed.");
}
- else
- {
- __pTelephonyServiceProxy->SetCallManagerImpl(*this);
- }
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");
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, 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.");
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, 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.");
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;
SysTryReturnResult(NID_TEL, r == E_SUCCESS, r, "Propagating.");
__isReqCallFwdNumInProgress = true;
{
SysLog(NID_TEL, "Creating an IPC instance to connect with the Connectivity service daemon has failed.");
}
{
SysLog(NID_TEL, "Creating an IPC instance to connect with the Connectivity service daemon has failed.");
}
- else
- {
- __pTelephonyServiceProxy->SetNetworkManagerImpl(*this);
- }
__pConnectionHandle = move(pConnectionHandle);
__pConnectionHandle = move(pConnectionHandle);
{
SysTryReturnResult(NID_TEL, __pTelephonyServiceProxy != null, E_SYSTEM, "A system error has occurred. IPC instance has not been constructed yet.");
{
SysTryReturnResult(NID_TEL, __pTelephonyServiceProxy != null, E_SYSTEM, "A system error has occurred. IPC instance has not been constructed yet.");
- result r = __pTelephonyServiceProxy->GetNetworkSelectionMode();
+ result r = __pTelephonyServiceProxy->GetNetworkSelectionMode(this);
SysTryReturnResult(NID_TEL, r != E_OUT_OF_MEMORY, r, "Propagating.");
SysTryReturnResult(NID_TEL, r != E_PRIVILEGE_DENIED, r, "Propagating.");
SysTryReturnResult(NID_TEL, r == E_SUCCESS, E_OPERATION_FAILED, "Failed to get selection mode.");
SysTryReturnResult(NID_TEL, r != E_OUT_OF_MEMORY, r, "Propagating.");
SysTryReturnResult(NID_TEL, r != E_PRIVILEGE_DENIED, r, "Propagating.");
SysTryReturnResult(NID_TEL, r == E_SUCCESS, E_OPERATION_FAILED, "Failed to get selection mode.");
const _NetworkInfoImpl* pNetworkInfoImpl = _NetworkInfoImpl::GetInstance(networkInfo);
TelNetworkSystemType_t networkSystemType = _TelephonyUtility::ConvertNetworkType(pNetworkInfoImpl->GetNetworkType());
const _NetworkInfoImpl* pNetworkInfoImpl = _NetworkInfoImpl::GetInstance(networkInfo);
TelNetworkSystemType_t networkSystemType = _TelephonyUtility::ConvertNetworkType(pNetworkInfoImpl->GetNetworkType());
- result r = __pTelephonyServiceProxy->SelectNetwork(pNetworkInfoImpl->GetPlmn(), (int)networkSystemType);
+ result r = __pTelephonyServiceProxy->SelectNetwork(this, pNetworkInfoImpl->GetPlmn(), (int)networkSystemType);
SysTryReturnResult(NID_TEL, r != E_OUT_OF_MEMORY, r, "Propagating.");
SysTryReturnResult(NID_TEL, r != E_PRIVILEGE_DENIED, r, "Propagating.");
SysTryReturnResult(NID_TEL, r == E_SUCCESS, E_OPERATION_FAILED, "Failed to select network manually.");
SysTryReturnResult(NID_TEL, r != E_OUT_OF_MEMORY, r, "Propagating.");
SysTryReturnResult(NID_TEL, r != E_PRIVILEGE_DENIED, r, "Propagating.");
SysTryReturnResult(NID_TEL, r == E_SUCCESS, E_OPERATION_FAILED, "Failed to select network manually.");
{
SysTryReturnResult(NID_TEL, __pTelephonyServiceProxy != null, E_SYSTEM, "A system error has occurred. IPC instance has not been constructed yet.");
{
SysTryReturnResult(NID_TEL, __pTelephonyServiceProxy != null, E_SYSTEM, "A system error has occurred. IPC instance has not been constructed yet.");
- result r = __pTelephonyServiceProxy->SelectNetwork();
+ result r = __pTelephonyServiceProxy->SelectNetwork(this);
SysTryReturnResult(NID_TEL, r != E_OUT_OF_MEMORY, r, "Propagating.");
SysTryReturnResult(NID_TEL, r != E_PRIVILEGE_DENIED, r, "Propagating.");
SysTryReturnResult(NID_TEL, r == E_SUCCESS, E_OPERATION_FAILED, "Failed to select network automatically.");
SysTryReturnResult(NID_TEL, r != E_OUT_OF_MEMORY, r, "Propagating.");
SysTryReturnResult(NID_TEL, r != E_PRIVILEGE_DENIED, r, "Propagating.");
SysTryReturnResult(NID_TEL, r == E_SUCCESS, E_OPERATION_FAILED, "Failed to select network automatically.");
{
SysTryReturnResult(NID_TEL, __pTelephonyServiceProxy != null, E_SYSTEM, "A system error has occurred. IPC instance has not been constructed yet.");
{
SysTryReturnResult(NID_TEL, __pTelephonyServiceProxy != null, E_SYSTEM, "A system error has occurred. IPC instance has not been constructed yet.");
- result r = __pTelephonyServiceProxy->SearchNetwork();
+ result r = __pTelephonyServiceProxy->SearchNetwork(this);
SysTryReturnResult(NID_TEL, r != E_OUT_OF_MEMORY, r, "Propagating.");
SysTryReturnResult(NID_TEL, r != E_PRIVILEGE_DENIED, r, "Propagating.");
SysTryReturnResult(NID_TEL, r == E_SUCCESS, E_OPERATION_FAILED, "Failed to search network automatic.");
SysTryReturnResult(NID_TEL, r != E_OUT_OF_MEMORY, r, "Propagating.");
SysTryReturnResult(NID_TEL, r != E_PRIVILEGE_DENIED, r, "Propagating.");
SysTryReturnResult(NID_TEL, r == E_SUCCESS, E_OPERATION_FAILED, "Failed to search network automatic.");
_TelephonyIpcProxy::_TelephonyIpcProxy(void)
: __pIpcClient(null)
_TelephonyIpcProxy::_TelephonyIpcProxy(void)
: __pIpcClient(null)
- , __pNetworkManagerImpl(null)
- , __pCallManagerImpl(null)
+ , __pNetworkManagerImplForGet(null)
+ , __pNetworkManagerImplForSelect(null)
+ , __pNetworkManagerImplForSearch(null)
+ , __pCallManagerImplForGet(null)
+ , __pCallManagerImplForStart(null)
+ , __pCallManagerImplForStop(null)
-_TelephonyIpcProxy::GetNetworkSelectionMode(void)
+_TelephonyIpcProxy::GetNetworkSelectionMode(_NetworkManagerImpl* pNetworkManagerImpl)
{
result r = E_SUCCESS;
unsigned long ret = 0;
{
result r = E_SUCCESS;
unsigned long ret = 0;
SysTryReturnResult(NID_TEL, r == E_SUCCESS, E_SYSTEM, "A system error has been occurred. Failed to send a request.");
SysTryReturnResult(NID_TEL, ret == E_SUCCESS, ret, "Propagating.");
SysTryReturnResult(NID_TEL, r == E_SUCCESS, E_SYSTEM, "A system error has been occurred. Failed to send a request.");
SysTryReturnResult(NID_TEL, ret == E_SUCCESS, ret, "Propagating.");
+ __pNetworkManagerImplForGet = pNetworkManagerImpl;
+
return E_SUCCESS;
}
result
return E_SUCCESS;
}
result
-_TelephonyIpcProxy::SelectNetwork(const Tizen::Base::String& plmn, const int netwokrType)
+_TelephonyIpcProxy::SelectNetwork(_NetworkManagerImpl* pNetworkManagerImpl, const Tizen::Base::String& plmn, const int netwokrType)
{
result r = E_SUCCESS;
unsigned long ret = 0;
{
result r = E_SUCCESS;
unsigned long ret = 0;
SysTryReturnResult(NID_TEL, r == E_SUCCESS, E_SYSTEM, "A system error has been occurred. Failed to send a request.");
SysTryReturnResult(NID_TEL, ret == E_SUCCESS, ret, "Propagating.");
SysTryReturnResult(NID_TEL, r == E_SUCCESS, E_SYSTEM, "A system error has been occurred. Failed to send a request.");
SysTryReturnResult(NID_TEL, ret == E_SUCCESS, ret, "Propagating.");
+ __pNetworkManagerImplForSelect = pNetworkManagerImpl;
+
return E_SUCCESS;
}
result
return E_SUCCESS;
}
result
-_TelephonyIpcProxy::SelectNetwork(void)
+_TelephonyIpcProxy::SelectNetwork(_NetworkManagerImpl* pNetworkManagerImpl)
{
result r = E_SUCCESS;
unsigned long ret = 0;
{
result r = E_SUCCESS;
unsigned long ret = 0;
SysTryReturnResult(NID_TEL, r == E_SUCCESS, E_SYSTEM, "A system error has been occurred. Failed to send a request.");
SysTryReturnResult(NID_TEL, ret == E_SUCCESS, ret, "Propagating.");
SysTryReturnResult(NID_TEL, r == E_SUCCESS, E_SYSTEM, "A system error has been occurred. Failed to send a request.");
SysTryReturnResult(NID_TEL, ret == E_SUCCESS, ret, "Propagating.");
+ __pNetworkManagerImplForSelect = pNetworkManagerImpl;
+
return E_SUCCESS;
}
result
return E_SUCCESS;
}
result
-_TelephonyIpcProxy::SearchNetwork(void)
+_TelephonyIpcProxy::SearchNetwork(_NetworkManagerImpl* pNetworkManagerImpl)
{
result r = E_SUCCESS;
unsigned long ret = 0;
{
result r = E_SUCCESS;
unsigned long ret = 0;
SysTryReturnResult(NID_TEL, r == E_SUCCESS, E_SYSTEM, "A system error has been occurred. Failed to send a request.");
SysTryReturnResult(NID_TEL, ret == E_SUCCESS, ret, "Propagating.");
SysTryReturnResult(NID_TEL, r == E_SUCCESS, E_SYSTEM, "A system error has been occurred. Failed to send a request.");
SysTryReturnResult(NID_TEL, ret == E_SUCCESS, ret, "Propagating.");
+ __pNetworkManagerImplForSearch = pNetworkManagerImpl;
+
-_TelephonyIpcProxy::RequestCallForward(const String& phoneNumber)
+_TelephonyIpcProxy::RequestCallForward(_CallManagerImpl* pCallManagerImpl, const String& phoneNumber)
{
result r = E_SUCCESS;
unsigned long ret = 0;
{
result r = E_SUCCESS;
unsigned long ret = 0;
SysTryReturnResult(NID_TEL, r == E_SUCCESS, E_SYSTEM, "A system error has been occurred. Failed to send a request.");
SysTryReturnResult(NID_TEL, ret == E_SUCCESS, ret, "Propagating.");
SysTryReturnResult(NID_TEL, r == E_SUCCESS, E_SYSTEM, "A system error has been occurred. Failed to send a request.");
SysTryReturnResult(NID_TEL, ret == E_SUCCESS, ret, "Propagating.");
+ __pCallManagerImplForStart = pCallManagerImpl;
+
return E_SUCCESS;
}
result
return E_SUCCESS;
}
result
-_TelephonyIpcProxy::StopCallForward(void)
+_TelephonyIpcProxy::StopCallForward(_CallManagerImpl* pCallManagerImpl)
{
result r = E_SUCCESS;
unsigned long ret = 0;
{
result r = E_SUCCESS;
unsigned long ret = 0;
SysTryReturnResult(NID_TEL, r == E_SUCCESS, E_SYSTEM, "A system error has been occurred. Failed to send a request.");
SysTryReturnResult(NID_TEL, ret == E_SUCCESS, ret, "Propagating.");
SysTryReturnResult(NID_TEL, r == E_SUCCESS, E_SYSTEM, "A system error has been occurred. Failed to send a request.");
SysTryReturnResult(NID_TEL, ret == E_SUCCESS, ret, "Propagating.");
+ __pCallManagerImplForStop = pCallManagerImpl;
+
return E_SUCCESS;
}
result
return E_SUCCESS;
}
result
-_TelephonyIpcProxy::GetCallForwardNumber(void)
+_TelephonyIpcProxy::GetCallForwardNumber(_CallManagerImpl* pCallManagerImpl)
{
result r = E_SUCCESS;
unsigned long ret = 0;
{
result r = E_SUCCESS;
unsigned long ret = 0;
SysTryReturnResult(NID_TEL, r == E_SUCCESS, E_SYSTEM, "A system error has been occurred. Failed to send a request.");
SysTryReturnResult(NID_TEL, ret == E_SUCCESS, ret, "Propagating.");
SysTryReturnResult(NID_TEL, r == E_SUCCESS, E_SYSTEM, "A system error has been occurred. Failed to send a request.");
SysTryReturnResult(NID_TEL, ret == E_SUCCESS, ret, "Propagating.");
+ __pCallManagerImplForGet = pCallManagerImpl;
-void
-_TelephonyIpcProxy::SetNetworkManagerImpl(_NetworkManagerImpl& impl)
-{
- __pNetworkManagerImpl = &impl;
-}
-
-void
-_TelephonyIpcProxy::SetCallManagerImpl(_CallManagerImpl& impl)
-{
- __pCallManagerImpl = &impl;
SysAssertf(__pIpcClient != null, "Not yet constructed. Construct() should be called before use.");
SysAssertf(__pIpcClient != null, "Not yet constructed. Construct() should be called before use.");
- __pNetworkManagerImpl->OnTelephonyNetworkSelectionModeReceived(isManual, res);
+ __pNetworkManagerImplForGet->OnTelephonyNetworkSelectionModeReceived(isManual, res);
SysAssertf(__pIpcClient != null, "Not yet constructed. Construct() should be called before use.");
SysAssertf(__pIpcClient != null, "Not yet constructed. Construct() should be called before use.");
- __pNetworkManagerImpl->OnTelephonyNetworkSelectionCompleted(res);
+ __pNetworkManagerImplForSelect->OnTelephonyNetworkSelectionCompleted(res);
SysAssertf(__pIpcClient != null, "Not yet constructed. Construct() should be called before use.");
SysAssertf(__pIpcClient != null, "Not yet constructed. Construct() should be called before use.");
- __pNetworkManagerImpl->OnTelephonyNetworkSearchCompleted(message, res);
+ __pNetworkManagerImplForSearch->OnTelephonyNetworkSearchCompleted(message, res);
SysAssertf(__pIpcClient != null, "Not yet constructed. Construct() should be called before use.");
SysAssertf(__pIpcClient != null, "Not yet constructed. Construct() should be called before use.");
- __pCallManagerImpl->OnTelephonyCallForwardNumberReceived(phoneNumber, res);
+ __pCallManagerImplForGet->OnTelephonyCallForwardNumberReceived(phoneNumber, res);
SysAssertf(__pIpcClient != null, "Not yet constructed. Construct() should be called before use.");
SysAssertf(__pIpcClient != null, "Not yet constructed. Construct() should be called before use.");
- __pCallManagerImpl->OnTelephonyCallForwardResponseReceived(phoneNumber, res);
+ __pCallManagerImplForStart->OnTelephonyCallForwardResponseReceived(phoneNumber, res);
SysAssertf(__pIpcClient != null, "Not yet constructed. Construct() should be called before use.");
SysAssertf(__pIpcClient != null, "Not yet constructed. Construct() should be called before use.");
- __pCallManagerImpl->OnTelephonyCallForwardStopped(phoneNumber, res);
+ __pCallManagerImplForStop->OnTelephonyCallForwardStopped(phoneNumber, res);
result Construct(void);
result GetImsi(Tizen::Base::String& imsi) const;
result HasSystemPrivilege(void);
result Construct(void);
result GetImsi(Tizen::Base::String& imsi) const;
result HasSystemPrivilege(void);
- result GetNetworkSelectionMode(void);
- result SelectNetwork(const Tizen::Base::String& plmn, const int netwokrType);
- result SelectNetwork(void);
- result SearchNetwork(void);
+ result GetNetworkSelectionMode(_NetworkManagerImpl* pNetworkManagerImpl);
+ result SelectNetwork(_NetworkManagerImpl* pNetworkManagerImpl, const Tizen::Base::String& plmn, const int netwokrType);
+ result SelectNetwork(_NetworkManagerImpl* pNetworkManagerImpl);
+ result SearchNetwork(_NetworkManagerImpl* pNetworkManagerImpl);
result HasCallForwardPrivilege(void);
result HasCallForwardPrivilege(void);
- result RequestCallForward(const Tizen::Base::String& phoneNumber);
- result StopCallForward(void);
- result GetCallForwardNumber(void);
-
- void SetNetworkManagerImpl(_NetworkManagerImpl& impl);
- void SetCallManagerImpl(_CallManagerImpl& impl);
+ result RequestCallForward(_CallManagerImpl* pCallManagerImpl, const Tizen::Base::String& phoneNumber);
+ result StopCallForward(_CallManagerImpl* pCallManagerImpl);
+ result GetCallForwardNumber(_CallManagerImpl* pCallManagerImpl);
static _TelephonyIpcProxy* GetInstance(void);
static _TelephonyIpcProxy* GetInstance(void);
private:
Tizen::Io::_IpcClient* __pIpcClient;
private:
Tizen::Io::_IpcClient* __pIpcClient;
- _NetworkManagerImpl* __pNetworkManagerImpl;
- _CallManagerImpl* __pCallManagerImpl;
+ _NetworkManagerImpl* __pNetworkManagerImplForGet;
+ _NetworkManagerImpl* __pNetworkManagerImplForSelect;
+ _NetworkManagerImpl* __pNetworkManagerImplForSearch;
+ _CallManagerImpl* __pCallManagerImplForGet;
+ _CallManagerImpl* __pCallManagerImplForStart;
+ _CallManagerImpl* __pCallManagerImplForStop;
static _TelephonyIpcProxy* __pInstance;
}; // _TelephonyIpcProxy
static _TelephonyIpcProxy* __pInstance;
}; // _TelephonyIpcProxy