bluez/input/test-input

23 lines
447 B
Plaintext
Raw Normal View History

2007-05-09 15:09:58 +08:00
#!/usr/bin/python
import sys
import dbus
bus = dbus.SystemBus()
manager = dbus.Interface(bus.get_object('org.bluez', '/org/bluez'),
'org.bluez.Manager')
conn = manager.ActivateService('input')
input = dbus.Interface(bus.get_object(conn, '/org/bluez/input'),
'org.bluez.input.Manager')
if (len(sys.argv) < 1):
print "Usage: %s <address>" % (sys.argv[0])
sys.exit(1)
address = sys.argv[1]
device = input.CreateDevice(address)