#include <FBaseSysLog.h>
#include <FSysSystemTime.h>
#include <FSysSystemInfo.h>
+#include <FSys_DeviceId.h>
#include <FApp_AppManagerImpl.h>
#include <FBase_StringConverter.h>
static const wchar_t* _SYSTEM_COMMAND_GET_IMEI = L"osp.system.command.get.imei";
static const wchar_t* _SYSTEM_COMMAND_GET_IMEI_INTERNAL = L"osp.system.command.get.imei.internal";
+ static const wchar_t* _SYSTEM_COMMAND_GET_DUID_INTERNAL = L"osp.system.command.get.duid.internal";
static const wchar_t* _SYSTEM_COMMAND_POWER = L"osp.system.command.power";
static const wchar_t* _SYSTEM_COMMAND_SYSTEM = L"osp.system.command.system";
static const wchar_t* _SYSTEM_RESULT_ERROR = L"osp.system.result.error";
static const wchar_t* _SYSTEM_RESULT_INVALID = L"osp.system.result.invalid";
static const wchar_t* _SYSTEM_RESULT_PRIVILEGED = L"osp.system.result.privilege";
+ static const wchar_t* _NETWORK_BLUETOOTH = L"http://tizen.org/feature/network.bluetooth";
+ static const wchar_t* _NETWORK_TELEPHONY = L"http://tizen.org/feature/network.telephony";
+ static const wchar_t* _NETWORK_WIFI = L"http://tizen.org/feature/network.wifi";
static const int _SYSTEM_COMMAND_ID = 1;
static const int _SYSTEM_COMMAND_ARG = 2;
}
}
}
}
+ else if(*command == _SYSTEM_COMMAND_GET_DUID_INTERNAL)
+ {
+ bool supported = false;
+ String duid;
+ SysLog(NID_SYS, "It trys to get DUID from telephony.");
+ system_info_get_platform_bool("tizen.org/feature/network.telephony", &supported);
+ if(supported == true)
+ {
+ r = _DeviceId::GetId(duid, 0);
+ }
+ else
+ {
+ SysLog(NID_SYS, "It trys to get DUID from wifi.");
+ system_info_get_platform_bool("tizen.org/feature/network.wifi", &supported);
+ if(supported == true)
+ {
+ r = _DeviceId::GetId(duid, 1);
+ }
+ else
+ {
+ SysLog(NID_SYS, "It trys to get DUID from bluetooth.");
+ system_info_get_platform_bool("tizen.org/feature/network.bluetooth", &supported);
+ if(supported == true)
+ {
+ r = _DeviceId::GetId(duid, 2);
+ }
+ else
+ {
+ SysLogException(NID_SYS, E_SYSTEM, "It is failed to get telephony, wifi, bluetooth information.");
+ resultId = new (std::nothrow) String(_SYSTEM_RESULT_ERROR);
+ }
+ }
+ }
+
+ if(r != E_SUCCESS)
+ {
+ SysLogException(NID_SYS, E_SYSTEM, "It is failed to get IMEI.");
+ resultId = new (std::nothrow) String(_SYSTEM_RESULT_ERROR);
+ }
+ else
+ {
+ resultId = new (std::nothrow) String(_SYSTEM_RESULT_OK);
+ returnValue = new (std::nothrow) String(duid);
+ }
+ }
else if(command->Contains(_SYSTEM_COMMAND_POWER) == true)
{
if(__pPowerManager != null)