stk: Ask for immediate digit response as required
authorPhilippe Nunes <philippe.nunes@linux.intel.com>
Tue, 28 Aug 2012 13:21:21 +0000 (15:21 +0200)
committerDenis Kenzior <denkenz@gmail.com>
Thu, 30 Aug 2012 21:55:36 +0000 (16:55 -0500)
This is done by using the stk_agent_request_quick_digit function
introduced in the previous commit.

src/stk.c

index 05565e0..4c24abb 100644 (file)
--- a/src/stk.c
+++ b/src/stk.c
@@ -1522,9 +1522,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;
 
@@ -1548,6 +1548,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,