[gnome-software: 13/14] gs-plugin-types: Drop GS_PLUGIN_ACTION_GET_CATEGORY_APPS




commit fe48946f16c534dec0ed01e26f0adcc32e627966
Author: Philip Withnall <pwithnall endlessos org>
Date:   Wed May 4 14:43:12 2022 +0100

    gs-plugin-types: Drop GS_PLUGIN_ACTION_GET_CATEGORY_APPS
    
    It’s no longer used. The `GsAppQuery:category` query property is used
    instead.
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>
    
    Helps: #1472

 lib/gs-plugin-loader.c | 15 ---------------
 lib/gs-plugin-types.h  |  2 --
 lib/gs-plugin-vfuncs.h | 20 --------------------
 lib/gs-plugin.c        |  6 ------
 4 files changed, 43 deletions(-)
---
diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c
index d3dbef2c9..dffe7d762 100644
--- a/lib/gs-plugin-loader.c
+++ b/lib/gs-plugin-loader.c
@@ -680,15 +680,6 @@ gs_plugin_loader_call_vfunc (GsPluginLoaderHelper *helper,
                                           cancellable, &error_local);
                }
                break;
-       case GS_PLUGIN_ACTION_GET_CATEGORY_APPS:
-               {
-                       GsPluginCategoryFunc plugin_func = func;
-                       ret = plugin_func (plugin,
-                                          gs_plugin_job_get_category (helper->plugin_job),
-                                          list,
-                                          cancellable, &error_local);
-               }
-               break;
        case GS_PLUGIN_ACTION_FILE_TO_APP:
                {
                        GsPluginFileToAppFunc plugin_func = func;
@@ -3581,11 +3572,6 @@ gs_plugin_loader_process_thread_cb (GTask *task,
                gs_app_list_filter (list, gs_plugin_loader_filter_qt_for_gtk, NULL);
                gs_app_list_filter (list, gs_plugin_loader_get_app_is_compatible, plugin_loader);
                break;
-       case GS_PLUGIN_ACTION_GET_CATEGORY_APPS:
-               gs_app_list_filter (list, gs_plugin_loader_app_is_valid_filter, helper);
-               gs_app_list_filter (list, gs_plugin_loader_filter_qt_for_gtk, NULL);
-               gs_app_list_filter (list, gs_plugin_loader_get_app_is_compatible, plugin_loader);
-               break;
        case GS_PLUGIN_ACTION_GET_FEATURED:
                if (g_getenv ("GNOME_SOFTWARE_FEATURED") != NULL) {
                        gs_app_list_filter (list, gs_plugin_loader_featured_debug, NULL);
@@ -4099,7 +4085,6 @@ job_process_cb (GTask *task)
        /* set up a hang handler */
        switch (action) {
        case GS_PLUGIN_ACTION_GET_ALTERNATES:
-       case GS_PLUGIN_ACTION_GET_CATEGORY_APPS:
        case GS_PLUGIN_ACTION_GET_FEATURED:
        case GS_PLUGIN_ACTION_SEARCH:
        case GS_PLUGIN_ACTION_SEARCH_PROVIDES:
diff --git a/lib/gs-plugin-types.h b/lib/gs-plugin-types.h
index 42e9a1fb8..56e4ce233 100644
--- a/lib/gs-plugin-types.h
+++ b/lib/gs-plugin-types.h
@@ -261,7 +261,6 @@ typedef enum {
  * @GS_PLUGIN_ACTION_SEARCH:                   Get the search results for a query
  * @GS_PLUGIN_ACTION_SEARCH_PROVIDES:          Get the search results for a provide query
  * @GS_PLUGIN_ACTION_GET_CATEGORIES:           Get the list of categories
- * @GS_PLUGIN_ACTION_GET_CATEGORY_APPS:                Get the apps for a specific category
  * @GS_PLUGIN_ACTION_FILE_TO_APP:              Convert the file to an application
  * @GS_PLUGIN_ACTION_URL_TO_APP:               Convert the URI to an application
  * @GS_PLUGIN_ACTION_GET_UPDATES_HISTORICAL:    Get the list of historical updates
@@ -290,7 +289,6 @@ typedef enum {
        GS_PLUGIN_ACTION_SEARCH,
        GS_PLUGIN_ACTION_SEARCH_PROVIDES,
        GS_PLUGIN_ACTION_GET_CATEGORIES,
-       GS_PLUGIN_ACTION_GET_CATEGORY_APPS,
        GS_PLUGIN_ACTION_FILE_TO_APP,
        GS_PLUGIN_ACTION_URL_TO_APP,
        GS_PLUGIN_ACTION_GET_UPDATES_HISTORICAL,
diff --git a/lib/gs-plugin-vfuncs.h b/lib/gs-plugin-vfuncs.h
index 7469a044f..6623de496 100644
--- a/lib/gs-plugin-vfuncs.h
+++ b/lib/gs-plugin-vfuncs.h
@@ -203,26 +203,6 @@ gboolean    gs_plugin_add_categories               (GsPlugin       *plugin,
                                                         GCancellable   *cancellable,
                                                         GError         **error);
 
-/**
- * gs_plugin_add_category_apps:
- * @plugin: a #GsPlugin
- * @category: a #GsCategory
- * @list: a #GsAppList
- * @cancellable: a #GCancellable, or %NULL
- * @error: a #GError, or %NULL
- *
- * Get all the applications that match a specific category.
- *
- * Plugins are expected to add new apps using gs_app_list_add().
- *
- * Returns: %TRUE for success or if not relevant
- **/
-gboolean        gs_plugin_add_category_apps            (GsPlugin       *plugin,
-                                                        GsCategory     *category,
-                                                        GsAppList      *list,
-                                                        GCancellable   *cancellable,
-                                                        GError         **error);
-
 /**
  * gs_plugin_add_featured:
  * @plugin: a #GsPlugin
diff --git a/lib/gs-plugin.c b/lib/gs-plugin.c
index 14de6341a..77c59ce4c 100644
--- a/lib/gs-plugin.c
+++ b/lib/gs-plugin.c
@@ -1467,8 +1467,6 @@ gs_plugin_action_to_function_name (GsPluginAction action)
                return "gs_plugin_add_search";
        if (action == GS_PLUGIN_ACTION_SEARCH_PROVIDES)
                return "gs_plugin_add_search_what_provides";
-       if (action == GS_PLUGIN_ACTION_GET_CATEGORY_APPS)
-               return "gs_plugin_add_category_apps";
        if (action == GS_PLUGIN_ACTION_GET_CATEGORIES)
                return "gs_plugin_add_categories";
        if (action == GS_PLUGIN_ACTION_GET_ALTERNATES)
@@ -1527,8 +1525,6 @@ gs_plugin_action_to_string (GsPluginAction action)
                return "search-provides";
        if (action == GS_PLUGIN_ACTION_GET_CATEGORIES)
                return "get-categories";
-       if (action == GS_PLUGIN_ACTION_GET_CATEGORY_APPS)
-               return "get-category-apps";
        if (action == GS_PLUGIN_ACTION_FILE_TO_APP)
                return "file-to-app";
        if (action == GS_PLUGIN_ACTION_URL_TO_APP)
@@ -1591,8 +1587,6 @@ gs_plugin_action_from_string (const gchar *action)
                return GS_PLUGIN_ACTION_SEARCH_PROVIDES;
        if (g_strcmp0 (action, "get-categories") == 0)
                return GS_PLUGIN_ACTION_GET_CATEGORIES;
-       if (g_strcmp0 (action, "get-category-apps") == 0)
-               return GS_PLUGIN_ACTION_GET_CATEGORY_APPS;
        if (g_strcmp0 (action, "file-to-app") == 0)
                return GS_PLUGIN_ACTION_FILE_TO_APP;
        if (g_strcmp0 (action, "url-to-app") == 0)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]