summaryrefslogtreecommitdiff
path: root/test/dump-device
diff options
context:
space:
mode:
authorUlf <ulf.hofemeier@intel.com>2012-10-15 08:48:33 -0700
committerUlf <ulf.hofemeier@intel.com>2012-10-15 08:48:33 -0700
commitea5e13a057fdebdcc293c9da0b6544187ed0596f (patch)
treeb56b2772983e28566121a5109300be28eeba6add /test/dump-device
downloadneard-ea5e13a057fdebdcc293c9da0b6544187ed0596f.tar.gz
neard-ea5e13a057fdebdcc293c9da0b6544187ed0596f.tar.bz2
neard-ea5e13a057fdebdcc293c9da0b6544187ed0596f.zip
Diffstat (limited to 'test/dump-device')
-rwxr-xr-xtest/dump-device30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/dump-device b/test/dump-device
new file mode 100755
index 0000000..58b090c
--- /dev/null
+++ b/test/dump-device
@@ -0,0 +1,30 @@
+#!/usr/bin/python
+
+import sys
+import dbus
+
+bus = dbus.SystemBus()
+
+def extract_record(key, list):
+ for i in list:
+ record = dbus.Interface(bus.get_object("org.neard", i),
+ "org.neard.Record")
+
+ properties = record.GetProperties()
+ print " Record = [ %s ]" % (str(i))
+
+ for key in properties.keys():
+ val = str(properties[key])
+ print " %s = %s" % (key, val)
+
+device = dbus.Interface(bus.get_object("org.neard", sys.argv[1]),
+ "org.neard.Device")
+
+properties = device.GetProperties()
+
+print "[ %s ]" % (sys.argv[1])
+
+for key in properties.keys():
+ if key in ["Records"]:
+ extract_record(key, properties[key])
+