diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2007-06-11 07:42:56 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2007-06-11 07:42:56 +0000 |
commit | 82a2b31aea724dd0a051e9cda3fb51e018e8b606 (patch) | |
tree | 984f1718e9a5fc7973be8e1669b1aedd55363ec5 /audio | |
parent | abae7c2638fb280393750d2a7789b0fc8188c644 (diff) |
Add audio service test script
Diffstat (limited to 'audio')
-rw-r--r-- | audio/Makefile.am | 2 | ||||
-rwxr-xr-x | audio/test-audio | 19 |
2 files changed, 20 insertions, 1 deletions
diff --git a/audio/Makefile.am b/audio/Makefile.am index 2285ed7f..731acb3a 100644 --- a/audio/Makefile.am +++ b/audio/Makefile.am @@ -35,6 +35,6 @@ AM_CFLAGS = @BLUEZ_CFLAGS@ @DBUS_CFLAGS@ @GLIB_CFLAGS@ @ALSA_CFLAGS@ @SBC_CFLAGS INCLUDES = -I$(top_srcdir)/common -EXTRA_DIST = audio.service audio.conf audio-api.txt asound.conf +EXTRA_DIST = audio.service audio.conf audio-api.txt test-audio asound.conf MAINTAINERCLEANFILES = Makefile.in diff --git a/audio/test-audio b/audio/test-audio new file mode 100755 index 00000000..5553f0a5 --- /dev/null +++ b/audio/test-audio @@ -0,0 +1,19 @@ +#!/usr/bin/python + +import dbus + +bus = dbus.SystemBus() + +manager = dbus.Interface(bus.get_object('org.bluez', '/org/bluez'), + 'org.bluez.Manager') + +conn = manager.ActivateService('audio') + +audio = dbus.Interface(bus.get_object(conn, '/org/bluez/audio'), + 'org.bluez.audio.Manager') + +try: + headset = dbus.Interface(bus.get_object(conn, audio.DefaultHeadset()), + 'org.bluez.audio.Headset') +except: + pass |