Add example for showing the full introspection data
authorMarcel Holtmann <marcel@holtmann.org>
Tue, 26 Feb 2008 09:36:58 +0000 (10:36 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Tue, 26 Feb 2008 09:36:58 +0000 (10:36 +0100)
test/Makefile.am
test/show-introspection [new file with mode: 0755]

index 8f8214f..f3ae183 100644 (file)
@@ -1,4 +1,4 @@
 
 
-EXTRA_DIST = list-interfaces start-scanning simple-agent
+EXTRA_DIST = list-interfaces start-scanning simple-agent show-introspection
 
 MAINTAINERCLEANFILES = Makefile.in
 
 MAINTAINERCLEANFILES = Makefile.in
diff --git a/test/show-introspection b/test/show-introspection
new file mode 100755 (executable)
index 0000000..9acdd11
--- /dev/null
@@ -0,0 +1,21 @@
+#!/usr/bin/python
+
+import dbus
+
+bus = dbus.SystemBus()
+
+object = dbus.Interface(bus.get_object('org.freedesktop.connman', '/'),
+                               'org.freedesktop.DBus.Introspectable')
+
+print object.Introspect()
+
+manager = dbus.Interface(bus.get_object('org.freedesktop.connman', "/"),
+                                       'org.freedesktop.connman.Manager')
+
+interfaces = manager.ListInterfaces()
+
+for path in interfaces:
+       object = dbus.Interface(bus.get_object('org.freedesktop.connman', path),
+                                       'org.freedesktop.DBus.Introspectable')
+
+       print object.Introspect()