#include <FTelCallManager.h>
#include <FBaseSysLog.h>
#include <FSec_AccessController.h>
+#include <FSys_SystemInfoImpl.h>
#include "FTel_CallManagerImpl.h"
using namespace Tizen::Base;
using namespace Tizen::Security;
+using namespace Tizen::System;
namespace Tizen { namespace Telephony
result
CallManager::Construct(void)
{
+ static const wchar_t _TELEPHONY[] = L"http://tizen.org/feature/network.telephony";
+
SysAssertf(__pCallManagerImpl == null,
"Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class.");
result r = E_SUCCESS;
+ bool isTelephonySupported = false;
+
+ r = _SystemInfoImpl::GetSysInfo(_TELEPHONY, isTelephonySupported);
+ SysTryReturnResult(NID_TEL, r == E_SUCCESS && isTelephonySupported, E_UNSUPPORTED_OPERATION, "Telephony is not supported.");
__pCallManagerImpl = new (std::nothrow) _CallManagerImpl();
SysTryReturnResult(NID_TEL, __pCallManagerImpl != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
result
CallManager::Construct(ITelephonyCallEventListener& listener)
{
+ static const wchar_t _TELEPHONY[] = L"http://tizen.org/feature/network.telephony";
+
SysAssertf(__pCallManagerImpl == null,
"Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class.");
result r = E_SUCCESS;
+ bool isTelephonySupported = false;
+
+ r = _SystemInfoImpl::GetSysInfo(_TELEPHONY, isTelephonySupported);
+ SysTryReturnResult(NID_TEL, r == E_SUCCESS && isTelephonySupported, E_UNSUPPORTED_OPERATION, "Telephony is not supported.");
__pCallManagerImpl = new (std::nothrow) _CallManagerImpl();
SysTryReturnResult(NID_TEL, __pCallManagerImpl != null, E_OUT_OF_MEMORY, "Memory allocation failed.");