[PATCH BlueZ 1/2] battery: mark all battery DBus APIs non-experimental

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

 



Remove experimental marker from BatteryProvider1 and Battery1.Source.

It's common that headsets send battery information via HFP, and often
this is also the only way to get it. Pipewire/pulseaudio manage HFP,
parse the battery commands, and use the BatteryProvider API if present
to forward it. No problems with the API appeared here, and it's been
experimental for a few years, so it's useful to enable it by default
now.
---
 src/adapter.c | 6 ++----
 src/battery.c | 7 +++----
 2 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/src/adapter.c b/src/adapter.c
index 8c267d418..6c539a81e 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -9286,10 +9286,8 @@ static int adapter_register(struct btd_adapter *adapter)
 		agent_unref(agent);
 	}
 
-	if (g_dbus_get_flags() & G_DBUS_FLAG_ENABLE_EXPERIMENTAL) {
-		adapter->battery_provider_manager =
-			btd_battery_provider_manager_create(adapter);
-	}
+	adapter->battery_provider_manager =
+		btd_battery_provider_manager_create(adapter);
 
 	/* Don't start GATT database and advertising managers on
 	 * non-LE controllers.
diff --git a/src/battery.c b/src/battery.c
index 5c52581f3..59e4fc570 100644
--- a/src/battery.c
+++ b/src/battery.c
@@ -152,8 +152,7 @@ static gboolean property_source_exists(const GDBusPropertyTable *property,
 static const GDBusPropertyTable battery_properties[] = {
 	{ "Percentage", "y", property_percentage_get, NULL,
 	  property_percentage_exists },
-	{ "Source", "s", property_source_get, NULL, property_source_exists,
-	  G_DBUS_PROPERTY_FLAG_EXPERIMENTAL },
+	{ "Source", "s", property_source_get, NULL, property_source_exists },
 	{}
 };
 
@@ -523,10 +522,10 @@ static DBusMessage *unregister_battery_provider(DBusConnection *conn,
 }
 
 static const GDBusMethodTable methods[] = {
-	{ GDBUS_EXPERIMENTAL_METHOD("RegisterBatteryProvider",
+	{ GDBUS_METHOD("RegisterBatteryProvider",
 				    GDBUS_ARGS({ "provider", "o" }), NULL,
 				    register_battery_provider) },
-	{ GDBUS_EXPERIMENTAL_METHOD("UnregisterBatteryProvider",
+	{ GDBUS_METHOD("UnregisterBatteryProvider",
 				    GDBUS_ARGS({ "provider", "o" }), NULL,
 				    unregister_battery_provider) },
 	{}
-- 
2.41.0




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux