diff options
author | Dara Spieker-Doyle <dara.spieker-doyle@nokia.com> | 2011-01-13 12:19:12 -0800 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2011-01-13 16:07:12 -0600 |
commit | 99d10bfc2ccd95984760c17ba3055c086b2c04c1 (patch) | |
tree | 2f58bb6eb4216492df937f40c51815137eb735c0 /test | |
parent | 58574e61bcf46469882a9a987db3fbc5bec822a8 (diff) | |
download | ofono-99d10bfc2ccd95984760c17ba3055c086b2c04c1.tar.bz2 |
test: Add CDMA MO Call Support scripts
Diffstat (limited to 'test')
-rwxr-xr-x | test/cdma-dial-number | 24 | ||||
-rwxr-xr-x | test/cdma-hangup | 20 | ||||
-rwxr-xr-x | test/cdma-list-call | 25 |
3 files changed, 69 insertions, 0 deletions
diff --git a/test/cdma-dial-number b/test/cdma-dial-number new file mode 100755 index 00000000..d6dc0c4f --- /dev/null +++ b/test/cdma-dial-number @@ -0,0 +1,24 @@ +#!/usr/bin/python + +import sys +import dbus + +bus = dbus.SystemBus() + +manager = dbus.Interface(bus.get_object('org.ofono', '/'), + 'org.ofono.Manager') + +if len(sys.argv) > 2: + path = sys.argv[1] + number = sys.argv[2] +else: + modems = manager.GetModems() + path, properties = modems[0] + number = sys.argv[1] + +print "Using modem %s" % path + +manager = dbus.Interface(bus.get_object('org.ofono', path), + 'org.ofono.cdma.VoiceCallManager') + +manager.Dial(number) diff --git a/test/cdma-hangup b/test/cdma-hangup new file mode 100755 index 00000000..493ece41 --- /dev/null +++ b/test/cdma-hangup @@ -0,0 +1,20 @@ +#!/usr/bin/python + +import sys +import dbus + +bus = dbus.SystemBus() + +manager = dbus.Interface(bus.get_object('org.ofono', '/'), + 'org.ofono.Manager') + +if len(sys.argv) > 2: + path = sys.argv[1] +else: + modems = manager.GetModems() + path, properties = modems[0] + +manager = dbus.Interface(bus.get_object('org.ofono', path), + 'org.ofono.cdma.VoiceCallManager') + +manager.Hangup() diff --git a/test/cdma-list-call b/test/cdma-list-call new file mode 100755 index 00000000..c941383c --- /dev/null +++ b/test/cdma-list-call @@ -0,0 +1,25 @@ +#!/usr/bin/python + +import dbus + +bus = dbus.SystemBus() + +manager = dbus.Interface(bus.get_object('org.ofono', '/'), + 'org.ofono.Manager') + +modems = manager.GetModems() + +for path, properties in modems: + print "[ %s ]" % (path) + + if "org.ofono.cdma.VoiceCallManager" not in properties["Interfaces"]: + continue + + mgr = dbus.Interface(bus.get_object('org.ofono', path), + 'org.ofono.cdma.VoiceCallManager') + + properties = mgr.GetProperties() + + for key in properties.keys(): + val = str(properties[key]) + print " %s = %s" % (key, val) |