return -1;
}
+static gint __pkg_disable_chk_func(gconstpointer data1, gconstpointer data2)
+{
+ pkgmgrinfo_node_x *node = (pkgmgrinfo_node_x *)data1;
+
+ if (node->prop == E_PMINFO_PKGINFO_PROP_PACKAGE_DISABLE)
+ return 0;
+ else
+ return 1;
+}
+
static void __destroy_each_node(gpointer data, gpointer user_data)
{
ret_if(data == NULL);
pkgmgrinfo_basic_free_package((package_x *)data);
}
+static bool __check_disable_filter_exist(pkgmgrinfo_filter_x *filter)
+{
+ GSList *link;
+
+ if (filter == NULL)
+ return false;
+
+ link = g_slist_find_custom(filter->list, NULL, __pkg_disable_chk_func);
+ if (link)
+ return true;
+
+ return false;
+}
+
static int __bind_params(sqlite3_stmt *stmt, GList *params)
{
GList *tmp_list = NULL;
}
/* add package_disable='false' clause by default */
- pkgmgrinfo_pkginfo_filter_add_bool(tmp_filter, PMINFO_PKGINFO_PROP_PACKAGE_DISABLE, false);
+ if (__check_disable_filter_exist(tmp_filter) == false)
+ pkgmgrinfo_pkginfo_filter_add_bool(tmp_filter,
+ PMINFO_PKGINFO_PROP_PACKAGE_DISABLE, false);
+
query_len = strlen(query_raw);
snprintf(query, MAX_QUERY_LEN - 1, "%s", query_raw);