Add example for showing the full introspection data
[connman] / test / show-introspection
1 #!/usr/bin/python
2
3 import dbus
4
5 bus = dbus.SystemBus()
6
7 object = dbus.Interface(bus.get_object('org.freedesktop.connman', '/'),
8                                 'org.freedesktop.DBus.Introspectable')
9
10 print object.Introspect()
11
12 manager = dbus.Interface(bus.get_object('org.freedesktop.connman', "/"),
13                                         'org.freedesktop.connman.Manager')
14
15 interfaces = manager.ListInterfaces()
16
17 for path in interfaces:
18         object = dbus.Interface(bus.get_object('org.freedesktop.connman', path),
19                                         'org.freedesktop.DBus.Introspectable')
20
21         print object.Introspect()