Update script to support provider connection.
---
 test/monitor-services |    2 +-
 test/test-manager     |   13 +++++++++++--
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/test/monitor-services b/test/monitor-services
index 1d2b44e..a334d99 100755
--- a/test/monitor-services
+++ b/test/monitor-services
@@ -10,7 +10,7 @@ def property_changed(name, value, path, interface):
        ipath = path[path.rfind("/") + 1:]
        if iface not in ["Service"]:
                return
-       if name in ["Profiles", "Services",
+       if name in ["Profiles", "Services", "Providers",
                                "Devices", "Networks", "Connections"]:
                val = "["
                for i in value:
diff --git a/test/test-manager b/test/test-manager
index 07e3d85..b39f9d0 100755
--- a/test/test-manager
+++ b/test/test-manager
@@ -18,6 +18,8 @@ def print_properties(key, value):
                interface = "org.moblin.connman.Connection"
        elif key == "Services":
                interface = "org.moblin.connman.Service"
+       elif key == "Providers":
+               interface = "org.moblin.connman.Provider"
        else:
                return
 
@@ -30,7 +32,7 @@ def print_properties(key, value):
                properties = obj.GetProperties()
 
                for key in properties.keys():
-                       if key in ["Networks", "Services"]:
+                       if key in ["Networks", "Services", "Providers"]:
                                continue
 
                        if key in ["Powered", "Scanning", "Connected",
@@ -58,9 +60,16 @@ def print_properties(key, value):
                                val = str(path)
                                list = list + val[val.rfind("/") + 1:] + " "
                        print "        Services = [ %s]" % (list)
+               if "Providers" in properties.keys():
+                       list = ""
+                       for path in properties["Providers"]:
+                               val = str(path)
+                               list = list + val[val.rfind("/") + 1:] + " "
+                       print "        Providers = [ %s]" % (list)
+
 
 for key in properties.keys():
-       if key in ["Profiles", "Devices", "Connections", "Services"]:
+       if key in ["Profiles", "Devices", "Connections", "Services", 
"Providers"]:
                print_properties(key, properties[key])
        elif key in ["AvailableTechnologies", "EnabledTechnologies",
                                        "ConnectedTechnologies",
-- 
1.6.2.5

_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman

Reply via email to