diff options
author | Ulf <ulf.hofemeier@intel.com> | 2012-10-15 08:48:33 -0700 |
---|---|---|
committer | Ulf <ulf.hofemeier@intel.com> | 2012-10-15 08:48:33 -0700 |
commit | ea5e13a057fdebdcc293c9da0b6544187ed0596f (patch) | |
tree | b56b2772983e28566121a5109300be28eeba6add /test/dump-device | |
download | neard-ea5e13a057fdebdcc293c9da0b6544187ed0596f.tar.gz neard-ea5e13a057fdebdcc293c9da0b6544187ed0596f.tar.bz2 neard-ea5e13a057fdebdcc293c9da0b6544187ed0596f.zip |
Importing files for neard 0.7submit/trunk/20121015.154845accepted/trunk/20121015.153124
Diffstat (limited to 'test/dump-device')
-rwxr-xr-x | test/dump-device | 30 |
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]) + |