list-services: Use GetServices() instead GetProperties()
authorDaniel Wagner <daniel.wagner@bmw-carit.de>
Sun, 26 Feb 2012 12:01:37 +0000 (13:01 +0100)
committerDaniel Wagner <daniel.wagner@bmw-carit.de>
Tue, 28 Feb 2012 12:31:54 +0000 (13:31 +0100)
GetProperties() does not return the services path anymore. Instead
the GetServices() method should be used.

test/list-services

index c403f858619880439ac95988d2916ed050268970..be447b8d0d278fa543db6ecf6a59930c9f0b080e 100755 (executable)
@@ -28,14 +28,9 @@ bus = dbus.SystemBus()
 manager = dbus.Interface(bus.get_object("net.connman", "/"),
                                        "net.connman.Manager")
 
-properties = manager.GetProperties()
-
-for path in properties["Services"]:
+for path, properties in manager.GetServices():
        service = dbus.Interface(bus.get_object("net.connman", path),
                                                "net.connman.Service")
-
-       properties = service.GetProperties()
-
        print "[ %s ]" % (path)
 
        for key in properties.keys():