namespace Tizen { namespace System
{
+#ifndef VCONFKEY_SERVICE_READY
+#define VCONFKEY_SERVICE_READY "memory/appservice/serviceready"
+#endif
+
static const wchar_t* _ALLOCATED_MEMORY = L"AllocatedMemory";
static const wchar_t* _MEMORY_ALLOCATED = L"http://tizen.org/runtime/memory.allocated";
static const wchar_t* _MEMORY_ALLOCATED_SELF = L"http://tizen.org/runtime/memory.allocated.self";
static const wchar_t* _STORAGE_ALLOCATED_EXTERNAL_IMAGE = L"http://tizen.org/runtime/storage.allocated.external.image";
static const wchar_t* _STORAGE_ALLOCATED_EXTERNAL_DOWNLOAD = L"http://tizen.org/runtime/storage.allocated.external.download";
+static const wchar_t _BOOT_STATUS_KEY[] = L"http://tizen.org/runtime/system.status";
+static const wchar_t _BOOT_STATUS_INITIALIZING[] = L"initializing";
+static const wchar_t _BOOT_STATUS_READY[] = L"ready";
+
+
static const int _RUNTIME_INFO_EVENT_TYPE_INT = 101;
static const int _RUNTIME_INFO_EVENT_TYPE_LONGLONG = 102;
result
_RuntimeInfoImpl::GetValue(const String& key, String& value)
{
- return E_OBJ_NOT_FOUND;
+ if (key == _BOOT_STATUS_KEY)
+ {
+ int bootReady = -1;
+ const int errorCode = vconf_get_int(VCONFKEY_SERVICE_READY, &bootReady);
+ if (errorCode != 0)
+ {
+ value = (bootReady == 1 ) ? _BOOT_STATUS_READY : _BOOT_STATUS_INITIALIZING;
+
+ return E_SUCCESS;
+ }
+
+ return E_SYSTEM;
+ }
+ else
+ {
+ return E_OBJ_NOT_FOUND;
+ }
}
result