PKG_VALUE_STRING_LEN_MAX - 1);
}
- std::string icon_name;
+ GList *privilege_list = pkg_detail_info->privilege_list;
+ FOREACH(it, configInfo.featuresList) {
+ std::string featureInfo = DPL::ToUTF8String(it->name);
+ LogDebug("privilege : " << featureInfo);
+ int length = featureInfo.size();
+ char *privilege = (char*) calloc(1, (sizeof(char) * (length + 1)));
+ snprintf(privilege, length + 1, "%s", featureInfo.c_str());
+ privilege_list = g_list_append(privilege_list, &privilege);
+ }
+
+ std::string icon_name;
FOREACH(i, configInfo.iconsList) {
LogDebug("icon name: " << i->src);
icon_name = DPL::ToUTF8String(i->src);
break;
}
+
pkg_detail_info->icon_buf = getIconInfo(widget_path, icon_name,
pkg_detail_info->icon_size);
LogDebug("icon size : " << pkg_detail_info->icon_size);
- GList *privilege_list = NULL;
- FOREACH(it, configInfo.featuresList) {
- LogDebug("privilege : " << it->name);
- int length = DPL::ToUTF8String(it->name).length();
- char *privilege = (char*) calloc(1, (sizeof(char) * length) + 1);
- snprintf(privilege, length + 1, "%s",
- DPL::ToUTF8String(it->name).c_str());
- privilege_list = g_list_append(privilege_list, privilege);
- }
- pkg_detail_info->privilege_list = privilege_list;
-
return TRUE;
}
pkgmgr_info *pkgmgr_client_check_pkginfo_from_file(const char *pkg_path)
{
LogDebug("pkgmgr_client_check_pkginfo_from_file() is called");
- package_manager_pkg_detail_info_t pkg_detail_info;
- int ret = getWidgetDetailInfoFromPackage(pkg_path, &pkg_detail_info);
+ package_manager_pkg_detail_info_t *pkg_detail_info;
+ pkg_detail_info = (package_manager_pkg_detail_info_t*)malloc(
+ sizeof(package_manager_pkg_info_t));
+ int ret = getWidgetDetailInfoFromPackage(pkg_path, pkg_detail_info);
if (FALSE == ret) {
LogError("Failed to get package detail info ");
return NULL;