#include <FTelSimInfo.h>
#include <FBaseSysLog.h>
#include <FSec_AccessController.h>
+#include <FSys_SystemInfoImpl.h>
#include "FTel_SimInfoImpl.h"
using namespace Tizen::Base;
using namespace Tizen::Security;
+using namespace Tizen::System;
namespace Tizen { namespace Telephony
{
result
SimInfo::Construct(void)
{
+ static const wchar_t _TELEPHONY[] = L"http://tizen.org/feature/network.telephony";
+
SysAssertf(__pSimInfoImpl == 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.");
__pSimInfoImpl = new (std::nothrow)_SimInfoImpl();
SysTryReturnResult(NID_TEL, __pSimInfoImpl != null, E_OUT_OF_MEMORY, "Memory allocation failed");