[gnome-software: 1/14] gs-plugin: Add list_installed_apps_{async, finish}() vfuncs




commit cc0356039c847be906b5b05f2c55fdf1fd6f28b4
Author: Philip Withnall <pwithnall endlessos org>
Date:   Thu Dec 9 14:36:14 2021 +0000

    gs-plugin: Add list_installed_apps_{async,finish}() vfuncs
    
    These will eventually replace the `gs_plugin_add_installed()` function.
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>
    
    Helps: #1472

 lib/gs-plugin.h | 13 +++++++++++++
 1 file changed, 13 insertions(+)
---
diff --git a/lib/gs-plugin.h b/lib/gs-plugin.h
index 077a1d74a..b3cd98c56 100644
--- a/lib/gs-plugin.h
+++ b/lib/gs-plugin.h
@@ -51,6 +51,11 @@ G_DECLARE_DERIVABLE_TYPE (GsPlugin, gs_plugin, GS, PLUGIN, GObject)
  *   batched by the plugin where possible.
  * @refine_finish: (nullable): Finish method for @refine_async. Must be
  *   implemented if @refine_async is implemented.
+ * @list_installed_apps_async: (nullable): Get the list of installed apps
+ *   belonging to this plugin.
+ * @list_installed_apps_finish: (nullable): Finish method for
+ *   @list_installed_apps_async. Must be implemented if
+ *   @list_installed_apps_async is implemented.
  *
  * The class structure for a #GsPlugin. Virtual methods here should be
  * implemented by plugin implementations derived from #GsPlugin to provide their
@@ -107,6 +112,14 @@ struct _GsPluginClass
                                                         GAsyncResult           *result,
                                                         GError                 **error);
 
+       void                    (*list_installed_apps_async)    (GsPlugin               *plugin,
+                                                                GCancellable           *cancellable,
+                                                                GAsyncReadyCallback     callback,
+                                                                gpointer                user_data);
+       GsAppList *             (*list_installed_apps_finish)   (GsPlugin               *plugin,
+                                                                GAsyncResult           *result,
+                                                                GError                 **error);
+
        gpointer                 padding[23];
 };
 


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