summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2010-01-25 07:14:11 +0100
committerMarcel Holtmann <marcel@holtmann.org>2010-01-25 07:14:11 +0100
commit32d267c1a6083f3f5183e5f3f15161b097f37419 (patch)
tree4de626ebde91e5104e02129d342a33c61206f47c /test
parentb5795c2b12e34ab29ad283b2ece3a507b17e3cb9 (diff)
downloadconnman-32d267c1a6083f3f5183e5f3f15161b097f37419.tar.gz
connman-32d267c1a6083f3f5183e5f3f15161b097f37419.tar.bz2
connman-32d267c1a6083f3f5183e5f3f15161b097f37419.zip
Add support for technology interface
Diffstat (limited to 'test')
-rwxr-xr-xtest/list-devices34
-rwxr-xr-xtest/monitor-manager2
-rwxr-xr-xtest/monitor-services2
-rwxr-xr-xtest/test-manager14
4 files changed, 34 insertions, 18 deletions
diff --git a/test/list-devices b/test/list-devices
index 61d8bbcf..78c319b3 100755
--- a/test/list-devices
+++ b/test/list-devices
@@ -9,21 +9,27 @@ manager = dbus.Interface(bus.get_object("org.moblin.connman", "/"),
properties = manager.GetProperties()
-for path in properties["Devices"]:
- device = dbus.Interface(bus.get_object("org.moblin.connman", path),
- "org.moblin.connman.Device")
+for path in properties["Technologies"]:
+ technology = dbus.Interface(bus.get_object("org.moblin.connman", path),
+ "org.moblin.connman.Technology")
- properties = device.GetProperties()
+ properties = technology.GetProperties()
- print "[ %s ]" % (path)
+ for path in properties["Devices"]:
+ device = dbus.Interface(bus.get_object("org.moblin.connman", path),
+ "org.moblin.connman.Device")
- for key in properties.keys():
- if key in ["Networks"]:
- val = ""
- for i in properties[key]:
- val += i + " "
- else:
- val = str(properties[key])
- print " %s = %s" % (key, val)
+ properties = device.GetProperties()
- print
+ print "[ %s ]" % (path)
+
+ for key in properties.keys():
+ if key in ["Networks"]:
+ val = ""
+ for i in properties[key]:
+ val += i + " "
+ else:
+ val = str(properties[key])
+ print " %s = %s" % (key, val)
+
+ print
diff --git a/test/monitor-manager b/test/monitor-manager
index a6192421..82ca805b 100755
--- a/test/monitor-manager
+++ b/test/monitor-manager
@@ -6,7 +6,7 @@ import dbus
import dbus.mainloop.glib
def property_changed(name, value):
- if name in ["Profiles", "Services", "Providers",
+ if name in ["Profiles", "Services", "Providers", "Technologies",
"Devices", "Networks"]:
val = "["
for i in value:
diff --git a/test/monitor-services b/test/monitor-services
index c435a34a..7d654471 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", "Providers",
+ if name in ["Profiles", "Services", "Providers", "Technologies",
"Devices", "Networks"]:
val = "["
for i in value:
diff --git a/test/test-manager b/test/test-manager
index a41d6570..6f9c2004 100755
--- a/test/test-manager
+++ b/test/test-manager
@@ -18,6 +18,8 @@ def print_properties(key, value):
interface = "org.moblin.connman.Service"
elif key == "Providers":
interface = "org.moblin.connman.Provider"
+ elif key == "Technologies":
+ interface = "org.moblin.connman.Technology"
else:
return
@@ -30,7 +32,8 @@ def print_properties(key, value):
properties = obj.GetProperties()
for key in properties.keys():
- if key in ["Networks", "Services", "Providers"]:
+ if key in ["Devices", "Networks", "Services",
+ "Providers", "Technologies"]:
continue
if key in ["Powered", "Scanning", "Connected",
@@ -46,6 +49,12 @@ def print_properties(key, value):
print " %s = %s" % (key, val)
+ if "Devices" in properties.keys():
+ list = ""
+ for path in properties["Devices"]:
+ val = str(path)
+ list = list + val[val.rfind("/") + 1:] + " "
+ print " Devices = [ %s]" % (list)
if "Networks" in properties.keys():
list = ""
for path in properties["Networks"]:
@@ -67,7 +76,8 @@ def print_properties(key, value):
for key in properties.keys():
- if key in ["Profiles", "Devices", "Services", "Providers"]:
+ if key in ["Profiles", "Devices", "Services", "Providers",
+ "Technologies"]:
print_properties(key, properties[key])
elif key in ["AvailableTechnologies", "EnabledTechnologies",
"ConnectedTechnologies",