linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 01/10] profile: Add support for experimental flag
@ 2023-05-16 20:59 Luiz Augusto von Dentz
  2023-05-16 20:59 ` [PATCH v2 02/10] bap: Mark driver as experimental Luiz Augusto von Dentz
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: Luiz Augusto von Dentz @ 2023-05-16 20:59 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

This adds experimental field to btd_profile so the plugin can indicate
drivers that depends on experimental to be enabled.
---
 src/profile.c | 6 ++++++
 src/profile.h | 5 +++++
 2 files changed, 11 insertions(+)

diff --git a/src/profile.c b/src/profile.c
index e1bebf1ee19c..ea188f36b6dd 100644
--- a/src/profile.c
+++ b/src/profile.c
@@ -775,6 +775,12 @@ static struct btd_profile *btd_profile_find_uuid(const char *uuid)
 
 int btd_profile_register(struct btd_profile *profile)
 {
+	if (profile->experimental && !(g_dbus_get_flags() &
+					G_DBUS_FLAG_ENABLE_EXPERIMENTAL)) {
+		DBG("D-Bus experimental not enabled");
+		return -ENOTSUP;
+	}
+
 	profiles = g_slist_append(profiles, profile);
 	return 0;
 }
diff --git a/src/profile.h b/src/profile.h
index 6827f848148c..6871f2f0d7d8 100644
--- a/src/profile.h
+++ b/src/profile.h
@@ -28,6 +28,11 @@ struct btd_profile {
 	 */
 	bool external;
 
+	/* Indicates the profile is experimental and shall only be registered
+	 * when experimental has been enabled (see: main.conf:Experimental).
+	 */
+	bool experimental;
+
 	int (*device_probe) (struct btd_service *service);
 	void (*device_remove) (struct btd_service *service);
 
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2023-05-17 19:50 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-16 20:59 [PATCH v2 01/10] profile: Add support for experimental flag Luiz Augusto von Dentz
2023-05-16 20:59 ` [PATCH v2 02/10] bap: Mark driver as experimental Luiz Augusto von Dentz
2023-05-16 20:59 ` [PATCH v2 03/10] bass: " Luiz Augusto von Dentz
2023-05-16 20:59 ` [PATCH v2 04/10] csip: " Luiz Augusto von Dentz
2023-05-16 20:59 ` [PATCH v2 05/10] mcp: " Luiz Augusto von Dentz
2023-05-16 20:59 ` [PATCH v2 06/10] vcp: " Luiz Augusto von Dentz
2023-05-16 20:59 ` [PATCH v2 07/10] plugin: Treat -ENOTSUP as -ENOSYS Luiz Augusto von Dentz
2023-05-16 20:59 ` [PATCH v2 08/10] adapter: Add support for experimental flag Luiz Augusto von Dentz
2023-05-16 20:59 ` [PATCH v2 09/10] admin: Mark driver as experimental Luiz Augusto von Dentz
2023-05-16 20:59 ` [PATCH v2 10/10] main: Rework config option parsing Luiz Augusto von Dentz
2023-05-17  1:33 ` [v2,01/10] profile: Add support for experimental flag bluez.test.bot
2023-05-17 19:50 ` [PATCH v2 01/10] " patchwork-bot+bluetooth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).