API int pkgmgrinfo_appinfo_usr_filter_count(pkgmgrinfo_appinfo_filter_h handle, int *count, uid_t uid)
{
GHashTable *list;
+ int ret;
+ pkgmgrinfo_filter_x *filter;
if (handle == NULL || count == NULL) {
_LOGE("invalid parameter");
return PMINFO_R_EINVAL;
}
+ filter = (pkgmgrinfo_filter_x *)handle;
list = g_hash_table_new_full(g_str_hash, g_str_equal, NULL,
__free_applications);
if (list == NULL)
}
}
+ ret = _appinfo_get_applications(uid, uid, filter, 0, list);
+ if (ret != PMINFO_R_OK) {
+ g_hash_table_destroy(list);
+ return PMINFO_R_ERROR;
+ }
+
*count = g_hash_table_size(list);
g_hash_table_destroy(list);