summaryrefslogtreecommitdiffstats
path: root/test/dbusdef.py
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2007-04-03 20:48:42 +0000
committerMarcel Holtmann <marcel@holtmann.org>2007-04-03 20:48:42 +0000
commitf89882a84a048cd676798e4a047a73fb202e246d (patch)
tree6619a963388e2f46b019d67cc0ac1e138fb82eb6 /test/dbusdef.py
parent0f09acbace55a146315d240d45132faf62ad45cf (diff)
Update test setup
Diffstat (limited to 'test/dbusdef.py')
-rw-r--r--test/dbusdef.py21
1 files changed, 15 insertions, 6 deletions
diff --git a/test/dbusdef.py b/test/dbusdef.py
index 62203993..97a0eb4d 100644
--- a/test/dbusdef.py
+++ b/test/dbusdef.py
@@ -7,15 +7,24 @@ dummy = dbus.Interface(bus.get_object('org.bluez', '/org/bluez'), 'org.freedeskt
#print dummy.Introspect()
+
manager = dbus.Interface(bus.get_object('org.bluez', '/org/bluez'), 'org.bluez.Manager')
database = dbus.Interface(bus.get_object('org.bluez', '/org/bluez'), 'org.bluez.Database')
-adapter = dbus.Interface(bus.get_object('org.bluez', manager.DefaultAdapter()), 'org.bluez.Adapter')
-test = dbus.Interface(bus.get_object('org.bluez', manager.DefaultAdapter()), 'org.bluez.Test')
+try:
+ adapter = dbus.Interface(bus.get_object('org.bluez', manager.DefaultAdapter()), 'org.bluez.Adapter')
+
+ test = dbus.Interface(bus.get_object('org.bluez', manager.DefaultAdapter()), 'org.bluez.Test')
+
+ rfcomm = dbus.Interface(bus.get_object('org.bluez', manager.DefaultAdapter()), 'org.bluez.RFCOMM')
+except:
+ adapter = ""
+
+ test = ""
-rfcomm = dbus.Interface(bus.get_object('org.bluez', manager.DefaultAdapter()), 'org.bluez.RFCOMM')
+ rfcomm = ""
def create_service(identifier):
@@ -40,11 +49,11 @@ audio = create_service("audio")
headset = create_service("headset")
-def connect_transfer():
+def connect_headset():
try:
- conn = manager.ActivateService("transfer")
+ conn = manager.ActivateService("headset")
except:
conn = ""
if (conn != ""):
- return dbus.Interface(bus.get_object(conn, "/org/bluez/transfer"), 'org.bluez.transfer.Manager')
+ return dbus.Interface(bus.get_object(conn, "/org/bluez/audio"), 'org.bluez.audio.Manager')