Show the autoconnect "A" and state "R"eady or "O"nline indicators in the services list. --- test/test-connman | 15 ++++++++++++++- 1 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/test/test-connman b/test/test-connman index 473af62..67b0c85 100755 --- a/test/test-connman +++ b/test/test-connman @@ -27,9 +27,21 @@ if len(sys.argv) < 2: def print_services(services): for path, properties in services: identifier = path[path.rfind("/") + 1:] + state = " " + autoconnect = " " if properties["Favorite"] == dbus.Boolean(1): favorite = "*" + + if properties["AutoConnect"] == dbus.Boolean(1): + autoconnect = " A" + else: + autoconnect = " " + + if properties["State"] == "ready": + state = "R" + elif properties["State"] == "online": + state = "O" else: favorite = " " @@ -38,7 +50,8 @@ def print_services(services): else: name = "{" + properties["Type"] + "}" - print "%s %-26s { %s }" % (favorite, name, identifier) + print "%s%s%s %-26s { %s }" % (favorite, autoconnect, state, + name, identifier) if sys.argv[1] == "state": properties = manager.GetProperties() -- 1.7.5.4 _______________________________________________ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman