blob: fb5b91b525177880c5f7e9a230a4baceb3b8cc69 (
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
28
|
#!/usr/bin/python
import gobject
import dbus
import dbus.mainloop.glib
def property_changed(property, value):
print "Manager property %s changed to %s" % (name, value)
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')
manager.connect_to_signal("PropertyChanged", property_changed)
try:
properties = manager.GetProperties()
print properties['Modems']
except dbus.DBusException, e:
print "Unable to call GetProperties %s" % e
mainloop = gobject.MainLoop()
mainloop.run()
|