[PATCH BlueZ 10/13] proximity: Append version to Proximity interfaces

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

 



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

---
 doc/proximity-api.txt         |  4 ++--
 profiles/proximity/monitor.c  |  2 +-
 profiles/proximity/reporter.h |  2 +-
 test/test-proximity           | 15 +++++++++------
 4 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/doc/proximity-api.txt b/doc/proximity-api.txt
index b68a4fe..4719428 100644
--- a/doc/proximity-api.txt
+++ b/doc/proximity-api.txt
@@ -8,7 +8,7 @@ Proximity Monitor hierarchy
 ===========================
 
 Service		org.bluez
-Interface	org.bluez.ProximityMonitor
+Interface	org.bluez.ProximityMonitor1
 Object path	[variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX
 
 Properties	string SignalLevel [readonly]
@@ -40,7 +40,7 @@ Shared service used by Proximity Path Loss and Find Me. Allows per device
 alert level handling.
 
 Service		org.bluez
-Interface	org.bluez.ProximityReporter
+Interface	org.bluez.ProximityReporter1
 Object path	[variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX
 
 Properties	string ImmediateAlertLevel [readonly]
diff --git a/profiles/proximity/monitor.c b/profiles/proximity/monitor.c
index 023de72..d9ed3ff 100644
--- a/profiles/proximity/monitor.c
+++ b/profiles/proximity/monitor.c
@@ -50,7 +50,7 @@
 #include "monitor.h"
 #include "textfile.h"
 
-#define PROXIMITY_INTERFACE "org.bluez.ProximityMonitor"
+#define PROXIMITY_INTERFACE "org.bluez.ProximityMonitor1"
 
 #define ALERT_LEVEL_CHR_UUID 0x2A06
 #define POWER_LEVEL_CHR_UUID 0x2A07
diff --git a/profiles/proximity/reporter.h b/profiles/proximity/reporter.h
index 480c668..6a7066d 100644
--- a/profiles/proximity/reporter.h
+++ b/profiles/proximity/reporter.h
@@ -22,7 +22,7 @@
  *
  */
 
-#define PROXIMITY_REPORTER_INTERFACE "org.bluez.ProximityReporter"
+#define PROXIMITY_REPORTER_INTERFACE "org.bluez.ProximityReporter1"
 
 #define IMMEDIATE_ALERT_SVC_UUID	0x1802
 #define LINK_LOSS_SVC_UUID		0x1803
diff --git a/test/test-proximity b/test/test-proximity
index d6862de..0cbf315 100755
--- a/test/test-proximity
+++ b/test/test-proximity
@@ -14,8 +14,11 @@ import dbus.mainloop.glib
 from optparse import OptionParser, make_option
 import bluezutils
 
+BUS_NAME = 'org.bluez'
+PROXIMITY_MONITOR_INTERFACE = 'org.bluez.ProxymityMonitor1'
+
 def properties_changed(interface, changed, invalidated):
-	if interface != "org.bluez.ProximityMonitor":
+	if interface != PROXIMITY_MONITOR_INTERFACE:
 		return
 
 	for name, value in changed.iteritems():
@@ -45,19 +48,19 @@ if __name__ == "__main__":
 	device = bluezutils.find_device(options.address, options.dev_id)
 	device_path = device.object_path
 
-	bus.add_signal_receiver(properties_changed, bus_name="org.bluez",
+	bus.add_signal_receiver(properties_changed, bus_name=BUS_NAME,
 			path=device_path,
 			dbus_interface="org.freedesktop.DBus.Properties",
 			signal_name="PropertiesChanged")
 
-	proximity = dbus.Interface(bus.get_object("org.bluez",
-					device_path), "org.bluez.ProximityMonitor")
+	proximity = dbus.Interface(bus.get_object(BUS_NAME, device_path),
+						PROXIMITY_MONITOR_INTERFACE)
 
-	device_prop = dbus.Interface(bus.get_object("org.bluez", device_path),
+	device_prop = dbus.Interface(bus.get_object(BUS_NAME, device_path),
 					"org.freedesktop.DBus.Properties")
 
 	print("Proximity SetProperty('%s', '%s')" % (args[0], args[1]))
-	device_prop.Set("org.bluez.ProximityMonitor", args[0], args[1])
+	device_prop.Set(PROXIMITY_MONITOR_INTERFACE, args[0], args[1])
 
 	mainloop = gobject.MainLoop()
 	mainloop.run()
-- 
1.7.11.7

--
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