[gnome-software] Add gs_plugin_add_source() vfunc



commit 0e9d470ca2bfc2f492b3cb9238f7312c92303288
Author: Richard Hughes <richard hughsie com>
Date:   Tue May 17 11:39:39 2016 +0100

    Add gs_plugin_add_source() vfunc
    
    This allows a plugin to add a source at runtime.

 src/gs-plugin-loader.c |    3 +++
 src/gs-plugin-loader.h |    1 +
 src/gs-plugin.h        |    4 ++++
 3 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-plugin-loader.c b/src/gs-plugin-loader.c
index c3a8d2b..6632ca3 100644
--- a/src/gs-plugin-loader.c
+++ b/src/gs-plugin-loader.c
@@ -2995,6 +2995,9 @@ gs_plugin_loader_app_action_async (GsPluginLoader *plugin_loader,
        case GS_PLUGIN_LOADER_ACTION_REMOVE_SHORTCUT:
                state->function_name = "gs_plugin_remove_shortcut";
                break;
+       case GS_PLUGIN_LOADER_ACTION_ADD_SOURCE:
+               state->function_name = "gs_plugin_add_source";
+               break;
        default:
                g_assert_not_reached ();
                break;
diff --git a/src/gs-plugin-loader.h b/src/gs-plugin-loader.h
index 7f656bd..7586ca7 100644
--- a/src/gs-plugin-loader.h
+++ b/src/gs-plugin-loader.h
@@ -63,6 +63,7 @@ typedef enum {
        GS_PLUGIN_LOADER_ACTION_UPDATE_CANCEL,
        GS_PLUGIN_LOADER_ACTION_ADD_SHORTCUT,
        GS_PLUGIN_LOADER_ACTION_REMOVE_SHORTCUT,
+       GS_PLUGIN_LOADER_ACTION_ADD_SOURCE,
        GS_PLUGIN_LOADER_ACTION_LAST
 } GsPluginLoaderAction;
 
diff --git a/src/gs-plugin.h b/src/gs-plugin.h
index 6e78451..49d12d0 100644
--- a/src/gs-plugin.h
+++ b/src/gs-plugin.h
@@ -352,6 +352,10 @@ gboolean    gs_plugin_update_app                   (GsPlugin       *plugin,
                                                         GsApp          *app,
                                                         GCancellable   *cancellable,
                                                         GError         **error);
+gboolean        gs_plugin_add_source                   (GsPlugin       *plugin,
+                                                        GsApp          *app,
+                                                        GCancellable   *cancellable,
+                                                        GError         **error);
 gboolean        gs_plugin_app_upgrade_download         (GsPlugin       *plugin,
                                                         GsApp          *app,
                                                         GCancellable   *cancellable,


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