From fb9066c45a85bf3f900fa2a509ffe51f910bf9e3 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Fri, 20 Aug 2010 16:13:00 -0500 Subject: [PATCH] test: Add list-calls script --- test/list-calls | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100755 test/list-calls 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