[gnome-software] Return a dummy distro upgrade if GNOME_SOFTWARE_SELF_TEST=1 is set
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Return a dummy distro upgrade if GNOME_SOFTWARE_SELF_TEST=1 is set
- Date: Thu, 28 Jan 2016 19:33:39 +0000 (UTC)
commit 1f8a41f22c02695e51fd28d2f244d390bf8b1209
Author: Richard Hughes <richard hughsie com>
Date: Thu Jan 28 19:32:58 2016 +0000
Return a dummy distro upgrade if GNOME_SOFTWARE_SELF_TEST=1 is set
src/plugins/Makefile.am | 2 +-
src/plugins/gs-plugin-dummy.c | 49 ++++++++++++++++-------------------------
2 files changed, 20 insertions(+), 31 deletions(-)
---
diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am
index 8d14851..3349a3f 100644
--- a/src/plugins/Makefile.am
+++ b/src/plugins/Makefile.am
@@ -24,12 +24,12 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/src
noinst_LTLIBRARIES = \
- libgs_plugin_dummy.la \
libgs_plugin_self_test.la
plugindir = $(libdir)/gs-plugins-${GS_PLUGIN_API_VERSION}
plugin_LTLIBRARIES = \
libgs_plugin_appstream.la \
+ libgs_plugin_dummy.la \
libgs_plugin_hardcoded-featured.la \
libgs_plugin_hardcoded-blacklist.la \
libgs_plugin_moduleset.la \
diff --git a/src/plugins/gs-plugin-dummy.c b/src/plugins/gs-plugin-dummy.c
index dd3a6ff..0be6975 100644
--- a/src/plugins/gs-plugin-dummy.c
+++ b/src/plugins/gs-plugin-dummy.c
@@ -31,10 +31,6 @@
* Refines: | [id]->[name], [id]->[summary]
*/
-struct GsPluginPrivate {
- guint dummy;
-};
-
/**
* gs_plugin_get_name:
*/
@@ -54,32 +50,6 @@ gs_plugin_initialize (GsPlugin *plugin)
g_debug ("disabling '%s' as not in self test", plugin->name);
gs_plugin_set_enabled (plugin, FALSE);
}
-
- /* create private area */
- plugin->priv = GS_PLUGIN_GET_PRIVATE (GsPluginPrivate);
- plugin->priv->dummy = 999;
-}
-
-/**
- * gs_plugin_destroy:
- */
-void
-gs_plugin_destroy (GsPlugin *plugin)
-{
- plugin->priv->dummy = 0;
-}
-
-/**
- * gs_plugin_add_search:
- */
-gboolean
-gs_plugin_add_search (GsPlugin *plugin,
- gchar **values,
- GList **list,
- GCancellable *cancellable,
- GError **error)
-{
- return TRUE;
}
/**
@@ -215,3 +185,22 @@ gs_plugin_add_category_apps (GsPlugin *plugin,
gs_plugin_add_app (list, app);
return TRUE;
}
+
+/**
+ * gs_plugin_add_distro_upgrades:
+ */
+gboolean
+gs_plugin_add_distro_upgrades (GsPlugin *plugin,
+ GList **list,
+ GCancellable *cancellable,
+ GError **error)
+{
+ g_autoptr(GsApp) app = NULL;
+ app = gs_app_new ("org.fedoraproject.release-24.upgrade");
+ gs_app_set_kind (app, GS_APP_KIND_DISTRO_UPGRADE);
+ gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
+ gs_app_set_name (app, GS_APP_QUALITY_LOWEST, "Fedora");
+ gs_app_set_version (app, "24");
+ gs_plugin_add_app (list, app);
+ return TRUE;
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]