[gnome-software: 10/24] gs-plugin-types: Drop GS_PLUGIN_ACTION_SEARCH_FILES




commit 5dcba9b8043026a779a56a4732c741766753ece4
Author: Philip Withnall <pwithnall endlessos org>
Date:   Mon Apr 11 13:39:49 2022 +0100

    gs-plugin-types: Drop GS_PLUGIN_ACTION_SEARCH_FILES
    
    It’s no longer used.
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>
    
    Helps: #1472

 lib/gs-plugin-loader.c |  4 ----
 lib/gs-plugin-types.h  |  2 --
 lib/gs-plugin-vfuncs.h | 21 ---------------------
 lib/gs-plugin.c        |  6 ------
 4 files changed, 33 deletions(-)
---
diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c
index b088196f8..6afd57fca 100644
--- a/lib/gs-plugin-loader.c
+++ b/lib/gs-plugin-loader.c
@@ -673,7 +673,6 @@ gs_plugin_loader_call_vfunc (GsPluginLoaderHelper *helper,
                                           cancellable, &error_local);
                }
                break;
-       case GS_PLUGIN_ACTION_SEARCH_FILES:
        case GS_PLUGIN_ACTION_SEARCH_PROVIDES:
                {
                        GsPluginSearchFunc plugin_func = func;
@@ -3620,7 +3619,6 @@ gs_plugin_loader_process_thread_cb (GTask *task,
                gs_app_list_filter (list, gs_plugin_loader_app_is_valid_filter, helper);
                break;
        case GS_PLUGIN_ACTION_SEARCH:
-       case GS_PLUGIN_ACTION_SEARCH_FILES:
        case GS_PLUGIN_ACTION_SEARCH_PROVIDES:
        case GS_PLUGIN_ACTION_GET_ALTERNATES:
                gs_app_list_filter (list, gs_plugin_loader_app_is_valid_filter, helper);
@@ -4128,7 +4126,6 @@ job_process_cb (GTask *task)
        /* check required args */
        switch (action) {
        case GS_PLUGIN_ACTION_SEARCH:
-       case GS_PLUGIN_ACTION_SEARCH_FILES:
        case GS_PLUGIN_ACTION_SEARCH_PROVIDES:
        case GS_PLUGIN_ACTION_URL_TO_APP:
                if (gs_plugin_job_get_search (plugin_job) == NULL) {
@@ -4206,7 +4203,6 @@ job_process_cb (GTask *task)
        case GS_PLUGIN_ACTION_GET_POPULAR:
        case GS_PLUGIN_ACTION_GET_RECENT:
        case GS_PLUGIN_ACTION_SEARCH:
-       case GS_PLUGIN_ACTION_SEARCH_FILES:
        case GS_PLUGIN_ACTION_SEARCH_PROVIDES:
                if (gs_plugin_job_get_timeout (plugin_job) > 0) {
                        helper->timeout_id =
diff --git a/lib/gs-plugin-types.h b/lib/gs-plugin-types.h
index 032241ebf..1a412a78c 100644
--- a/lib/gs-plugin-types.h
+++ b/lib/gs-plugin-types.h
@@ -260,7 +260,6 @@ typedef enum {
  * @GS_PLUGIN_ACTION_GET_POPULAR:              Get the list of popular applications
  * @GS_PLUGIN_ACTION_GET_FEATURED:             Get the list of featured applications
  * @GS_PLUGIN_ACTION_SEARCH:                   Get the search results for a query
- * @GS_PLUGIN_ACTION_SEARCH_FILES:             Get the search results for a file 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
@@ -292,7 +291,6 @@ typedef enum {
        GS_PLUGIN_ACTION_GET_POPULAR,
        GS_PLUGIN_ACTION_GET_FEATURED,
        GS_PLUGIN_ACTION_SEARCH,
-       GS_PLUGIN_ACTION_SEARCH_FILES,
        GS_PLUGIN_ACTION_SEARCH_PROVIDES,
        GS_PLUGIN_ACTION_GET_CATEGORIES,
        GS_PLUGIN_ACTION_GET_CATEGORY_APPS,
diff --git a/lib/gs-plugin-vfuncs.h b/lib/gs-plugin-vfuncs.h
index 83364376c..23288f941 100644
--- a/lib/gs-plugin-vfuncs.h
+++ b/lib/gs-plugin-vfuncs.h
@@ -83,27 +83,6 @@ gboolean      gs_plugin_add_search                   (GsPlugin       *plugin,
                                                         GCancellable   *cancellable,
                                                         GError         **error);
 
-/**
- * gs_plugin_add_search_files:
- * @plugin: a #GsPlugin
- * @values: a list of filenames, e.g. [ "/usr/share/help/gimp/index.html" ]
- * @list: a #GsAppList
- * @cancellable: a #GCancellable, or %NULL
- * @error: a #GError, or %NULL
- *
- * Called when searching for an application that provides a specific filename
- * on the filesystem.
- *
- * Plugins are expected to add new apps using gs_app_list_add().
- *
- * Returns: %TRUE for success or if not relevant
- **/
-gboolean        gs_plugin_add_search_files             (GsPlugin       *plugin,
-                                                        gchar          **values,
-                                                        GsAppList      *list,
-                                                        GCancellable   *cancellable,
-                                                        GError         **error);
-
 /**
  * gs_plugin_add_search_what_provides
  * @plugin: a list of tags, e.g. [ "text/rtf" ]
diff --git a/lib/gs-plugin.c b/lib/gs-plugin.c
index eace3354f..d52af4ff9 100644
--- a/lib/gs-plugin.c
+++ b/lib/gs-plugin.c
@@ -1469,8 +1469,6 @@ gs_plugin_action_to_function_name (GsPluginAction action)
                return "gs_plugin_add_recent";
        if (action == GS_PLUGIN_ACTION_SEARCH)
                return "gs_plugin_add_search";
-       if (action == GS_PLUGIN_ACTION_SEARCH_FILES)
-               return "gs_plugin_add_search_files";
        if (action == GS_PLUGIN_ACTION_SEARCH_PROVIDES)
                return "gs_plugin_add_search_what_provides";
        if (action == GS_PLUGIN_ACTION_GET_CATEGORY_APPS)
@@ -1531,8 +1529,6 @@ gs_plugin_action_to_string (GsPluginAction action)
                return "get-featured";
        if (action == GS_PLUGIN_ACTION_SEARCH)
                return "search";
-       if (action == GS_PLUGIN_ACTION_SEARCH_FILES)
-               return "search-files";
        if (action == GS_PLUGIN_ACTION_SEARCH_PROVIDES)
                return "search-provides";
        if (action == GS_PLUGIN_ACTION_GET_CATEGORIES)
@@ -1601,8 +1597,6 @@ gs_plugin_action_from_string (const gchar *action)
                return GS_PLUGIN_ACTION_GET_FEATURED;
        if (g_strcmp0 (action, "search") == 0)
                return GS_PLUGIN_ACTION_SEARCH;
-       if (g_strcmp0 (action, "search-files") == 0)
-               return GS_PLUGIN_ACTION_SEARCH_FILES;
        if (g_strcmp0 (action, "search-provides") == 0)
                return GS_PLUGIN_ACTION_SEARCH_PROVIDES;
        if (g_strcmp0 (action, "get-categories") == 0)


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