diff options
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) |