mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-17 17:24:32 +08:00
Add simple D-Bus preload script for Python
This commit is contained in:
parent
cf1c6fe16b
commit
b31cef173e
@ -33,6 +33,6 @@ endif
|
||||
|
||||
INCLUDES = -I$(top_srcdir)/common
|
||||
|
||||
EXTRA_DIST = apitest hsplay hsmicro bdaddr.8
|
||||
EXTRA_DIST = apitest hsplay hsmicro bdaddr.8 dbusdef.py
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
7
test/dbusdef.py
Normal file
7
test/dbusdef.py
Normal file
@ -0,0 +1,7 @@
|
||||
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')
|
Loading…
Reference in New Issue
Block a user