//
-// Open Service Platform
// Copyright (c) 2012 Samsung Electronics Co., Ltd.
//
// Licensed under the Apache License, Version 2.0 (the License);
SysTryReturn(NID_APP, pPkgMgrImpl != null, null, E_SYSTEM,
"[%s] A system error has been occurred. failed to get _PackageMaangerImpl.", GetErrorMessage(E_SYSTEM));
- PackageInfo* pPackageInfo = null;
- pPackageInfo = pPkgMgrImpl->GetPackageInfoN(packageId); // !E_SUCCESS for DB fail and query fail
+ std::unique_ptr<PackageInfo> pPackageInfo(pPkgMgrImpl->GetPackageInfoN(packageId)); // !E_SUCCESS for DB fail and query fail
SysTryReturn(NID_APP, pPackageInfo != null, null, E_APP_NOT_INSTALLED, "[%s] Propagating.", GetErrorMessage(E_APP_NOT_INSTALLED));
- const _PackageInfoImpl* pPkgInfoImpl = _PackageInfoImpl::GetInstance(pPackageInfo);
+ const _PackageInfoImpl* pPkgInfoImpl = _PackageInfoImpl::GetInstance(pPackageInfo.get());
SysTryReturn(NID_APP, pPkgInfoImpl != null, null, E_SYSTEM,
"[%s] A system error has been occurred. failed to get _PackageInfoImpl.", GetErrorMessage(E_SYSTEM));
CATCH:
delete pAppSettingInstance;
- delete pPackageInfo;
return null;
}
const _SettingItem* pItem = dynamic_cast<const _SettingItem*>(pObject);
SysTryReturnResult(NID_APP, pItem != null, E_TYPE_MISMATCH, "Type mismatch for instance of id.");
const Boolean* pBoolean = dynamic_cast<const Boolean*>(pItem->GetValue());
- SysTryReturnResult(NID_APP, pBoolean != null, E_TYPE_MISMATCH,
- "Type mismatch between requested type bool and object type of %ls.", id.GetPointer());
+ SysTryReturnResult(NID_APP, pBoolean != null, E_TYPE_MISMATCH, "Type mismatch between requested type bool and object type.");
value = pBoolean->ToBool();
return E_SUCCESS;
const _SettingItem* pItem = dynamic_cast<const _SettingItem*>(pObject);
SysTryReturnResult(NID_APP, pItem != null, E_TYPE_MISMATCH, "Type mismatch for instance of id.");
const Integer* pInteger = dynamic_cast<const Integer*>(pItem->GetValue());
- SysTryReturnResult(NID_APP, pInteger != null, E_TYPE_MISMATCH,
- "Type mismatch between requested type int and object type of %ls.", id.GetPointer());
+ SysTryReturnResult(NID_APP, pInteger != null, E_TYPE_MISMATCH, "Type mismatch between requested type int and object type.");
value = pInteger->ToInt();
return E_SUCCESS;
const _SettingItem* pItem = dynamic_cast<const _SettingItem*>(pObject);
SysTryReturnResult(NID_APP, pItem != null, E_TYPE_MISMATCH, "Type mismatch for instance of id.");
const String* pString = dynamic_cast<const String*>(pItem->GetValue());
- SysTryReturnResult(NID_APP, pString != null, E_TYPE_MISMATCH,
- "Type mismatch between requested type String and object type of %ls.", id.GetPointer());
+ SysTryReturnResult(NID_APP, pString != null, E_TYPE_MISMATCH, "Type mismatch between requested type String and object type.");
value = *pString;
return E_SUCCESS;
_SettingItem* pItem = dynamic_cast<_SettingItem*>(pObject);
SysTryReturnResult(NID_APP, pItem != null, E_TYPE_MISMATCH, "Type mismatch for instance of id.");
Boolean* pBoolean = dynamic_cast<Boolean*>(pItem->GetValue());
- SysTryReturnResult(NID_APP, pBoolean != null, E_TYPE_MISMATCH,
- "Type mismatch between requested type bool and object type of %ls.", id.GetPointer());
+ SysTryReturnResult(NID_APP, pBoolean != null, E_TYPE_MISMATCH, "Type mismatch between requested type bool and object type.");
*pBoolean = value;
static const String strTrue(L"true");
_SettingItem* pItem = dynamic_cast<_SettingItem*>(pObject);
SysTryReturnResult(NID_APP, pItem != null, E_TYPE_MISMATCH, "Type mismatch for instance of id.");
Integer* pInteger = dynamic_cast<Integer*>(pItem->GetValue());
- SysTryReturnResult(NID_APP, pInteger != null, E_TYPE_MISMATCH,
- "Type mismatch between requested type int and object type of %ls.", id.GetPointer());
+ SysTryReturnResult(NID_APP, pInteger != null, E_TYPE_MISMATCH, "Type mismatch between requested type int and object type.");
SysTryReturnResult(NID_APP, (pItem->GetMin() <= value), E_OUT_OF_RANGE, "value(%d) is less than minimum range(%d).",
value, pItem->GetMin());
_SettingItem* pItem = dynamic_cast<_SettingItem*>(pObject);
SysTryReturnResult(NID_APP, pItem != null, E_TYPE_MISMATCH, "Type mismatch for instance of id.");
String* pString = dynamic_cast<String*>(pItem->GetValue());
- SysTryReturnResult(NID_APP, pString != null, E_TYPE_MISMATCH,
- "Type mismatch between requested type String and object type of %ls.", id.GetPointer());
+ SysTryReturnResult(NID_APP, pString != null, E_TYPE_MISMATCH, "Type mismatch between requested type String and object type.");
SysTryReturnResult(NID_APP, pItem->GetMin() <= value.GetLength(), E_OUT_OF_RANGE,
"value length(%d) less than minimum length(%d).", value.GetLength(), pItem->GetMin());
SysTryReturn(NID_APP, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r));
if (!__oldVersionInstance)
{
- SysTryReturnResult(NID_APP, InitizlizeDBus(), E_SYSTEM, "A system error has been occurred. DBus initialization failed.");
+ SysTryReturnResult(NID_APP, InitializeDBus(), E_SYSTEM, "A system error has been occurred. DBus initialization failed.");
}
r = Load();
SysTryReturnResult(NID_APP, !IsFailed(r), E_SYSTEM, "A system error has been occurred. Loading procedure failed.");
r = __settingContainer.Construct();
SysTryReturn(NID_APP, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r));
- SysTryReturnResult(NID_APP, InitizlizeDBus(), E_SYSTEM, "A system error has been occurred. DBus initialization failed.");
+ SysTryReturnResult(NID_APP, InitializeDBus(), E_SYSTEM, "A system error has been occurred. DBus initialization failed.");
r = Load();
SysTryReturn(NID_APP, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r));
}
bool
-_AppSettingImpl::InitizlizeDBus(void)
+_AppSettingImpl::InitializeDBus(void)
{
DBusError error;
dbus_error_init(&error);
SetValue(strId, strValue, false);
return;
}
- SysLog(NID_APP, "Failed determin value type for id=%s", pId);
+ SysSecureLog(NID_APP, "Failed determine value type for id= %s", pId);
}
else
{
- SysLog(NID_APP, "Failed find value for id=%s", pId);
+ SysSecureLog(NID_APP, "Failed find value for id= %s", pId);
}
}