ci::PkgmgrInstaller pkgmgr_installer;
wgt::WgtAppQueryInterface query_interface;
- auto pkgmgr = ci::PkgMgrInterface::Create(backend_argc, argv, &pkgmgr_installer,
- &query_interface);
+ auto pkgmgr = ci::PkgMgrInterface::Create(backend_argc, argv,
+ &pkgmgr_installer, &query_interface);
if (!pkgmgr) {
LOG(ERROR) << "Options of pkgmgr installer cannot be parsed";
return EINVAL;
}
}
-int GetAppInstalledTime(const char *appid, uid_t uid)
-{
- int ret = 0;
- int installed_time = 0;
- pkgmgrinfo_appinfo_h handle = NULL;
- ret = pkgmgrinfo_appinfo_get_usr_appinfo(appid, uid, &handle);
- if (ret != PMINFO_R_OK)
- return -1;
- ret = pkgmgrinfo_appinfo_get_installed_time(handle, &installed_time);
- if (ret != PMINFO_R_OK) {
- pkgmgrinfo_appinfo_destroy_appinfo(handle);
- return -1;
- }
- pkgmgrinfo_appinfo_destroy_appinfo(handle);
- return installed_time;
+int GetAppInstalledTime(const char *appid, uid_t uid) {
+ int ret = 0;
+ int installed_time = 0;
+ pkgmgrinfo_appinfo_h handle = NULL;
+ ret = pkgmgrinfo_appinfo_get_usr_appinfo(appid, uid, &handle);
+ if (ret != PMINFO_R_OK)
+ return -1;
+ ret = pkgmgrinfo_appinfo_get_installed_time(handle, &installed_time);
+ if (ret != PMINFO_R_OK) {
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return -1;
+ }
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ return installed_time;
}
const char kResWgt[] = "res/wgt";
const char kConfigFileName[] = "config.xml";
-void FreeMetadataList(gpointer data)
-{
+void FreeMetadataList(gpointer data) {
metadata_x* metadata = reinterpret_cast<metadata_x*>(data);
if (metadata) {
if (metadata->key)
manifest->update = strdup("true");
else
manifest->update = strdup("false");
- }
- else {
+ } else {
manifest->update = strdup("false");
}
void StepGenerateXml::GenerateProvidesAppDefinedPrivilege(
xmlTextWriterPtr writer) {
if (context_->manifest_data.get()->provides_appdefined_privileges) {
- xmlTextWriterStartElement(writer, BAD_CAST "provides-appdefined-privileges");
+ xmlTextWriterStartElement(writer,
+ BAD_CAST "provides-appdefined-privileges");
for (appdefined_privilege_x* priv : GListRange<appdefined_privilege_x*>(
context_->manifest_data.get()->provides_appdefined_privileges)) {
xmlTextWriterStartElement(writer, BAD_CAST "appdefined-privilege");