From ba2fd65b5e18eccdbb67352a4c9500aa291de81c Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Wed, 29 Sep 2010 08:08:09 +0900 Subject: [PATCH] test: Add script for hanging up active call --- Makefile.am | 1 + test/hangup-active | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100755 test/hangup-active diff --git a/Makefile.am b/Makefile.am index f499fb3e..f422ee63 100644 --- a/Makefile.am +++ b/Makefile.am @@ -341,6 +341,7 @@ test_scripts = test/backtrace \ test/enable-modem \ test/enter-pin \ test/hangup-all \ + test/hangup-active \ test/set-context \ test/list-contexts \ test/list-modems \ diff --git a/test/hangup-active b/test/hangup-active new file mode 100755 index 00000000..52dd2c6a --- /dev/null +++ b/test/hangup-active @@ -0,0 +1,23 @@ +#!/usr/bin/python + +import sys +import dbus + +bus = dbus.SystemBus() + +manager = dbus.Interface(bus.get_object('org.ofono', '/'), + 'org.ofono.Manager') + +modems = manager.GetModems() +path = modems[0][0] + +manager = dbus.Interface(bus.get_object('org.ofono', path), + 'org.ofono.VoiceCallManager') + +calls = manager.GetCalls() +path = calls[0][0] + +call = dbus.Interface(bus.get_object('org.ofono', path), + 'org.ofono.VoiceCall') + +call.Hangup()