[gnome-software: 8/24] gs-plugin-loader: Expose filter function publicly
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software: 8/24] gs-plugin-loader: Expose filter function publicly
- Date: Tue, 3 May 2022 12:52:06 +0000 (UTC)
commit 34a2d567d459ebcb997b3096f4765d44f8530650
Author: Philip Withnall <pwithnall endlessos org>
Date: Mon Apr 11 16:12:25 2022 +0100
gs-plugin-loader: Expose filter function publicly
This will be used by `GsPluginLoaderJobListApps` in a following commit.
Signed-off-by: Philip Withnall <pwithnall endlessos org>
Helps: #1472
lib/gs-plugin-loader.c | 15 ++++++++++++---
lib/gs-plugin-loader.h | 2 ++
2 files changed, 14 insertions(+), 3 deletions(-)
---
diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c
index eabef4d28..b8c274e7f 100644
--- a/lib/gs-plugin-loader.c
+++ b/lib/gs-plugin-loader.c
@@ -1094,10 +1094,10 @@ gs_plugin_loader_app_is_desktop (GsApp *app, gpointer user_data)
return gs_app_get_kind (app) == AS_COMPONENT_KIND_DESKTOP_APP;
}
-static gboolean
-gs_plugin_loader_get_app_is_compatible (GsApp *app, gpointer user_data)
+gboolean
+gs_plugin_loader_app_is_compatible (GsPluginLoader *plugin_loader,
+ GsApp *app)
{
- GsPluginLoader *plugin_loader = GS_PLUGIN_LOADER (user_data);
const gchar *tmp;
guint i;
@@ -1114,6 +1114,15 @@ gs_plugin_loader_get_app_is_compatible (GsApp *app, gpointer user_data)
return FALSE;
}
+static gboolean
+gs_plugin_loader_get_app_is_compatible (GsApp *app,
+ gpointer user_data)
+{
+ GsPluginLoader *plugin_loader = GS_PLUGIN_LOADER (user_data);
+
+ return gs_plugin_loader_app_is_compatible (plugin_loader, app);
+}
+
/******************************************************************************/
static gboolean
diff --git a/lib/gs-plugin-loader.h b/lib/gs-plugin-loader.h
index 2fbda9a1e..0d2035bfd 100644
--- a/lib/gs-plugin-loader.h
+++ b/lib/gs-plugin-loader.h
@@ -120,6 +120,8 @@ void gs_plugin_loader_claim_job_error (GsPluginLoader
*plugin_loader,
gboolean gs_plugin_loader_app_is_valid (GsApp *app,
GsPluginRefineFlags flags);
+gboolean gs_plugin_loader_app_is_compatible (GsPluginLoader *plugin_loader,
+ GsApp *app);
void gs_plugin_loader_run_adopt (GsPluginLoader *plugin_loader,
GsAppList *list);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]