[gnome-software/wip/async-plugin-repo-funcs: 46/60] plugin: Remove definition of gs_plugin_remove_repo() function




commit fd758558137f0dde72ae3026901f9a6d4310b51b
Author: Milan Crha <mcrha redhat com>
Date:   Tue Jun 14 15:46:18 2022 +0200

    plugin: Remove definition of gs_plugin_remove_repo() function
    
    It's not used anymore. The GS_PLUGIN_ACTION_REMOVE_REPO is still
    used on few other places.

 lib/gs-plugin-loader.c |  6 +-----
 lib/gs-plugin-vfuncs.h | 32 --------------------------------
 lib/gs-plugin.c        |  2 --
 3 files changed, 1 insertion(+), 39 deletions(-)
---
diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c
index ac5d7b2ea..f109f5cce 100644
--- a/lib/gs-plugin-loader.c
+++ b/lib/gs-plugin-loader.c
@@ -236,7 +236,6 @@ gs_plugin_loader_helper_free (GsPluginLoaderHelper *helper)
        case GS_PLUGIN_ACTION_REMOVE:
        case GS_PLUGIN_ACTION_UPDATE:
        case GS_PLUGIN_ACTION_DOWNLOAD:
-       case GS_PLUGIN_ACTION_REMOVE_REPO:
        case GS_PLUGIN_ACTION_ENABLE_REPO:
        case GS_PLUGIN_ACTION_DISABLE_REPO:
                {
@@ -633,7 +632,6 @@ gs_plugin_loader_call_vfunc (GsPluginLoaderHelper *helper,
        case GS_PLUGIN_ACTION_UPGRADE_TRIGGER:
        case GS_PLUGIN_ACTION_LAUNCH:
        case GS_PLUGIN_ACTION_UPDATE_CANCEL:
-       case GS_PLUGIN_ACTION_REMOVE_REPO:
        case GS_PLUGIN_ACTION_ENABLE_REPO:
        case GS_PLUGIN_ACTION_DISABLE_REPO:
                {
@@ -3491,7 +3489,6 @@ gs_plugin_loader_process_thread_cb (GTask *task,
        case GS_PLUGIN_ACTION_REMOVE:
        case GS_PLUGIN_ACTION_SEARCH:
        case GS_PLUGIN_ACTION_UPDATE:
-       case GS_PLUGIN_ACTION_REMOVE_REPO:
        case GS_PLUGIN_ACTION_ENABLE_REPO:
        case GS_PLUGIN_ACTION_DISABLE_REPO:
                if (!helper->anything_ran) {
@@ -3542,7 +3539,6 @@ gs_plugin_loader_process_thread_cb (GTask *task,
        switch (action) {
        case GS_PLUGIN_ACTION_INSTALL:
        case GS_PLUGIN_ACTION_REMOVE:
-       case GS_PLUGIN_ACTION_REMOVE_REPO:
                gs_plugin_job_add_refine_flags (helper->plugin_job,
                                                GS_PLUGIN_REFINE_FLAGS_REQUIRE_ORIGIN |
                                                GS_PLUGIN_REFINE_FLAGS_REQUIRE_SETUP_ACTION);
@@ -4053,7 +4049,7 @@ job_process_cb (GTask *task)
        }
 
        /* deal with the install queue */
-       if (action == GS_PLUGIN_ACTION_REMOVE || action == GS_PLUGIN_ACTION_REMOVE_REPO) {
+       if (action == GS_PLUGIN_ACTION_REMOVE) {
                if (remove_app_from_install_queue (plugin_loader, gs_plugin_job_get_app (plugin_job))) {
                        GsAppList *list = gs_plugin_job_get_list (plugin_job);
                        g_task_return_pointer (task, g_object_ref (list), (GDestroyNotify) g_object_unref);
diff --git a/lib/gs-plugin-vfuncs.h b/lib/gs-plugin-vfuncs.h
index 20ac8fe61..00b95631a 100644
--- a/lib/gs-plugin-vfuncs.h
+++ b/lib/gs-plugin-vfuncs.h
@@ -506,38 +506,6 @@ gboolean    gs_plugin_add_langpacks                (GsPlugin       *plugin,
                                                         GCancellable   *cancellable,
                                                         GError         **error);
 
-/**
- * gs_plugin_remove_repo:
- * @plugin: a #GsPlugin
- * @repo: a #GsApp representing a repository
- * @cancellable: a #GCancellable, or %NULL
- * @error: a #GError, or %NULL
- *
- * Remove the repository. This is a voluntary function, the plugin implements
- * it only if it supports it. If implemented, its pair function gs_plugin_install_repo()
- * should be implemented as well.
- *
- * Plugins are expected to send progress notifications to the UI using
- * gs_app_set_progress() using the passed in @app.
- *
- * All functions can block, but should sent progress notifications, e.g. using
- * gs_app_set_progress() if they will take more than tens of milliseconds
- * to complete.
- *
- * On failure the error message returned will usually only be shown on the
- * console, but they can also be retrieved using gs_plugin_loader_get_events().
- *
- * NOTE: Once the action is complete, the plugin must set the new state of @app
- * to %GS_APP_STATE_AVAILABLE or %GS_APP_STATE_UNKNOWN if not known.
- *
- * Returns: %TRUE for success or if not relevant
- *
- * Since: 41
- **/
-gboolean        gs_plugin_remove_repo                  (GsPlugin       *plugin,
-                                                        GsApp          *repo,
-                                                        GCancellable   *cancellable,
-                                                        GError         **error);
 /**
  * gs_plugin_enable_repo:
  * @plugin: a #GsPlugin
diff --git a/lib/gs-plugin.c b/lib/gs-plugin.c
index 750143f60..2ae16e280 100644
--- a/lib/gs-plugin.c
+++ b/lib/gs-plugin.c
@@ -1471,8 +1471,6 @@ gs_plugin_action_to_function_name (GsPluginAction action)
                return "gs_plugin_add_alternates";
        if (action == GS_PLUGIN_ACTION_GET_LANGPACKS)
                return "gs_plugin_add_langpacks";
-       if (action == GS_PLUGIN_ACTION_REMOVE_REPO)
-               return "gs_plugin_remove_repo";
        if (action == GS_PLUGIN_ACTION_ENABLE_REPO)
                return "gs_plugin_enable_repo";
        if (action == GS_PLUGIN_ACTION_DISABLE_REPO)


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