mirror of git://git.sysmocom.de/ofono
22 lines
456 B
Python
Executable File
22 lines
456 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.Import(timeout=100)
|