[gnome-software] trivial: Export gs_plugin_status_to_string()
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] trivial: Export gs_plugin_status_to_string()
- Date: Mon, 11 Mar 2013 20:11:11 +0000 (UTC)
commit 69663296551f8165bbbee65ca7bc1dcab78fc700
Author: Richard Hughes <richard hughsie com>
Date: Mon Mar 11 13:46:16 2013 +0000
trivial: Export gs_plugin_status_to_string()
src/gs-plugin-loader.c | 21 +--------------------
src/gs-plugin.c | 19 +++++++++++++++++++
src/gs-plugin.h | 1 +
3 files changed, 21 insertions(+), 20 deletions(-)
---
diff --git a/src/gs-plugin-loader.c b/src/gs-plugin-loader.c
index fdf4a60..0c4d926 100644
--- a/src/gs-plugin-loader.c
+++ b/src/gs-plugin-loader.c
@@ -836,25 +836,6 @@ gs_plugin_loader_set_enabled (GsPluginLoader *plugin_loader,
}
/**
- * gs_plugin_loader_status_to_string:
- */
-static const gchar *
-gs_plugin_loader_status_to_string (GsPluginStatus status)
-{
- if (status == GS_PLUGIN_STATUS_WAITING)
- return "waiting";
- if (status == GS_PLUGIN_STATUS_FINISHED)
- return "finished";
- if (status == GS_PLUGIN_STATUS_SETUP)
- return "setup";
- if (status == GS_PLUGIN_STATUS_DOWNLOADING)
- return "downloading";
- if (status == GS_PLUGIN_STATUS_QUERYING)
- return "querying";
- return "unknown";
-}
-
-/**
* gs_plugin_loader_status_update_cb:
*/
static void
@@ -871,7 +852,7 @@ gs_plugin_loader_status_update_cb (GsPlugin *plugin,
/* new, or an app, so emit */
g_debug ("emitting %s(%s)",
- gs_plugin_loader_status_to_string (status),
+ gs_plugin_status_to_string (status),
app != NULL ? gs_app_get_id (app) : "<general>");
plugin_loader->priv->status_last = status;
g_signal_emit (plugin_loader,
diff --git a/src/gs-plugin.c b/src/gs-plugin.c
index 4a97d42..a6434e2 100644
--- a/src/gs-plugin.c
+++ b/src/gs-plugin.c
@@ -26,6 +26,25 @@
#include "gs-plugin.h"
/**
+ * gs_plugin_status_to_string:
+ */
+const gchar *
+gs_plugin_status_to_string (GsPluginStatus status)
+{
+ if (status == GS_PLUGIN_STATUS_WAITING)
+ return "waiting";
+ if (status == GS_PLUGIN_STATUS_FINISHED)
+ return "finished";
+ if (status == GS_PLUGIN_STATUS_SETUP)
+ return "setup";
+ if (status == GS_PLUGIN_STATUS_DOWNLOADING)
+ return "downloading";
+ if (status == GS_PLUGIN_STATUS_QUERYING)
+ return "querying";
+ return "unknown";
+}
+
+/**
* gs_plugin_add_app:
**/
void
diff --git a/src/gs-plugin.h b/src/gs-plugin.h
index 7b34320..9d5234b 100644
--- a/src/gs-plugin.h
+++ b/src/gs-plugin.h
@@ -101,6 +101,7 @@ void gs_plugin_add_app (GList **list,
void gs_plugin_status_update (GsPlugin *plugin,
GsApp *app,
GsPluginStatus status);
+const gchar *gs_plugin_status_to_string (GsPluginStatus status);
gboolean gs_plugin_add_search (GsPlugin *plugin,
const gchar *value,
GList *list,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]