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

import gobject

import dbus

if __name__ == "__main__":
	bus = dbus.SystemBus()

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

	try:
		modems = manager.GetProperties()['Modems']
	except dbus.DBusException, e:
		print "Unable to get the Modems property %s" % e

	phonebook = dbus.Interface(bus.get_object('org.ofono', modems[0]),
				'org.ofono.Phonebook')

	print phonebook.Import()