summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-02-26 10:36:58 +0100
committerMarcel Holtmann <marcel@holtmann.org>2008-02-26 10:36:58 +0100
commit4bfbc81069e03dd3533ddae2e435cbf5d4eada65 (patch)
treeb1ba69086ee5b765b71faea27a86bbe24f2689ce /test
parent225ed69e17d41b06aa293b05387cd82924f30705 (diff)
downloadconnman-4bfbc81069e03dd3533ddae2e435cbf5d4eada65.tar.gz
connman-4bfbc81069e03dd3533ddae2e435cbf5d4eada65.tar.bz2
connman-4bfbc81069e03dd3533ddae2e435cbf5d4eada65.zip
Add example for showing the full introspection data
Diffstat (limited to 'test')
-rw-r--r--test/Makefile.am2
-rwxr-xr-xtest/show-introspection21
2 files changed, 22 insertions, 1 deletions
diff --git a/test/Makefile.am b/test/Makefile.am
index 8f8214f4..f3ae1831 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -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
diff --git a/test/show-introspection b/test/show-introspection
new file mode 100755
index 00000000..9acdd112
--- /dev/null
+++ b/test/show-introspection
@@ -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()