bool IsMainApp(void) const;
result SetMainApp(bool mainApp);
+ bool IsServiceApp(void) const;
+
result AddCategory(Tizen::Base::String* pCategory);
Tizen::Base::String GetAppFeature(const Tizen::Base::String& key) const;
bool __launchingIconVisible;
bool __mainApp;
+ bool __serviceApp;
bool __fromDatabase;
Tizen::Base::String __name;
Tizen::Base::Collection::IList* GetPrivilegeListN(void) const;
result AddPrivilege(const Tizen::Base::String& privilege);
+ bool IsPreloaded(void) const;
+ bool IsUpdated(void) const;
+
result AddPackageAppInfo(const PackageAppInfo& appInfo);
// to be reviewed
bool __uninstallable;
bool __movable;
bool __downloaded;
+ bool __preloaded;
+ bool __updated;
bool __iconAvailable;
bool __externalStorage;
bool __fromDatabase;
return E_SUCCESS;
}
+bool
+_PackageAppInfoImpl::IsServiceApp(void) const
+{
+ return __serviceApp;
+}
+
result
_PackageAppInfoImpl::AddCategory(String* pCategory)
{
char* pMenuIcon = null;
char* pSettingIcon = null;
char* pNotificationIcon = null;
+ char* pComponentType = null;
bool mainApp = false;
bool menuIconVisible = false;
SysLog(NID_APP, "pkgmgrinfo_appinfo_is_nodisplay() is failed. result = [%d]", res);
}
- SysLog(NID_APP, "exe = [%s], displayName = [%s], mainApp = [%d], menuIconVisible = [%d]", pExePath, pDisplayName, mainApp, menuIconVisible);
+ res = pkgmgrinfo_appinfo_get_component_type(__pAppInfoHandle, &pComponentType);
+ if (res == PMINFO_R_OK)
+ {
+ if (strcasecmp(pComponentType, "svcapp") == 0)
+ {
+ __serviceApp = true;
+ }
+ else
+ {
+ __serviceApp = false;
+ }
+ }
+ else
+ {
+ SysLog(NID_APP, "pkgmgrinfo_appinfo_get_component() is failed. result = [%d]", res);
+ }
+
+ SysLog(NID_APP, "exe = [%s], displayName = [%s], mainApp = [%d], menuIconVisible = [%d], serviceApp = [%d]", pExePath, pDisplayName, mainApp, menuIconVisible, __serviceApp);
return E_SUCCESS;
}
_PackageAppInfoImpl::_PackageAppInfoImpl(void)
: __launchingIconVisible(true)
, __mainApp(false)
+ , __serviceApp(false)
, __fromDatabase(false)
, __pLaunchConditionImplList(null)
, __pNotificationImplList(null)
, __uniqueId(0)
, __pkgId(0)
, __appFeature(0)
- ,__pAppInfoHandle(null)
+ , __pAppInfoHandle(null)
, __pIconBuffer(null)
, __iconSize(0)
{
return r;
}
+bool
+_PackageInfoImpl::IsPreloaded(void) const
+{
+ return __preloaded;
+}
+
+bool
+_PackageInfoImpl::IsUpdated(void) const
+{
+ return __updated;
+}
+
result
_PackageInfoImpl::AddPackageAppInfo(const PackageAppInfo& packageAppInfo)
{
, __uninstallable(true)
, __movable(false)
, __downloaded(false)
+ , __preloaded(false)
+ , __updated(false)
, __iconAvailable(false)
, __externalStorage(false)
, __fromDatabase(false)
pkgmgrinfo_installed_storage storage = PMINFO_INTERNAL_STORAGE;
bool removable = true;
bool movable = true;
- bool preloaded = true;
- bool updated = true;
+ bool preloaded = false;
+ bool updated = false;
std::unique_ptr<char[]> pPackageId(_StringConverter::CopyToCharArrayN(packageId));
SysTryReturnResult(NID_APP, pPackageId, E_OUT_OF_MEMORY, "pPackageId is null");
SysLog(NID_APP, "pkgmgrinfo_pkginfo_is_movable() is failed. result = [%d]", result);
}
+ result = pkgmgrinfo_pkginfo_is_preload(__packageInfoHandle, &preloaded);
+ if (result == PMINFO_R_OK)
+ {
+ __preloaded = preloaded;
+ }
+ else
+ {
+ SysLog(NID_APP, "pkgmgrinfo_pkginfo_is_preload() is failed. result = [%d]", result);
+ }
+
result = pkgmgrinfo_pkginfo_is_update(__packageInfoHandle, &updated);
if (result == PMINFO_R_OK)
{
- if (updated == true)
+ __updated = updated;
+ }
+ else
+ {
+ SysLog(NID_APP, "pkgmgrinfo_pkginfo_is_update() is failed. result = [%d]", result);
+ }
+
+ if (updated == true)
+ {
+ __downloaded = true;
+ }
+ else
+ {
+ if (preloaded == true)
{
- __downloaded = true;
+ __downloaded = false;
}
else
{
- result = pkgmgrinfo_pkginfo_is_preload(__packageInfoHandle, &preloaded);
- if (result == PMINFO_R_OK)
- {
- if (preloaded == true)
- {
- __downloaded = false;
- }
- else
- {
- __downloaded = true;
- }
- }
- else
- {
- SysLog(NID_APP, "pkgmgrinfo_pkginfo_is_preload() is failed. result = [%d]", result);
- }
+ __downloaded = true;
}
}
- else
- {
- SysLog(NID_APP, "pkgmgrinfo_pkginfo_is_update() is failed. result = [%d]", result);
- }
result = pkgmgrinfo_pkginfo_get_description(__packageInfoHandle, &pDescription);
if (result == PMINFO_R_OK)