summaryrefslogtreecommitdiffstats
path: root/test/list-calls
diff options
context:
space:
mode:
Diffstat (limited to 'test/list-calls')
-rwxr-xr-xtest/list-calls35
1 files changed, 35 insertions, 0 deletions
diff --git a/test/list-calls b/test/list-calls
new file mode 100755
index 00000000..c6ece9b8
--- /dev/null
+++ b/test/list-calls
@@ -0,0 +1,35 @@
+#!/usr/bin/python
+
+import dbus
+
+bus = dbus.SystemBus()
+
+manager = dbus.Interface(bus.get_object('org.ofono', '/'),
+ 'org.ofono.Manager')
+
+properties = manager.GetProperties()
+
+for path in properties["Modems"]:
+ modem = dbus.Interface(bus.get_object('org.ofono', path),
+ 'org.ofono.Modem')
+
+ properties = modem.GetProperties()
+
+ print "[ %s ]" % (path)
+
+ if "org.ofono.VoiceCallManager" not in properties["Interfaces"]:
+ continue
+
+ mgr = dbus.Interface(bus.get_object('org.ofono', path),
+ 'org.ofono.VoiceCallManager')
+
+ calls = mgr.GetCalls()
+
+ for path, properties in calls:
+ print " [ %s ]" % (path)
+
+ for key in properties.keys():
+ val = str(properties[key])
+ print " %s = %s" % (key, val)
+
+ print