summaryrefslogtreecommitdiff
path: root/test/stop-poll
blob: 5ef2ef926fbc5d1526594077bf35a927041aeeea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/python

import sys
import dbus

if len(sys.argv) < 2:
	print "Usage: %s <nfc device>" % (sys.argv[0])
	sys.exit(1)

bus = dbus.SystemBus()

manager = dbus.Interface(bus.get_object("org.neard", "/"),
					"org.neard.Manager")


path = "/org/neard/" + sys.argv[1]
adapter = dbus.Interface(bus.get_object("org.neard", path),
					"org.neard.Adapter")

try:
	adapter.StopPollLoop()
except dbus.DBusException, error:
	print "%s: %s" % (error._dbus_error_name, error.message)