From: Marcel Holtmann Date: Mon, 11 Aug 2008 04:43:56 +0000 (+0200) Subject: Use the element listing and filter by device type X-Git-Tag: 0.1~240 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9b4c51a543c5dd205bf5134f02f446077c1168f0;p=platform%2Fupstream%2Fconnman.git Use the element listing and filter by device type --- diff --git a/test/list-devices b/test/list-devices index 9b9615b..3c1b82e 100755 --- a/test/list-devices +++ b/test/list-devices @@ -7,15 +7,18 @@ bus = dbus.SystemBus() manager = dbus.Interface(bus.get_object("org.moblin.connman", "/"), "org.moblin.connman.Manager") -devices = manager.ListDevices() - -for path in devices: - print "[ %s ]" % (path) +elements = manager.ListElements() +for path in elements: element = dbus.Interface(bus.get_object("org.moblin.connman", path), "org.moblin.connman.Element") properties = element.GetProperties() + if (properties["Type"] != "device"): + continue + + print "[ %s ]" % (path) + for key in properties.keys(): print " %s = %s" % (key, properties[key])