2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 // Licensed under the Apache License, Version 2.0 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
8 // http://www.apache.org/licenses/LICENSE-2.0
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
18 * @file FSys_SystemInfoImpl.cpp
19 * @brief This is the implementation file for _SystemInfoImpl class.
21 #include <unique_ptr.h>
24 #include <system_info.h>
25 #include <ITapiModem.h>
27 #include <FBaseBoolean.h>
28 #include <FBaseInteger.h>
29 #include <FBaseColHashMap.h>
31 #include <FBase_NativeError.h>
32 #include <FIo_RegistryImpl.h>
33 #include <FSys_SystemInfoImpl.h>
34 #include <FIo_AppServiceIpcMessages.h>
35 #include <FIo_IpcClient.h>
37 #include "FSys_Types.h"
38 #include "FSys_SystemClient.h"
39 #include "FSys_CommunicationDispatcherClient.h"
43 using namespace Tizen::Base;
44 using namespace Tizen::Base::Collection;
45 using namespace Tizen::Io;
47 namespace Tizen { namespace System
50 static const wchar_t* _REGISTRY_PATH = L"/opt/usr/etc/system_info_cache.ini";
51 static const wchar_t* _SYSTEM_INFO_SESSION = L"SystemInformation";
54 static const wchar_t* _BLUETOOTH = L"http://tizen.org/feature/network.bluetooth";
55 static const wchar_t* _BLUETOOTH_SUPPORTED = L"BluetoothSupported";
59 static const wchar_t* _CAMERA_FRONT = L"http://tizen.org/feature/camera.front";
61 static const wchar_t* _CAMERA_BACK = L"http://tizen.org/feature/camera.back";
63 static const wchar_t* _CAMERA_COUNT = L"CameraCount";
66 static const wchar_t* _DUID = L"http://tizen.org/system/duid";
67 static const wchar_t* _DEVICE_ID = L"DUID";
70 static const wchar_t* _FMRADIO = L"http://tizen.org/feature/fmradio";
71 static const wchar_t* _FM_RADIO_SUPPORTED = L"FmRadioSupported";
74 static const wchar_t* _KEYBOARD_TYPE = L"KeyboardType";
75 static const wchar_t* _INPUT_KEYBOARD_LAYOUT = L"http://tizen.org/feature/input.keyboard.layout";
78 static const wchar_t* _GPS_SUPPORTED = L"GPSSupported";
79 static const wchar_t* _LOCATION_GPS = L"http://tizen.org/feature/location.gps";
80 static const wchar_t* _WPS_SUPPORTED = L"WPSSupported";
81 static const wchar_t* _LOCATION_WPS = L"http://tizen.org/feature/location.wps";
84 static const wchar_t* _MODELNAME = L"http://tizen.org/system/model_name";
85 static const wchar_t* _MODEL_NAME = L"ModelName";
88 static const wchar_t* _MULTIPOINTTOUCH_POINTCOUNT = L"http://tizen.org/feature/multi_point_touch.point_count";
89 static const wchar_t* _MULTIPOINT_TOUCH_COUNT = L"MultiPointTouchCount";
92 static const wchar_t* _NETWORK_NFC = L"http://tizen.org/feature/network.nfc";
93 static const wchar_t* _NFC_SUPPORTED = L"NFCSupported";
96 static const wchar_t* _OPENGLES_VERSION_1_1 = L"http://tizen.org/feature/opengles.version.1_1";
97 static const wchar_t* _OPENGLES_VERSION_2_0 = L"http://tizen.org/feature/opengles.version.2_0";
98 static const wchar_t* _OPENGL_ES_VERSION = L"OpenGLESVersion";
101 static const wchar_t* _SCREEN_BPP = L"http://tizen.org/feature/screen.bpp";
102 static const wchar_t* _SCREEN_BITS_PER_PIXEL = L"ScreenBitsPerPixel";
103 static const wchar_t* _SCREEN_DPI = L"http://tizen.org/feature/screen.dpi";
104 static const wchar_t* _SCREEN_HEIGHT = L"http://tizen.org/feature/screen.height";
105 static const wchar_t* _SCREENHEIGHT = L"ScreenHeight";
106 static const wchar_t* _SCREEN_WIDTH = L"http://tizen.org/feature/screen.width";
107 static const wchar_t* _SCREENWIDTH = L"ScreenWidth";
108 static const wchar_t* _SCREENDPI = L"ScreenDPI";
111 static const wchar_t* _SCREEN_OUTPUT_RCA = L"http://tizen.org/feature/screen.output.rca";
112 static const wchar_t* _TV_OUT_SUPPORTED = L"TvOutSupported";
115 static const wchar_t* _SOUND_MEDIA_VOLUME_MAX = L"http://tizen.org/system/sound.media.volume.resolution.max";
116 static const wchar_t* _MAX_MEDIA_SOUND_VOLUME = L"MaxMediaSoundVolume";
117 static const wchar_t* _SOUND_NOTIFICATION_VOLUME_MAX = L"http://tizen.org/system/sound.notification.volume.resolution.max";
118 static const wchar_t* _MAX_NOTIFICATION_SOUND_VOLUME = L"MaxNotificationSoundVolume";
119 static const wchar_t* _SOUND_RINGTONE_VOLUME_MAX = L"http://tizen.org/system/sound.ringtone.volume.resolution.max";
120 static const wchar_t* _MAX_RINGTONE_SOUND_VOLUME = L"MaxRingtoneSoundVolume";
121 static const wchar_t* _SOUND_SYSTEM_VOLUME_MAX = L"http://tizen.org/system/sound.system.volume.resolution.max";
122 static const wchar_t* _MAX_SYSTEM_SOUND_VOLUME = L"MaxSystemSoundVolume";
125 static const wchar_t* _TELEPHONY = L"http://tizen.org/feature/network.telephony";
126 static const wchar_t* _TELEPHONY_SERVICE_GSM = L"http://tizen.org/feature/network.telephony.service.gsm";
127 static const wchar_t* _TELEPHONY_SERVICE_GPRS = L"http://tizen.org/feature/network.telephony.service.gprs";
128 static const wchar_t* _TELEPHONY_SERVICE_EDGE = L"http://tizen.org/feature/network.telephony.service.edge";
129 static const wchar_t* _TELEPHONY_SERVICE_UMTS = L"http://tizen.org/feature/network.telephony.service.umts";
130 static const wchar_t* _TELEPHONY_SERVICE_HSDPA = L"http://tizen.org/feature/network.telephony.service.hsdpa";
131 static const wchar_t* _TELEPHONY_SERVICE_HSUPA = L"http://tizen.org/feature/network.telephony.service.hsupa";
132 static const wchar_t* _TELEPHONY_SERVICE_HSPA = L"http://tizen.org/feature/network.telephony.service.hspa";
133 static const wchar_t* _TELEPHONY_SERVICE_LTE = L"http://tizen.org/feature/network.telephony.service.lte";
134 static const wchar_t* _TELEPHONY_SERVICE_CDMA = L"http://tizen.org/feature/network.telephony.service.cdma";
135 static const wchar_t* _NETWORK_TYPE = L"NetworkType";
136 static const wchar_t* _NETWORK_EMERGENCY = L"Emergency";
137 static const wchar_t* _NETWORK_NO_SERVICE = L"NoService";
140 static const wchar_t* _WIFI = L"http://tizen.org/feature/network.wifi";
141 static const wchar_t* _WIFI_SUPPORTED = L"WiFiSupported";
142 static const wchar_t* _WIFI_DIRECT = L"http://tizen.org/feature/network.wifi.direct";
143 static const wchar_t* _WIFI_DIRECT_SUPPORTED = L"WiFiDirectSupported";
146 static const wchar_t* _PLATFORM_VERSION = L"http://tizen.org/feature/platform.version";
147 static const wchar_t* _PLATFORM_NATIVE_API_VERSION = L"http://tizen.org/feature/platform.native.api.version";
148 static const wchar_t* _PLATFORM_WEB_API_VERSION = L"http://tizen.org/feature/platform.web.api.version";
149 static const wchar_t* _BUILD_STRING = L"http://tizen.org/system/build.string";
151 static const wchar_t* _WAC_VERSION = L"WACVersion";
152 static const wchar_t* _SUPPORTED = L"Supported";
153 static const wchar_t* _UNSUPPORTED = L"Unsupported";
155 static bool firstRequest = false;
156 static HashMap integerList(SingleObjectDeleter);
157 static HashMap boolList(SingleObjectDeleter);
158 static HashMap stringList(SingleObjectDeleter);
163 if(firstRequest == false)
165 integerList.Construct();
166 boolList.Construct();
167 stringList.Construct();
173 _SystemInfoImpl::ConvertToTizen(const String& key)
177 if(code == _DEVICE_ID)
181 else if(code == _MODEL_NAME)
185 else if(code == _KEYBOARD_TYPE)
187 code = _INPUT_KEYBOARD_LAYOUT;
189 else if(code == _SCREEN_BITS_PER_PIXEL)
193 else if(code == _SCREENHEIGHT)
195 code = _SCREEN_HEIGHT;
197 else if(code == _SCREENWIDTH)
199 code = _SCREEN_WIDTH;
201 else if(code == _SCREENDPI)
205 else if(code == _MAX_SYSTEM_SOUND_VOLUME)
207 code = _SOUND_SYSTEM_VOLUME_MAX;
209 else if(code == _MAX_MEDIA_SOUND_VOLUME)
211 code = _SOUND_MEDIA_VOLUME_MAX;
213 else if(code == _MAX_RINGTONE_SOUND_VOLUME)
215 code = _SOUND_RINGTONE_VOLUME_MAX;
217 else if(code == _MAX_NOTIFICATION_SOUND_VOLUME)
219 code = _SOUND_NOTIFICATION_VOLUME_MAX;
221 else if(code == _MULTIPOINT_TOUCH_COUNT)
223 code = _MULTIPOINTTOUCH_POINTCOUNT;
225 else if(code == _BLUETOOTH_SUPPORTED)
229 else if(code == _GPS_SUPPORTED)
231 code = _LOCATION_GPS;
233 else if(code == _WPS_SUPPORTED)
235 code = _LOCATION_WPS;
237 else if(code == _WIFI_SUPPORTED)
241 else if(code == _WIFI_DIRECT_SUPPORTED)
245 else if(code == _FM_RADIO_SUPPORTED)
249 else if(code == _TV_OUT_SUPPORTED)
251 code = _SCREEN_OUTPUT_RCA;
253 else if(code == _NFC_SUPPORTED)
261 _SystemInfoImpl::GetSysInfo(const String& key, String& value)
263 result r = E_OBJ_NOT_FOUND;
264 String tizenKey = ConvertToTizen(key);
266 if (firstRequest == false)
271 String* pValue = (String*)stringList.GetValue(tizenKey);
279 if (key == _NETWORK_TYPE) //Compatibility
281 bool supported = false;
282 GetSysInfo(_TELEPHONY, supported);
283 if(supported == false)
285 value = _NETWORK_EMERGENCY;
288 bool supportedGsm = false;
289 bool supportedGprs = false;
290 bool supportedEdge = false;
291 bool supportedUmts = false;
292 bool supportedHsdpa = false;
293 bool supportedHsupa = false;
294 bool supportedHspa = false;
295 bool supportedLte = false;
296 bool supportedCdma = false;
298 GetSysInfo(_TELEPHONY_SERVICE_GSM, supportedGsm);
299 GetSysInfo(_TELEPHONY_SERVICE_GPRS, supportedGprs);
300 GetSysInfo(_TELEPHONY_SERVICE_EDGE, supportedEdge);
301 GetSysInfo(_TELEPHONY_SERVICE_UMTS, supportedUmts);
302 GetSysInfo(_TELEPHONY_SERVICE_HSDPA, supportedHsdpa);
303 GetSysInfo(_TELEPHONY_SERVICE_HSUPA, supportedHsupa);
304 GetSysInfo(_TELEPHONY_SERVICE_HSPA, supportedHspa);
305 GetSysInfo(_TELEPHONY_SERVICE_LTE, supportedLte);
306 GetSysInfo(_TELEPHONY_SERVICE_CDMA, supportedCdma);
309 if(supportedGsm == false && supportedGprs == false
310 && supportedEdge == false && supportedUmts == false
311 && supportedHsdpa == false && supportedHsupa == false
312 && supportedHspa == false && supportedLte == false
313 && supportedCdma == false)
315 value = _NETWORK_NO_SERVICE;
317 else if(supportedGsm == true)
319 value.Append(L"GSM");
321 else if(supportedGprs == true)
323 if(value.GetLength() > 0)
324 value.Append(L" | ");
326 value.Append(L"GPRS");
328 else if(supportedEdge == true)
330 if(value.GetLength() > 0)
331 value.Append(L" | ");
333 value.Append(L"EDGE");
335 else if(supportedUmts == true)
337 if(value.GetLength() > 0)
338 value.Append(L" | ");
340 value.Append(L"UMTS");
342 else if(supportedHsdpa == true)
344 if(value.GetLength() > 0)
345 value.Append(L" | ");
347 value.Append(L"HSDPA");
349 else if(supportedHsupa == true)
351 if(value.GetLength() > 0)
352 value.Append(L" | ");
354 value.Append(L"HSUPA");
356 else if(supportedHspa == true)
358 if(value.GetLength() > 0)
359 value.Append(L" | ");
361 value.Append(L"HSPA");
363 else if(supportedLte == true)
365 if(value.GetLength() > 0)
366 value.Append(L" | ");
368 value.Append(L"LTE");
370 else if(supportedCdma == true)
372 if(value.GetLength() > 0)
373 value.Append(L" | ");
375 value.Append(L"CDMA");
379 else if (key == _OPENGL_ES_VERSION)
381 bool opengles_11 = false;
382 bool opengles_20 = false;
384 GetSysInfo(_OPENGLES_VERSION_1_1, opengles_11);
385 GetSysInfo(_OPENGLES_VERSION_2_0, opengles_20);
387 if(opengles_11 == true)
389 value.Append(L"1.1");
391 else if(opengles_20 == true)
393 if(value.GetLength() > 0)
394 value.Append(L" | ");
396 value.Append(L"2.0");
400 else if(key == _BLUETOOTH_SUPPORTED)
402 bool supported = false;
403 GetSysInfo(_BLUETOOTH, supported);
404 if(supported == false)
407 value = _UNSUPPORTED;
410 else if (key == _GPS_SUPPORTED)
412 bool supported = false;
413 GetSysInfo(_LOCATION_GPS, supported);
414 if(supported == false)
417 value = _UNSUPPORTED;
420 else if (key == _WIFI_SUPPORTED)
422 bool supported = false;
423 GetSysInfo(_WIFI, supported);
424 if(supported == false)
427 value = _UNSUPPORTED;
430 else if (key == _WAC_VERSION)
435 else if (key == _PLATFORM_NATIVE_API_VERSION || key == _PLATFORM_WEB_API_VERSION || key == _PLATFORM_VERSION || key == _BUILD_STRING)
439 else if (tizenKey == _DUID)
442 TapiHandle* handle = null;
446 handle = tel_init(null);
449 while(time_count < 30) //Wait 30 second.
451 ret = tel_check_modem_power_status(handle, &status);
452 SysLog(NID_SYS, "Modem check result is %d, status is %d.", handle, status);
453 if(ret != TAPI_API_SUCCESS)
455 SysLogException(NID_SYS, E_SYSTEM, "It is failed to get Modem status.");
470 _SystemClient* pSystemClient = _SystemClient::GetInstance();
471 r = pSystemClient->GetValue(tizenKey, value);
475 r = GetFromRegistry(tizenKey, value);
479 _SystemClient* pSystemClient = _SystemClient::GetInstance();
480 r = pSystemClient->GetValue(tizenKey, value);
485 stringList.Add(new String(tizenKey), new String(value));
491 _SystemInfoImpl::GetSysInfo(const String& key, int& value)
493 result r = E_SUCCESS;
494 String tizenKey = ConvertToTizen(key);
496 if (firstRequest == false)
501 Integer* pValue = (Integer*)integerList.GetValue(tizenKey);
505 value = pValue->value;
509 if (key == _CAMERA_COUNT)
511 bool supported = false;
514 GetSysInfo(_CAMERA_FRONT, supported);
515 if(supported == true)
518 GetSysInfo(_CAMERA_BACK, supported);
519 if(supported == true)
526 r = GetFromRegistry(tizenKey, value);
529 _SystemClient* pSystemClient = _SystemClient::GetInstance();
530 r = pSystemClient->GetValue(tizenKey, value);
536 integerList.Add(new String(tizenKey), new Integer(value));
543 _SystemInfoImpl::GetSysInfo(const String& key, long long& value)
545 return E_OBJ_NOT_FOUND;
549 _SystemInfoImpl::GetSysInfo(const String& key, double& value)
551 return E_OBJ_NOT_FOUND;
555 _SystemInfoImpl::GetSysInfo(const String& key, bool& value)
557 result r = E_SUCCESS;
558 String tizenKey = ConvertToTizen(key);
560 if (firstRequest == false)
565 Boolean* pValue = (Boolean*)boolList.GetValue(tizenKey);
569 value = pValue->value;
573 if(key == L"http://tizen.org/feature/input.keys.menu")
575 bool supported = false;
576 int ret = system_info_get_platform_bool("tizen.org/feature/input.keys.menu", &supported);
577 SysTryReturnResult(NID_SYS, ret == 0, E_SYSTEM, "It is failed to get system information from configration file.");
581 else if(key == L"http://tizen.org/feature/input.keys.back")
583 bool supported = false;
584 int ret = system_info_get_platform_bool("tizen.org/feature/input.keys.back", &supported);
585 SysTryReturnResult(NID_SYS, ret == 0, E_SYSTEM, "It is failed to get system information from configration file.");
591 r = GetFromRegistry(tizenKey, value);
594 _SystemClient* pSystemClient = _SystemClient::GetInstance();
595 r = pSystemClient->GetValue(tizenKey, value);
597 SysTryReturnResult(NID_SYS, r == E_SUCCESS, E_OBJ_NOT_FOUND, "It is failed to get the key[%ls]", tizenKey.GetPointer());
602 boolList.Add(new String(tizenKey), new Boolean(value));
609 _SystemInfoImpl::GetSysInfo(const String& key, UuId& value)
611 return E_OBJ_NOT_FOUND;
615 _SystemInfoImpl::GetSysInfoValuesN(const String& key, SystemInfoValueType type)
617 SetLastResult(E_OBJ_NOT_FOUND);
622 _SystemInfoImpl::GetPlatformVersion(String& platformVersion)
624 result r = E_SUCCESS;
625 String tizenKey(_PLATFORM_VERSION);
627 r = GetFromRegistry(tizenKey, platformVersion);
628 SysTryReturnResult(NID_SYS, r == E_SUCCESS, E_SYSTEM, "It is failed to get the key[%ls]", tizenKey.GetPointer());
633 _SystemInfoImpl::GetBuildInfo(String& buildInfo)
635 result r = E_SUCCESS;
636 String tizenKey(_BUILD_STRING);
638 r = GetFromRegistry(tizenKey, buildInfo);
639 SysTryReturnResult(NID_SYS, r == E_SUCCESS, E_SYSTEM, "It is failed to get the key[%ls]", tizenKey.GetPointer());
644 _SystemInfoImpl::GetNativeApiVersion(String& nativeApiVersion)
646 result r = E_SUCCESS;
647 String tizenKey(_PLATFORM_NATIVE_API_VERSION);
649 r = GetFromRegistry(tizenKey, nativeApiVersion);
650 SysTryReturnResult(NID_SYS, r == E_SUCCESS, E_SYSTEM, "It is failed to get the key[%ls]", tizenKey.GetPointer());
655 _SystemInfoImpl::GetWebApiVersion(String& webApiVersion)
657 result r = E_SUCCESS;
658 String tizenKey(_PLATFORM_WEB_API_VERSION);
660 r = GetFromRegistry(tizenKey, webApiVersion);
661 SysTryReturnResult(NID_SYS, r == E_SUCCESS, E_SYSTEM, "It is failed to get the key[%ls]", tizenKey.GetPointer());
666 _SystemInfoImpl::GetImei(String& imei)
668 result r = E_SUCCESS;
671 TapiHandle* handle = null;
675 handle = tel_init(null);
676 SysTryReturnResult(NID_SYS, handle != null, E_SYSTEM, "It is failed to get handle of telephony.");
677 while(time_count < 30) //Wait 30 second.
679 ret = tel_check_modem_power_status(handle, &status);
680 SysLog(NID_SYS, "Modem check result is %d, status is %d.", handle, status);
681 if(ret != TAPI_API_SUCCESS)
683 SysLogException(NID_SYS, E_SYSTEM, "It is failed to get Modem status.");
698 ArrayList requestMessage;
699 ArrayList responseMessage;
701 _CommunicationDispatcherClient* pCommunicationDispatcherClient = _CommunicationDispatcherClient::GetInstance();
703 _IpcClient* pIpcClient = pCommunicationDispatcherClient->GetIpcClient();
704 SysTryReturn(NID_SYS, pIpcClient != null, E_OUT_OF_MEMORY, r, "It is failed to create IPC instance.");
706 requestMessage.Construct();
707 responseMessage.Construct();
709 String serviceId(_SYSTEM_SERVICE_ID);
710 String commandId(L"osp.system.command.get.imei.internal");
712 requestMessage.Add(serviceId);
713 requestMessage.Add(commandId);
715 unique_ptr<IoService_Request> pMsg(new (std::nothrow) IoService_Request(requestMessage, &responseMessage));
716 SysTryReturnResult(NID_SYS, pMsg != null, E_OUT_OF_MEMORY, "It is failed to create Ipc message");
718 r = pIpcClient->SendRequest(pMsg.get());
719 SysTryReturn(NID_SYS, r == E_SUCCESS, E_SYSTEM, r, "It is failed to send ipc message. [%s]", GetErrorMessage(r));
721 unique_ptr<String> pResult((String*)responseMessage.GetAt(_SYSTEM_RESPONSE_DATA));
722 unique_ptr<String> pImei((String*)responseMessage.GetAt(_SYSTEM_RESPONSE_DATA+1));
724 SysTryReturnResult(NID_SYS, pResult != null, E_SYSTEM, "It is failed to receive result on IPC response message.");
725 SysTryReturnResult(NID_SYS, pImei != null, E_SYSTEM, "It is failed to receive IMEI value on IPC response message.");
727 SysTryReturnResult(NID_SYS, *pResult != _SYSTEM_RESULT_PRIVILEGED, E_PRIVILEGE_DENIED, "It is failed to get privilege.");
728 SysTryReturnResult(NID_SYS, *pResult == _SYSTEM_RESULT_OK, E_SYSTEM, "It is failed to get IMEI value.");
735 _SystemInfoImpl::GetFromRegistry(const String& key, String& value)
737 result r = E_SUCCESS;
741 r = _reg.Construct(_REGISTRY_PATH, REG_OPEN_READ_ONLY, null);
742 SysTryReturnResult(NID_SYS, r == E_SUCCESS , r, " RegistryImpl construct is failed");
744 r = _reg.GetValue(_SYSTEM_INFO_SESSION, key, valStr);
745 SysTryReturnResult(NID_SYS, r == E_SUCCESS , r, " Registry GetValue is failed");
747 if(valStr == L"true" || valStr == L"false")
749 return E_OBJ_NOT_FOUND;
760 _SystemInfoImpl::GetFromRegistry(const String& key, int& value)
762 result r = E_SUCCESS;
765 r = _reg.Construct(_REGISTRY_PATH, REG_OPEN_READ_ONLY, null);
766 SysTryReturnResult(NID_SYS, r == E_SUCCESS, r, " RegistryImpl construct is failed");
768 r = _reg.GetValue(_SYSTEM_INFO_SESSION, key, valStr);
769 SysTryReturnResult(NID_SYS, r == E_SUCCESS, r, " Registry GetValue is failed");
770 SysTryReturnResult(NID_SYS, r == E_SUCCESS, E_SYSTEM, " Registry GetValue is failed");
771 r = Integer::Parse(valStr, value);
772 SysTryReturnResult(NID_SYS, r == E_SUCCESS, E_OBJ_NOT_FOUND, " Integer::Parse() is failed");
777 _SystemInfoImpl::GetFromRegistry(const String& key, bool& value)
779 result r = E_SUCCESS;
782 r = _reg.Construct(_REGISTRY_PATH, REG_OPEN_READ_ONLY, null);
783 SysTryReturnResult(NID_SYS, r == E_SUCCESS, r, " RegistryImpl construct is failed");
785 r = _reg.GetValue(_SYSTEM_INFO_SESSION, key, valStr);
786 SysTryReturnResult(NID_SYS, r == E_SUCCESS, r, " Registry GetValue is failed");
787 SysTryReturnResult(NID_SYS, r == E_SUCCESS, E_SYSTEM, " Registry GetValue is failed");
788 if(valStr == L"true")
792 else if(valStr == L"false")
798 return E_OBJ_NOT_FOUND;
804 _SystemInfoImpl::GetInstance(SystemInfo& systeminfo)
806 return systeminfo.__pSystemInfoImpl;
808 const _SystemInfoImpl*
809 _SystemInfoImpl::GetInstance(const SystemInfo& systeminfo)
811 return systeminfo.__pSystemInfoImpl;