[gnome-software: 3/4] gs-plugin: Drop get_soup_session() method




commit ed4d6f990b5d74530a328efe8ac90c36bf395ee1
Author: Philip Withnall <pwithnall endlessos org>
Date:   Wed Feb 2 12:12:02 2022 +0000

    gs-plugin: Drop get_soup_session() method
    
    It’s no longer used; plugins should construct their own private
    `SoupSession` instances.
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>
    
    Helps: #1472

 lib/gs-plugin-loader.c | 19 +------------------
 lib/gs-plugin-loader.h |  1 -
 lib/gs-plugin.c        | 17 -----------------
 lib/gs-plugin.h        |  1 -
 4 files changed, 1 insertion(+), 37 deletions(-)
---
diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c
index 856188205..67f1f4def 100644
--- a/lib/gs-plugin-loader.c
+++ b/lib/gs-plugin-loader.c
@@ -2824,7 +2824,7 @@ gs_plugin_loader_init (GsPluginLoader *plugin_loader)
                                                                             distro,
                                                                             odrs_review_max_cache_age_secs,
                                                                             odrs_review_n_results_max,
-                                                                            
gs_plugin_loader_get_soup_session (plugin_loader));
+                                                                            plugin_loader->soup_session);
                }
        }
 
@@ -4078,23 +4078,6 @@ gs_plugin_loader_get_system_app_finish (GsPluginLoader *plugin_loader,
        return gs_plugin_loader_app_create_finish (plugin_loader, res, error);
 }
 
-/**
- * gs_plugin_loader_get_soup_session:
- * @plugin_loader: a #GsPluginLoader
- *
- * Get the internal #SoupSession which is used to download things.
- *
- * Returns: (transfer none) (not nullable): a #SoupSession
- * Since: 41
- */
-SoupSession *
-gs_plugin_loader_get_soup_session (GsPluginLoader *plugin_loader)
-{
-       g_return_val_if_fail (GS_IS_PLUGIN_LOADER (plugin_loader), NULL);
-
-       return plugin_loader->soup_session;
-}
-
 /**
  * gs_plugin_loader_get_odrs_provider:
  * @plugin_loader: a #GsPluginLoader
diff --git a/lib/gs-plugin-loader.h b/lib/gs-plugin-loader.h
index 55fe61a02..e1fc437f1 100644
--- a/lib/gs-plugin-loader.h
+++ b/lib/gs-plugin-loader.h
@@ -88,7 +88,6 @@ void           gs_plugin_loader_get_system_app_async  (GsPluginLoader *plugin_loader,
 GsApp          *gs_plugin_loader_get_system_app_finish (GsPluginLoader *plugin_loader,
                                                         GAsyncResult   *res,
                                                         GError         **error);
-SoupSession    *gs_plugin_loader_get_soup_session      (GsPluginLoader *plugin_loader);
 GsOdrsProvider *gs_plugin_loader_get_odrs_provider     (GsPluginLoader *plugin_loader);
 
 /* only useful from the self tests */
diff --git a/lib/gs-plugin.c b/lib/gs-plugin.c
index 27663aed3..40dffbf87 100644
--- a/lib/gs-plugin.c
+++ b/lib/gs-plugin.c
@@ -521,23 +521,6 @@ gs_plugin_set_language (GsPlugin *plugin, const gchar *language)
        priv->language = g_strdup (language);
 }
 
-/**
- * gs_plugin_get_soup_session:
- * @plugin: a #GsPlugin
- *
- * Gets the soup session that this plugin can use when downloading.
- *
- * Returns: the #SoupSession
- *
- * Since: 3.22
- **/
-SoupSession *
-gs_plugin_get_soup_session (GsPlugin *plugin)
-{
-       GsPluginPrivate *priv = gs_plugin_get_instance_private (plugin);
-       return priv->soup_session;
-}
-
 /**
  * gs_plugin_set_soup_session:
  * @plugin: a #GsPlugin
diff --git a/lib/gs-plugin.h b/lib/gs-plugin.h
index b3cd98c56..2e9a292b8 100644
--- a/lib/gs-plugin.h
+++ b/lib/gs-plugin.h
@@ -144,7 +144,6 @@ void                 gs_plugin_remove_flags                 (GsPlugin       *plugin,
                                                         GsPluginFlags   flags);
 guint           gs_plugin_get_scale                    (GsPlugin       *plugin);
 const gchar    *gs_plugin_get_language                 (GsPlugin       *plugin);
-SoupSession    *gs_plugin_get_soup_session             (GsPlugin       *plugin);
 void            gs_plugin_set_soup_session             (GsPlugin       *plugin,
                                                         SoupSession    *soup_session);
 void            gs_plugin_add_rule                     (GsPlugin       *plugin,


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