ofono/test/test-phonebook

22 lines
452 B
Python
Executable File

#!/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.ExportEntries()