Debian Codegraph @

test/list-services

raw
1 #!/usr/bin/python
2
3 import dbus
4
5 bus = dbus.SessionBus()
6
7 manager = dbus.Interface(bus.get_object('org.ofono.mms', '/org/ofono/mms'),
8 'org.ofono.mms.Manager')
9
10 services = manager.GetServices()
11
12 for path, properties in services:
13 print "[ %s ]" % (path)
14
15 object = dbus.Interface(bus.get_object('org.ofono.mms', path),
16 'org.ofono.mms.Service')
17
18 try:
19 properties = object.GetProperties()
20 except:
21 continue
22
23 for key in properties.keys():
24 val = str(properties[key])
25 print " %s = %s" % (key, val)
26
27 print