7 import dbus.mainloop.glib
9 def property_changed(property, value):
10 if len(value.__str__()) > 0:
11 print "CF property %s changed to %s" % (property, value)
13 print "CF property %s changed to disabled" % (property)
18 if __name__ == "__main__":
20 print "Usage: %s <type>" % (sys.argv[0])
21 print "Type can be: all, conditional"
28 dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
30 bus = dbus.SystemBus()
32 manager = dbus.Interface(bus.get_object('org.ofono', '/'),
35 modems = manager.GetModems()
37 cf = dbus.Interface(bus.get_object('org.ofono', modems[0][0]),
38 'org.ofono.CallForwarding')
40 cf.connect_to_signal("PropertyChanged", property_changed)
43 cf.DisableAll(type, timeout = 100)
44 except dbus.DBusException, e:
45 print "Unable to DisableAll", e
48 print "DisableAll successful"
52 mainloop = gobject.MainLoop()