From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH] test/answer-calls: answer waiting calls, too
Date: Thu, 11 Nov 2010 09:14:09 -0600 [thread overview]
Message-ID: <4CDC0841.1070100@gmail.com> (raw)
In-Reply-To: <1289480071-30423-1-git-send-email-Pekka.Pessi@nokia.com>
[-- Attachment #1: Type: text/plain, Size: 1772 bytes --]
Hi Pekka,
On 11/11/2010 06:54 AM, Pekka.Pessi(a)nokia.com wrote:
> From: Pekka Pessi <Pekka.Pessi@nokia.com>
>
> ---
> test/answer-calls | 20 ++++++++++----------
> 1 files changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/test/answer-calls b/test/answer-calls
> index 0deb832..1218c66 100755
> --- a/test/answer-calls
> +++ b/test/answer-calls
> @@ -4,8 +4,11 @@ import dbus
>
> bus = dbus.SystemBus()
>
> -manager = dbus.Interface(bus.get_object('org.ofono', '/'),
> - 'org.ofono.Manager')
> +def oface(path, name):
> + obj = bus.get_object('org.ofono', path)
> + return dbus.Interface(obj, name)
> +
> +manager = oface('/', 'org.ofono.Manager')
I'd really like to keep things consistent even inside the test
directory. Right now we have about two or three distinct styles of
python, and this change isn't helping ;)
>
> modems = manager.GetModems()
>
> @@ -15,8 +18,7 @@ for path, properties in modems:
> if "org.ofono.VoiceCallManager" not in properties["Interfaces"]:
> continue
>
> - mgr = dbus.Interface(bus.get_object('org.ofono', path),
> - 'org.ofono.VoiceCallManager')
> + mgr = oface(path, 'org.ofono.VoiceCallManager')
>
> calls = mgr.GetCalls()
>
> @@ -24,10 +26,8 @@ for path, properties in modems:
> state = properties["State"]
> print "[ %s ] %s" % (path, state)
>
> - if state != "incoming":
> - continue
> -
> - call = dbus.Interface(bus.get_object('org.ofono', path),
> - 'org.ofono.VoiceCall')
> + if state == "incoming":
> + oface(path, 'org.ofono.VoiceCall').Answer()
> + elif state == "waiting":
> + mgr.HoldAndAnswer()
Actually I'd prefer a separate script for this.
>
> - call.Answer()
Regards,
-Denis
prev parent reply other threads:[~2010-11-11 15:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-11 12:54 [PATCH] test/answer-calls: answer waiting calls, too Pekka.Pessi
2010-11-11 15:14 ` Denis Kenzior [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4CDC0841.1070100@gmail.com \
--to=denkenz@gmail.com \
--cc=ofono@ofono.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.