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




commit 1d116f019e02e8d17ffa1093124b9d0eced60a78
Author: Milan Crha <mcrha redhat com>
Date:   Tue Jun 14 14:52:50 2022 +0200

    plugin: Remove definition of gs_plugin_install_repo() function
    
    It's not used anymore. The GS_PLUGIN_ACTION_INSTALL_REPO is still
    used by the GsApp and on few other places.

 lib/gs-plugin-loader.c |  7 +------
 lib/gs-plugin-vfuncs.h | 33 ---------------------------------
 lib/gs-plugin.c        |  2 --
 3 files changed, 1 insertion(+), 41 deletions(-)
---
diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c
index e843ce955..ac5d7b2ea 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_INSTALL_REPO:
        case GS_PLUGIN_ACTION_REMOVE_REPO:
        case GS_PLUGIN_ACTION_ENABLE_REPO:
        case GS_PLUGIN_ACTION_DISABLE_REPO:
@@ -634,7 +633,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_INSTALL_REPO:
        case GS_PLUGIN_ACTION_REMOVE_REPO:
        case GS_PLUGIN_ACTION_ENABLE_REPO:
        case GS_PLUGIN_ACTION_DISABLE_REPO:
@@ -742,7 +740,7 @@ gs_plugin_loader_call_vfunc (GsPluginLoaderHelper *helper,
        }
 
        /* add app to the pending installation queue if necessary */
-       if ((action == GS_PLUGIN_ACTION_INSTALL || action == GS_PLUGIN_ACTION_INSTALL_REPO) &&
+       if (action == GS_PLUGIN_ACTION_INSTALL &&
            app != NULL && gs_app_get_state (app) == GS_APP_STATE_QUEUED_FOR_INSTALL) {
                add_app_to_install_queue (plugin_loader, app);
        }
@@ -3493,7 +3491,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_INSTALL_REPO:
        case GS_PLUGIN_ACTION_REMOVE_REPO:
        case GS_PLUGIN_ACTION_ENABLE_REPO:
        case GS_PLUGIN_ACTION_DISABLE_REPO:
@@ -3545,7 +3542,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_INSTALL_REPO:
        case GS_PLUGIN_ACTION_REMOVE_REPO:
                gs_plugin_job_add_refine_flags (helper->plugin_job,
                                                GS_PLUGIN_REFINE_FLAGS_REQUIRE_ORIGIN |
@@ -4173,7 +4169,6 @@ job_process_cb (GTask *task)
 
        switch (action) {
        case GS_PLUGIN_ACTION_INSTALL:
-       case GS_PLUGIN_ACTION_INSTALL_REPO:
        case GS_PLUGIN_ACTION_UPDATE:
        case GS_PLUGIN_ACTION_UPGRADE_DOWNLOAD:
                /* these actions must be performed by the thread pool because we
diff --git a/lib/gs-plugin-vfuncs.h b/lib/gs-plugin-vfuncs.h
index 3801b0ba0..20ac8fe61 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_install_repo:
- * @plugin: a #GsPlugin
- * @repo: a #GsApp representing a repository
- * @cancellable: a #GCancellable, or %NULL
- * @error: a #GError, or %NULL
- *
- * Install the repository. This is a voluntary function, the plugin implements
- * it only if it supports it. If implemented, its pair function gs_plugin_remove_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 either %GS_APP_STATE_INSTALLED or %GS_APP_STATE_AVAILABLE.
- *
- * Returns: %TRUE for success or if not relevant
- *
- * Since: 41
- **/
-gboolean        gs_plugin_install_repo                 (GsPlugin       *plugin,
-                                                        GsApp          *repo,
-                                                        GCancellable   *cancellable,
-                                                        GError         **error);
-
 /**
  * gs_plugin_remove_repo:
  * @plugin: a #GsPlugin
diff --git a/lib/gs-plugin.c b/lib/gs-plugin.c
index fbca833fc..dc20aa679 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_INSTALL_REPO)
-               return "gs_plugin_install_repo";
        if (action == GS_PLUGIN_ACTION_REMOVE_REPO)
                return "gs_plugin_remove_repo";
        if (action == GS_PLUGIN_ACTION_ENABLE_REPO)


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