Open Source Telephony
 help / color / mirror / Atom feed
From: Philippe Nunes <philippe.nunes@linux.intel.com>
To: ofono@ofono.org
Subject: [PATCH v2 3/4] stk: Ask for immediate digit response if specified by command qualifier
Date: Tue, 28 Aug 2012 15:21:21 +0200	[thread overview]
Message-ID: <1346160082-11077-4-git-send-email-philippe.nunes@linux.intel.com> (raw)
In-Reply-To: <1346160082-11077-1-git-send-email-philippe.nunes@linux.intel.com>

[-- Attachment #1: Type: text/plain, Size: 1139 bytes --]

---
 src/stk.c |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/stk.c b/src/stk.c
index 7a7bd75..38f2e18 100644
--- a/src/stk.c
+++ b/src/stk.c
@@ -1519,9 +1519,9 @@ static gboolean handle_command_get_inkey(const struct stk_command *cmd,
 	gboolean alphabet = (qualifier & (1 << 0)) != 0;
 	gboolean ucs2 = (qualifier & (1 << 1)) != 0;
 	gboolean yesno = (qualifier & (1 << 2)) != 0;
+	gboolean immediate = (qualifier & (1 << 3)) != 0;
 	/*
-	 * Note: immediate response and help parameter values are not
-	 * provided by current api.
+	 * Note: help parameter value is not provided by current api.
 	 */
 	int err;
 
@@ -1545,6 +1545,11 @@ static gboolean handle_command_get_inkey(const struct stk_command *cmd,
 						&gi->icon_id, ucs2,
 						request_key_cb, stk, NULL,
 						timeout);
+	else if (immediate)
+		err = stk_agent_request_quick_digit(stk->current_agent,
+							text, &gi->icon_id,
+							request_key_cb, stk,
+							NULL, timeout);
 	else
 		err = stk_agent_request_digit(stk->current_agent, text,
 						&gi->icon_id, request_key_cb,
-- 
1.7.9.5


  parent reply	other threads:[~2012-08-28 13:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-28 13:21 [PATCH v2 0/4] Immediate digit response Philippe Nunes
2012-08-28 13:21 ` [PATCH v2 1/4] doc: Add new STK Agent API to get digit response on single key press Philippe Nunes
2012-08-30 21:58   ` Denis Kenzior
2012-08-28 13:21 ` [PATCH v2 2/4] stkagent: Add new " Philippe Nunes
2012-08-30 22:00   ` Denis Kenzior
2012-08-28 13:21 ` Philippe Nunes [this message]
2012-08-30 22:02   ` [PATCH v2 3/4] stk: Ask for immediate digit response if specified by command qualifier Denis Kenzior
2012-08-28 13:21 ` [PATCH v2 4/4] test: Update with RequestQuickDigit API Philippe Nunes
2012-08-30 22:05   ` Denis Kenzior

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=1346160082-11077-4-git-send-email-philippe.nunes@linux.intel.com \
    --to=philippe.nunes@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox