[gnome-software/wip/rancell/reviews] Drop special plugin function to report reviews support - we just need to check if the plugin has gs_
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/rancell/reviews] Drop special plugin function to report reviews support - we just need to check if the plugin has gs_
- Date: Thu, 4 Feb 2016 03:57:35 +0000 (UTC)
commit 8f5b3f8f28ef4aeecd72b97c7df04091d0ccf086
Author: Robert Ancell <robert ancell canonical com>
Date: Thu Feb 4 16:56:55 2016 +1300
Drop special plugin function to report reviews support - we just need to check if the plugin has
gs_plugin_app_set_review defined
src/gs-plugin-loader.c | 8 +++-----
src/gs-plugin.h | 2 --
src/plugins/gs-plugin-ubuntu-reviews.c | 6 ------
3 files changed, 3 insertions(+), 13 deletions(-)
---
diff --git a/src/gs-plugin-loader.c b/src/gs-plugin-loader.c
index 43a8727..6031fbf 100644
--- a/src/gs-plugin-loader.c
+++ b/src/gs-plugin-loader.c
@@ -2837,7 +2837,6 @@ gs_plugin_loader_open_plugin (GsPluginLoader *plugin_loader,
GModule *module;
GsPluginGetNameFunc plugin_name = NULL;
GsPluginGetDepsFunc plugin_deps = NULL;
- GsPluginGetSupportsReviewsFunc plugin_supports_reviews = NULL;
GsPlugin *plugin = NULL;
module = g_module_open (filename, 0);
@@ -2863,10 +2862,9 @@ gs_plugin_loader_open_plugin (GsPluginLoader *plugin_loader,
(gpointer *) &plugin_deps);
/* Check if this plugin can do reviews */
- (void) g_module_symbol (module,
- "gs_plugin_get_supports_reviews",
- (gpointer *) &plugin_supports_reviews);
- if (plugin_supports_reviews && plugin_supports_reviews (plugin))
+ if (g_module_symbol (module,
+ "gs_plugin_app_set_review",
+ NULL))
priv->supports_reviews = TRUE;
/* print what we know */
diff --git a/src/gs-plugin.h b/src/gs-plugin.h
index 1ec4d6a..4d67181 100644
--- a/src/gs-plugin.h
+++ b/src/gs-plugin.h
@@ -123,7 +123,6 @@ typedef enum {
typedef const gchar *(*GsPluginGetNameFunc) (void);
typedef const gchar **(*GsPluginGetDepsFunc) (GsPlugin *plugin);
-typedef gboolean *(*GsPluginGetSupportsReviewsFunc) (GsPlugin *plugin);
typedef void (*GsPluginFunc) (GsPlugin *plugin);
typedef gboolean (*GsPluginSearchFunc) (GsPlugin *plugin,
gchar **value,
@@ -277,7 +276,6 @@ gboolean gs_plugin_app_upgrade_download (GsPlugin *plugin,
GsApp *app,
GCancellable *cancellable,
GError **error);
-gboolean gs_plugin_get_supports_review (GsPlugin *plugin);
gboolean gs_plugin_app_set_review (GsPlugin *plugin,
GsApp *app,
GCancellable *cancellable,
diff --git a/src/plugins/gs-plugin-ubuntu-reviews.c b/src/plugins/gs-plugin-ubuntu-reviews.c
index 064bd45..6377518 100644
--- a/src/plugins/gs-plugin-ubuntu-reviews.c
+++ b/src/plugins/gs-plugin-ubuntu-reviews.c
@@ -722,12 +722,6 @@ set_request (SoupMessage *message, JsonBuilder *builder)
g_object_unref (generator);
}
-gboolean
-gs_plugin_get_supports_reviews (GsPlugin *plugin)
-{
- return TRUE;
-}
-
static gboolean
send_review (GsPlugin *plugin,
GsAppReview *review,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]