diff options
author | Denis Kenzior <denkenz@gmail.com> | 2010-08-20 16:13:00 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2010-08-20 16:15:11 -0500 |
commit | fb9066c45a85bf3f900fa2a509ffe51f910bf9e3 (patch) | |
tree | 0ca6c2b60a366c0bc3956d1735e02ab5929cc757 /test | |
parent | 89c0e2879129ef6268357d5e7fdb47377256427d (diff) | |
download | ofono-fb9066c45a85bf3f900fa2a509ffe51f910bf9e3.tar.bz2 |
test: Add list-calls script
Diffstat (limited to 'test')
-rwxr-xr-x | test/list-calls | 35 |
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 |