summaryrefslogtreecommitdiffstats
path: root/test/dbusdef.py
blob: f039cd4b6299639758a93735dec090be91552073 (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
28
import dbus

bus = dbus.SystemBus()

manager = dbus.Interface(bus.get_object('org.bluez', '/org/bluez'), 'org.bluez.Manager')

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')

sdp = dbus.Interface(bus.get_object('org.bluez', manager.DefaultAdapter()), 'org.bluez.SDP')

echo = dbus.Interface(bus.get_object('org.bluez', '/org/bluez/echo'), 'org.bluez.Service')

network = dbus.Interface(bus.get_object('org.bluez', '/org/bluez/network'), 'org.bluez.Service')

input = dbus.Interface(bus.get_object('org.bluez', '/org/bluez/input'), 'org.bluez.Service')

audio = dbus.Interface(bus.get_object('org.bluez', '/org/bluez/audio'), 'org.bluez.Service')

def connect_echo() :
	return dbus.Interface(bus.get_object(echo.GetConnectionName(), '/org/bluez/echo'), 'org.freedesktop.DBus.Introspectable')

def connect_holtmann() :
	holtmann = dbus.Interface(bus.get_object('org.bluez', '/org/holtmann'), 'org.bluez.Service')
	return dbus.Interface(bus.get_object(holtmann.GetConnectionName(), '/org/holtmann'), 'org.freedesktop.DBus.Introspectable')