[RFC BlueZ v2 07/13] dbus: Add UUID property to org.bluez.Service1

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

 



From: Mikel Astiz <mikel.astiz@xxxxxxxxxxxx>

Expose in D-Bus the remote UUID corresponding to each service instance.
---
 src/service.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/src/service.c b/src/service.c
index 3882b60..a04ff3f 100644
--- a/src/service.c
+++ b/src/service.c
@@ -363,8 +363,20 @@ static gboolean service_get_device(const GDBusPropertyTable *property,
 	return TRUE;
 }
 
+static gboolean service_get_uuid(const GDBusPropertyTable *property,
+					DBusMessageIter *iter, void *data)
+{
+	struct btd_service *service = data;
+
+	dbus_message_iter_append_basic(iter, DBUS_TYPE_STRING,
+						&service->profile->remote_uuid);
+
+	return TRUE;
+}
+
 static const GDBusPropertyTable service_properties[] = {
 	{ "Device", "o", service_get_device },
+	{ "UUID", "s", service_get_uuid },
 	{ }
 };
 
-- 
1.8.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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