[gnome-software/wip/hughsie/fwupd: 4/6] fwupd: Send our implemented feature set
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/hughsie/fwupd: 4/6] fwupd: Send our implemented feature set
- Date: Mon, 6 Jul 2020 15:00:00 +0000 (UTC)
commit 7235af2636698a5086467644503cb376ef4a950b
Author: Richard Hughes <richard hughsie com>
Date: Tue Jun 30 12:22:16 2020 +0100
fwupd: Send our implemented feature set
At the moment we just blindly assume the capabilities of the front-end client
when installing firmware. We can somewhat work around this limitation by
requiring a new enough fwupd daemon version, but the GUI client software may be
much older than the fwupd version or just incomplete.
Clients that do not register features are assumed to be dumb and won't be
offered firmware that has a hard requirement on showing text or screenshots.
plugins/fwupd/gs-plugin-fwupd.c | 10 ++++++++++
1 file changed, 10 insertions(+)
---
diff --git a/plugins/fwupd/gs-plugin-fwupd.c b/plugins/fwupd/gs-plugin-fwupd.c
index ae673c9c..9f5886c3 100644
--- a/plugins/fwupd/gs-plugin-fwupd.c
+++ b/plugins/fwupd/gs-plugin-fwupd.c
@@ -223,6 +223,16 @@ gs_plugin_setup (GsPlugin *plugin, GCancellable *cancellable, GError **error)
{
GsPluginData *priv = gs_plugin_get_data (plugin);
+#if FWUPD_CHECK_VERSION(1,4,5)
+ /* send our implemented feature set */
+ if (!fwupd_client_set_feature_flags (priv->client,
+ FWUPD_FEATURE_FLAG_DETACH_ACTION,
+ cancellable, error)) {
+ g_prefix_error (error, "Failed to set front-end features: ");
+ return FALSE;
+ }
+#endif
+
/* add source */
priv->cached_origin = gs_app_new (gs_plugin_get_name (plugin));
gs_app_set_kind (priv->cached_origin, AS_APP_KIND_SOURCE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]