* @brief This is the implementation file for _SystemInfoImpl class.
*/
#include <unique_ptr.h>
+#include <unistd.h>
+
+#include <ITapiModem.h>
#include <FBaseBoolean.h>
#include <FBaseInteger.h>
{
r = E_OBJ_NOT_FOUND;
}
+ else if (key == _DUID)
+ {
+ int ret = 0;
+ TapiHandle* handle = null;
+ int time_count = 0;
+ int status = 0;
+
+ handle = tel_init(null);
+ if(handle != null)
+ {
+ while(time_count < 30) //Wait 30 second.
+ {
+ ret = tel_check_modem_power_status(handle, &status);
+ SysLog(NID_SYS, "Modem check result is %d, status is %d.", handle, status);
+ if(ret != TAPI_API_SUCCESS)
+ {
+ SysLogException(NID_SYS, E_SYSTEM, "It is failed to get Modem status.");
+ tel_deinit(handle);
+ return E_SYSTEM;
+ }
+
+ if(status == 0)
+ {
+ break;
+ }
+
+ usleep(1000000);
+ time_count++;
+ }
+ tel_deinit(handle);
+ }
+ _SystemClient* pSystemClient = _SystemClient::GetInstance();
+ r = pSystemClient->GetValue(key, value);
+ }
else
{
r = GetFromRegistry(tizenKey, value);
{
result r = E_SUCCESS;
+ int ret = 0;
+ TapiHandle* handle = null;
+ int time_count = 0;
+ int status = 0;
+
+ handle = tel_init(null);
+ SysTryReturnResult(NID_SYS, handle != null, E_SYSTEM, "It is failed to get handle of telephony.");
+ while(time_count < 30) //Wait 30 second.
+ {
+ ret = tel_check_modem_power_status(handle, &status);
+ SysLog(NID_SYS, "Modem check result is %d, status is %d.", handle, status);
+ if(ret != TAPI_API_SUCCESS)
+ {
+ SysLogException(NID_SYS, E_SYSTEM, "It is failed to get Modem status.");
+ tel_deinit(handle);
+ return E_SYSTEM;
+ }
+
+ if(status == 0)
+ {
+ break;
+ }
+
+ usleep(1000000);
+ time_count++;
+ }
+ tel_deinit(handle);
+
ArrayList requestMessage;
ArrayList responseMessage;