diff --git a/doc/adapter-api.txt b/doc/adapter-api.txt
index 983a20d..cf8374d 100644
--- a/doc/adapter-api.txt
+++ b/doc/adapter-api.txt
device discovery.
The dictionary contains the properties from the
- org.bluez.Device interface.
+ org.bluez.Device1 interface.
Properties string Address [readonly]
diff --git a/doc/device-api.txt b/doc/device-api.txt
index c1f2361..36ea1d9 100644
--- a/doc/device-api.txt
+++ b/doc/device-api.txt
================
Service org.bluez
-Interface org.bluez.Device
+Interface org.bluez.Device1
Object path [variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX
Methods dict DiscoverServices(string pattern)
diff --git a/profiles/cups/main.c b/profiles/cups/main.c
index 977c057..ae0cc6a 100644
--- a/profiles/cups/main.c
+++ b/profiles/cups/main.c
/* Look for the service handle of the HCRP service */
message = dbus_message_new_method_call("org.bluez", device,
- "org.bluez.Device",
+ "org.bluez.Device1",
"DiscoverServices");
dbus_message_iter_init_append(message, &iter);
dbus_message_iter_append_basic(&iter, DBUS_TYPE_STRING, &hcr_print);
gboolean retval;
message = dbus_message_new_method_call("org.bluez", device_path,
- "org.bluez.Device",
+ "org.bluez.Device1",
"GetProperties");
reply = dbus_connection_send_with_reply_and_block(conn,
diff --git a/src/device.h b/src/device.h
index 1d7f54f..cb0bb50 100644
--- a/src/device.h
+++ b/src/device.h
*
*/
-#define DEVICE_INTERFACE "org.bluez.Device"
+#define DEVICE_INTERFACE "org.bluez.Device1"
struct btd_device;
diff --git a/test/bluezutils.py b/test/bluezutils.py
index 70fe01b..803805b 100644
--- a/test/bluezutils.py
+++ b/test/bluezutils.py
SERVICE_NAME = "org.bluez"
ADAPTER_INTERFACE = SERVICE_NAME + ".Adapter"
-DEVICE_INTERFACE = SERVICE_NAME + ".Device"
+DEVICE_INTERFACE = SERVICE_NAME + ".Device1"
def get_managed_objects():
bus = dbus.SystemBus()
diff --git a/test/list-devices b/test/list-devices
index e8f3f24..7e56239 100755
--- a/test/list-devices
+++ b/test/list-devices
objects = manager.GetManagedObjects()
all_devices = (str(path) for path, interfaces in objects.iteritems() if
- "org.bluez.Device" in interfaces.keys())
+ "org.bluez.Device1" in interfaces.keys())
for path, interfaces in objects.iteritems():
if "org.bluez.Adapter" not in interfaces.keys():
print(" [ " + dev_path + " ]")
dev = objects[dev_path]
- properties = dev["org.bluez.Device"]
+ properties = dev["org.bluez.Device1"]
for key in properties.keys():
value = properties[key]
diff --git a/test/monitor-bluetooth b/test/monitor-bluetooth
index 45cc910..cfda322 100755
--- a/test/monitor-bluetooth
+++ b/test/monitor-bluetooth
import dbus
import dbus.mainloop.glib
-relevant_ifaces = [ "org.bluez.Adapter", "org.bluez.Device" ]
+relevant_ifaces = [ "org.bluez.Adapter", "org.bluez.Device1" ]
def property_changed(interface, changed, invalidated, path):
iface = interface[interface.rfind(".") + 1:]
diff --git a/test/simple-agent b/test/simple-agent
index 3c51530..15f2a32 100755
--- a/test/simple-agent
+++ b/test/simple-agent
def set_trusted(path):
props = dbus.Interface(bus.get_object("org.bluez", path),
"org.freedesktop.DBus.Properties")
- props.Set("org.bluez.Device", "Trusted", True)
+ props.Set("org.bluez.Device1", "Trusted", True)
def dev_connect(path):
dev = dbus.Interface(bus.get_object("org.bluez", path),
- "org.bluez.Device")
+ "org.bluez.Device1")
dev.Connect()
class Rejected(dbus.DBusException):
diff --git a/test/test-attrib b/test/test-attrib
index 2b0b010..aadffaa 100755
--- a/test/test-attrib
+++ b/test/test-attrib
adapter = bluezutils.find_adapter(options.dev_id)
for path in adapter.GetProperties()["Devices"]:
device = dbus.Interface(bus.get_object("org.bluez", path),
- "org.bluez.Device")
+ "org.bluez.Device1")
devprop = device.GetProperties()
print("[ %s ]" % devprop["Address"])
for path in devprop["Services"]:
diff --git a/test/test-device b/test/test-device
index d40d656..655eeae 100755
--- a/test/test-device
+++ b/test/test-device
objects = om.GetManagedObjects()
for path, interfaces in objects.iteritems():
- if "org.bluez.Device" not in interfaces:
+ if "org.bluez.Device1" not in interfaces:
continue
- properties = interfaces["org.bluez.Device"]
+ properties = interfaces["org.bluez.Device1"]
if properties["Adapter"] != adapter_path:
continue;
print("%s %s" % (properties["Address"], properties["Alias"]))
device = bluezutils.find_device(args[1], options.dev_id)
device = dbus.Interface(bus.get_object("org.bluez", path),
"org.freedesktop.DBus.Properties")
- cls = device.Get("org.bluez.Device", "Class")
+ cls = device.Get("org.bluez.Device1", "Class")
print("0x%06x" % cls)
sys.exit(0)
path = device.object_path
props = dbus.Interface(bus.get_object("org.bluez", path),
"org.freedesktop.DBus.Properties")
- name = props.Get("org.bluez.Device", "Name")
+ name = props.Get("org.bluez.Device1", "Name")
print(name)
sys.exit(0)
props = dbus.Interface(bus.get_object("org.bluez", path),
"org.freedesktop.DBus.Properties")
if (len(args) < 3):
- alias = device.Get("org.bluez.Device", "Alias")
+ alias = device.Get("org.bluez.Device1", "Alias")
print(alias)
else:
- device.Set("org.bluez.Device", "Alias", args[2])
+ device.Set("org.bluez.Device1", "Alias", args[2])
sys.exit(0)
if (args[0] == "trusted"):
props = dbus.Interface(bus.get_object("org.bluez", path),
"org.freedesktop.DBus.Properties")
if (len(args) < 3):
- trusted = device.Get("org.bluez.Device", "Trusted")
+ trusted = device.Get("org.bluez.Device1", "Trusted")
print(trusted)
else:
if (args[2] == "yes"):
value = dbus.Boolean(0)
else:
value = dbus.Boolean(args[2])
- device.Set("org.bluez.Device", "Trusted", value)
+ device.Set("org.bluez.Device1", "Trusted", value)
sys.exit(0)
if (args[0] == "blocked"):
props = dbus.Interface(bus.get_object("org.bluez", path),
"org.freedesktop.DBus.Properties")
if (len(args) < 3):
- blocked = device.Get("org.bluez.Device", "Blocked")
+ blocked = device.Get("org.bluez.Device1", "Blocked")
print(blocked)
else:
if (args[2] == "yes"):
value = dbus.Boolean(0)
else:
value = dbus.Boolean(args[2])
- device.Set("org.bluez.Device", "Blocked", value)
+ device.Set("org.bluez.Device1", "Blocked", value)
sys.exit(0)
if (args[0] == "services"):
path = device.object_path
props = dbus.Interface(bus.get_object("org.bluez", path),
"org.freedesktop.DBus.Properties")
- services = device.Get("org.bluez.Device", "Services")
+ services = device.Get("org.bluez.Device1", "Services")
for path in services:
print(path)
sys.exit(0)