blob: 5c39afe363f867624c29d900aa6d295a1c42463c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#!/usr/bin/python
import gobject
import dbus
import dbus.mainloop.glib
if __name__ == "__main__":
dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
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()
mainloop = gobject.MainLoop()
mainloop.run()
|