diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2008-11-30 20:01:45 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2008-11-30 20:01:45 +0100 |
commit | 48fc33be592e27e632958a58de99356494a4e511 (patch) | |
tree | 0e145a0fec839357977401e37fd5d4035fc61d27 /test | |
parent | 26e5560e929d75274e904da7af5152c6a725fd87 (diff) |
Remove old 3.x API cruft
Diffstat (limited to 'test')
-rw-r--r-- | test/dbusdef.py | 49 |
1 files changed, 3 insertions, 46 deletions
diff --git a/test/dbusdef.py b/test/dbusdef.py index ca6debf4..5af61535 100644 --- a/test/dbusdef.py +++ b/test/dbusdef.py @@ -3,57 +3,14 @@ import dbus bus = dbus.SystemBus() -dummy = dbus.Interface(bus.get_object('org.bluez', '/org/bluez'), 'org.freedesktop.DBus.Introspectable') +dummy = dbus.Interface(bus.get_object('org.bluez', '/'), 'org.freedesktop.DBus.Introspectable') #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') - +manager = dbus.Interface(bus.get_object('org.bluez', '/'), 'org.bluez.Manager') 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 = "" - - -def create_service(identifier): - try: - path = manager.FindService(identifier) - except: - path = "" - - if (path != ""): - return dbus.Interface(bus.get_object('org.bluez', path), 'org.bluez.Service') - -echo = create_service("echo") - -transfer = create_service("transfer") - -network = create_service("network") - -input = create_service("input") - -audio = create_service("audio") - -headset = create_service("headset") - - -def connect_service(identifier): - try: - conn = manager.ActivateService(identifier) - except: - conn = "" - - if (conn != ""): - return dbus.Interface(bus.get_object(conn, "/org/bluez/" + identifier), 'org.bluez.' + identifier + '.Manager') + pass |