summaryrefslogtreecommitdiffstats
path: root/audio/test-audio
blob: 19ea62529e53b1947d7400e85999cb69bba57712 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/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

try:
	device = dbus.Interface(bus.get_object(conn, audio.DefaultDevice()),
						'org.bluez.audio.Device')
	sink = dbus.Interface(bus.get_object(conn, audio.DefaultDevice()),
						'org.bluez.audio.Sink')
except:
	pass