[gnome-software/wip/async-plugin-repo-funcs: 31/37] plugin: Remove definition of gs_plugin_enable_repo() function




commit 07fc42143fd5658177331753b87ee044d8c2003e
Author: Milan Crha <mcrha redhat com>
Date:   Tue Jun 14 18:35:32 2022 +0200

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

 lib/gs-plugin-loader.c |  3 ---
 lib/gs-plugin-vfuncs.h | 33 ---------------------------------
 lib/gs-plugin.c        |  2 --
 3 files changed, 38 deletions(-)
---
diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c
index f109f5cce..d89ec2e5e 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_ENABLE_REPO:
        case GS_PLUGIN_ACTION_DISABLE_REPO:
                {
                        GsApp *app;
@@ -632,7 +631,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_ENABLE_REPO:
        case GS_PLUGIN_ACTION_DISABLE_REPO:
                {
                        GsPluginActionFunc plugin_func = func;
@@ -3489,7 +3487,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_ENABLE_REPO:
        case GS_PLUGIN_ACTION_DISABLE_REPO:
                if (!helper->anything_ran) {
                        g_set_error (&error,
diff --git a/lib/gs-plugin-vfuncs.h b/lib/gs-plugin-vfuncs.h
index 00b95631a..db10ec4b0 100644
--- a/lib/gs-plugin-vfuncs.h
+++ b/lib/gs-plugin-vfuncs.h
@@ -506,39 +506,6 @@ gboolean    gs_plugin_add_langpacks                (GsPlugin       *plugin,
                                                         GCancellable   *cancellable,
                                                         GError         **error);
 
-/**
- * gs_plugin_enable_repo:
- * @plugin: a #GsPlugin
- * @repo: a #GsApp representing a repository
- * @cancellable: a #GCancellable, or %NULL
- * @error: a #GError, or %NULL
- *
- * Enable the repository. This is a voluntary function, the plugin implements
- * it only if it supports it. If implemented, its pair function gs_plugin_disable_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 @repo.
- *
- * 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 @repo
- * to %GS_APP_STATE_INSTALLED.
- *
- * Returns: %TRUE for success or if not relevant
- *
- * Since: 41
- **/
-gboolean        gs_plugin_enable_repo                  (GsPlugin       *plugin,
-                                                        GsApp          *repo,
-                                                        GCancellable   *cancellable,
-                                                        GError         **error);
-
 /**
  * gs_plugin_disable_repo:
  * @plugin: a #GsPlugin
diff --git a/lib/gs-plugin.c b/lib/gs-plugin.c
index 3523f3448..46f7a55a1 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_ENABLE_REPO)
-               return "gs_plugin_enable_repo";
        if (action == GS_PLUGIN_ACTION_DISABLE_REPO)
                return "gs_plugin_disable_repo";
        return NULL;


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