summaryrefslogtreecommitdiffstats
path: root/test/list-contexts
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2010-08-19 13:25:00 -0500
committerDenis Kenzior <denkenz@gmail.com>2010-08-19 14:20:06 -0500
commitcc8ade1b1fe20057f132aba59b15444282896312 (patch)
treeb10695190eb91e929693a227b7394369e960ba6b /test/list-contexts
parentc6bdb484203fb374c01c5044d9833856746512e6 (diff)
downloadofono-cc8ade1b1fe20057f132aba59b15444282896312.tar.bz2
test: update list-contexts to the new API
Diffstat (limited to 'test/list-contexts')
-rwxr-xr-xtest/list-contexts17
1 files changed, 6 insertions, 11 deletions
diff --git a/test/list-contexts b/test/list-contexts
index f0731180..66a76c5c 100755
--- a/test/list-contexts
+++ b/test/list-contexts
@@ -17,20 +17,15 @@ for path in properties["Modems"]:
print "[ %s ]" % (path)
- if "org.ofono.DataConnectionManager" not in properties["Interfaces"]:
+ if "org.ofono.ConnectionManager" not in properties["Interfaces"]:
continue
- connmgr = dbus.Interface(bus.get_object('org.ofono', path),
- 'org.ofono.DataConnectionManager')
+ connman = dbus.Interface(bus.get_object('org.ofono', path),
+ 'org.ofono.ConnectionManager')
- properties = connmgr.GetProperties()
-
- for path in properties["PrimaryContexts"]:
- context = dbus.Interface(bus.get_object('org.ofono', path),
- 'org.ofono.PrimaryDataContext')
-
- properties = context.GetProperties()
+ contexts = connman.GetContexts()
+ for path, properties in contexts:
print " [ %s ]" % (path)
for key in properties.keys():
@@ -47,5 +42,5 @@ for path in properties["Modems"]:
else:
val = str(properties[key])
print " %s = %s" % (key, val)
-
+
print