Blob Blame History Raw
From 8d5e7877c12c0ed4c2f23ba383dcf689e4f1b8ee Mon Sep 17 00:00:00 2001
From: Fedora Bluez maintainers <bluez-owner@fedoraproject.org>
Date: Tue, 17 May 2016 15:39:40 -0400
Subject: [PATCH 1/3] Remove experimental flag for BLE

Upstream says the BLE should be mostly stable by now.  Remove the flag
prematurely (for just the BLE pieces), so we can say we are supporting
this API in RHEL-7.3.
---
 src/adapter.c       |  4 ++--
 src/advertising.c   |  4 ++--
 src/device.c        |  8 ++++----
 src/gatt-client.c   | 36 +++++++++++++++++++-----------------
 src/gatt-database.c |  4 ++--
 5 files changed, 29 insertions(+), 27 deletions(-)

diff --git a/src/adapter.c b/src/adapter.c
index f4fbf82..e166b25 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -7450,7 +7450,7 @@ static int adapter_register(struct btd_adapter *adapter)
 		return -EINVAL;
 	}
 
-	if (g_dbus_get_flags() & G_DBUS_FLAG_ENABLE_EXPERIMENTAL) {
+	//if (g_dbus_get_flags() & G_DBUS_FLAG_ENABLE_EXPERIMENTAL) {
 		/* Don't start advertising managers on non-LE controllers. */
 		if (adapter->supported_settings & MGMT_SETTING_LE) {
 			adapter->adv_manager =
@@ -7459,7 +7459,7 @@ static int adapter_register(struct btd_adapter *adapter)
 			btd_info(adapter->dev_id,
 				"LEAdvertisingManager skipped, LE unavailable");
 		}
-	}
+	//}
 
 	db = btd_gatt_database_get_db(adapter->database);
 	adapter->db_id = gatt_db_register(db, services_modified,
diff --git a/src/advertising.c b/src/advertising.c
index d2019de..7200d3d 100644
--- a/src/advertising.c
+++ b/src/advertising.c
@@ -704,11 +704,11 @@ static DBusMessage *unregister_advertisement(DBusConnection *conn,
 }
 
 static const GDBusMethodTable methods[] = {
-	{ GDBUS_EXPERIMENTAL_ASYNC_METHOD("RegisterAdvertisement",
+	{ GDBUS_ASYNC_METHOD("RegisterAdvertisement",
 					GDBUS_ARGS({ "advertisement", "o" },
 							{ "options", "a{sv}" }),
 					NULL, register_advertisement) },
-	{ GDBUS_EXPERIMENTAL_ASYNC_METHOD("UnregisterAdvertisement",
+	{ GDBUS_ASYNC_METHOD("UnregisterAdvertisement",
 						GDBUS_ARGS({ "service", "o" }),
 						NULL,
 						unregister_advertisement) },
diff --git a/src/device.c b/src/device.c
index 83a794e..05020cb 100644
--- a/src/device.c
+++ b/src/device.c
@@ -2524,15 +2524,15 @@ static const GDBusPropertyTable device_properties[] = {
 	{ "Adapter", "o", dev_property_get_adapter },
 	{ "ManufacturerData", "a{qv}", dev_property_get_manufacturer_data,
 				NULL, dev_property_manufacturer_data_exist,
-				G_DBUS_PROPERTY_FLAG_EXPERIMENTAL },
+				},
 	{ "ServiceData", "a{sv}", dev_property_get_service_data,
 				NULL, dev_property_service_data_exist,
-				G_DBUS_PROPERTY_FLAG_EXPERIMENTAL },
+				},
 	{ "TxPower", "n", dev_property_get_tx_power, NULL,
 					dev_property_exists_tx_power,
-					G_DBUS_PROPERTY_FLAG_EXPERIMENTAL },
+					},
 	{ "ServicesResolved", "b", dev_property_get_svc_resolved, NULL, NULL,
-					G_DBUS_PROPERTY_FLAG_EXPERIMENTAL },
+					},
 
 	{ }
 };
diff --git a/src/gatt-client.c b/src/gatt-client.c
index 0cbacca..8c6441b 100644
--- a/src/gatt-client.c
+++ b/src/gatt-client.c
@@ -609,20 +609,20 @@ static DBusMessage *descriptor_write_value(DBusConnection *conn,
 
 static const GDBusPropertyTable descriptor_properties[] = {
 	{ "UUID", "s", descriptor_get_uuid, NULL, NULL,
-					G_DBUS_PROPERTY_FLAG_EXPERIMENTAL },
+					},
 	{ "Characteristic", "o", descriptor_get_characteristic, NULL, NULL,
-					G_DBUS_PROPERTY_FLAG_EXPERIMENTAL },
+					},
 	{ "Value", "ay", descriptor_get_value, NULL, descriptor_value_exists,
-					G_DBUS_PROPERTY_FLAG_EXPERIMENTAL },
+					},
 	{ }
 };
 
 static const GDBusMethodTable descriptor_methods[] = {
-	{ GDBUS_EXPERIMENTAL_ASYNC_METHOD("ReadValue",
+	{ GDBUS_ASYNC_METHOD("ReadValue",
 					GDBUS_ARGS({ "options", "a{sv}" }),
 					GDBUS_ARGS({ "value", "ay" }),
 					descriptor_read_value) },
-	{ GDBUS_EXPERIMENTAL_ASYNC_METHOD("WriteValue",
+	{ GDBUS_ASYNC_METHOD("WriteValue",
 					GDBUS_ARGS({ "value", "ay" },
 						{ "options", "a{sv}" }),
 					NULL,
@@ -1285,33 +1285,33 @@ static DBusMessage *characteristic_stop_notify(DBusConnection *conn,
 
 static const GDBusPropertyTable characteristic_properties[] = {
 	{ "UUID", "s", characteristic_get_uuid, NULL, NULL,
-					G_DBUS_PROPERTY_FLAG_EXPERIMENTAL },
+					},
 	{ "Service", "o", characteristic_get_service, NULL, NULL,
-					G_DBUS_PROPERTY_FLAG_EXPERIMENTAL },
+					},
 	{ "Value", "ay", characteristic_get_value, NULL,
 					characteristic_value_exists,
-					G_DBUS_PROPERTY_FLAG_EXPERIMENTAL },
+					},
 	{ "Notifying", "b", characteristic_get_notifying, NULL,
 					characteristic_notifying_exists,
-					G_DBUS_PROPERTY_FLAG_EXPERIMENTAL },
+					},
 	{ "Flags", "as", characteristic_get_flags, NULL, NULL,
-					G_DBUS_PROPERTY_FLAG_EXPERIMENTAL },
+					},
 	{ }
 };
 
 static const GDBusMethodTable characteristic_methods[] = {
-	{ GDBUS_EXPERIMENTAL_ASYNC_METHOD("ReadValue",
+	{ GDBUS_ASYNC_METHOD("ReadValue",
 					GDBUS_ARGS({ "options", "a{sv}" }),
 					GDBUS_ARGS({ "value", "ay" }),
 					characteristic_read_value) },
-	{ GDBUS_EXPERIMENTAL_ASYNC_METHOD("WriteValue",
+	{ GDBUS_ASYNC_METHOD("WriteValue",
 					GDBUS_ARGS({ "value", "ay" },
 						{ "options", "a{sv}" }),
 					NULL,
 					characteristic_write_value) },
-	{ GDBUS_EXPERIMENTAL_ASYNC_METHOD("StartNotify", NULL, NULL,
+	{ GDBUS_ASYNC_METHOD("StartNotify", NULL, NULL,
 					characteristic_start_notify) },
-	{ GDBUS_EXPERIMENTAL_METHOD("StopNotify", NULL, NULL,
+	{ GDBUS_METHOD("StopNotify", NULL, NULL,
 					characteristic_stop_notify) },
 	{ }
 };
@@ -1445,11 +1445,11 @@ static gboolean service_get_primary(const GDBusPropertyTable *property,
 
 static const GDBusPropertyTable service_properties[] = {
 	{ "UUID", "s", service_get_uuid, NULL, NULL,
-					G_DBUS_PROPERTY_FLAG_EXPERIMENTAL },
+					},
 	{ "Device", "o", service_get_device, NULL, NULL,
-					G_DBUS_PROPERTY_FLAG_EXPERIMENTAL },
+					},
 	{ "Primary", "b", service_get_primary, NULL, NULL,
-					G_DBUS_PROPERTY_FLAG_EXPERIMENTAL },
+					},
 	{ }
 };
 
@@ -1618,10 +1618,12 @@ static void export_service(struct gatt_db_attribute *attr, void *user_data)
 static void create_services(struct btd_gatt_client *client)
 {
 	/* Don't attempt to create any objects if experimental is disabled */
+	/*
 	if (!(g_dbus_get_flags() & G_DBUS_FLAG_ENABLE_EXPERIMENTAL)) {
 		info("GATT service objects disabled");
 		return;
 	}
+	*/
 
 	DBG("Exporting objects for GATT services: %s", client->devaddr);
 
diff --git a/src/gatt-database.c b/src/gatt-database.c
index e287b98..87b4f56 100644
--- a/src/gatt-database.c
+++ b/src/gatt-database.c
@@ -2578,11 +2578,11 @@ static DBusMessage *manager_unregister_app(DBusConnection *conn,
 }
 
 static const GDBusMethodTable manager_methods[] = {
-	{ GDBUS_EXPERIMENTAL_ASYNC_METHOD("RegisterApplication",
+	{ GDBUS_ASYNC_METHOD("RegisterApplication",
 			GDBUS_ARGS({ "application", "o" },
 			{ "options", "a{sv}" }), NULL,
 			manager_register_app) },
-	{ GDBUS_EXPERIMENTAL_ASYNC_METHOD("UnregisterApplication",
+	{ GDBUS_ASYNC_METHOD("UnregisterApplication",
 					GDBUS_ARGS({ "application", "o" }),
 					NULL, manager_unregister_app) },
 	{ }
-- 
1.8.4