All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Immediate digit response
@ 2012-08-24 14:28 Philippe Nunes
  2012-08-24 14:28 ` [PATCH 1/4] stk: check if immediate digit response is requested Philippe Nunes
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Philippe Nunes @ 2012-08-24 14:28 UTC (permalink / raw)
  To: ofono

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

For GET-INPUT proactive command, the command qualifier can require
to send the response immediately after the user has entered a digit.
In this mode, the entered digit shall not be displayed and the character
'+' is not allowed for user input.

Philippe Nunes (4):
  stk: check if immediate digit response is requested
  stkagent: Add argument to notify when immediate digit response is
    required
  doc: Update STK API regarding the new argument immediate_response
  test: Print the immediate_response argument for RequestDigit

 doc/stk-api.txt    |   13 +++++++++----
 src/stk.c          |    6 ++++--
 src/stkagent.c     |    6 ++++--
 src/stkagent.h     |    5 +++--
 test/test-stk-menu |    5 +++--
 5 files changed, 23 insertions(+), 12 deletions(-)

-- 
1.7.9.5


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/4] stk: check if immediate digit response is requested
  2012-08-24 14:28 [PATCH 0/4] Immediate digit response Philippe Nunes
@ 2012-08-24 14:28 ` Philippe Nunes
  2012-08-24 14:28 ` [PATCH 2/4] stkagent: Add argument to notify when immediate digit response is required Philippe Nunes
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Philippe Nunes @ 2012-08-24 14:28 UTC (permalink / raw)
  To: ofono

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

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

diff --git a/src/stk.c b/src/stk.c
index 7a7bd75..3883d11 100644
--- a/src/stk.c
+++ b/src/stk.c
@@ -1519,6 +1519,7 @@ 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.
@@ -1547,8 +1548,9 @@ static gboolean handle_command_get_inkey(const struct stk_command *cmd,
 						timeout);
 	else
 		err = stk_agent_request_digit(stk->current_agent, text,
-						&gi->icon_id, request_key_cb,
-						stk, NULL, timeout);
+						&gi->icon_id, immediate,
+						request_key_cb, stk, NULL,
+						timeout);
 
 	g_free(text);
 
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/4] stkagent: Add argument to notify when immediate digit response is required
  2012-08-24 14:28 [PATCH 0/4] Immediate digit response Philippe Nunes
  2012-08-24 14:28 ` [PATCH 1/4] stk: check if immediate digit response is requested Philippe Nunes
@ 2012-08-24 14:28 ` Philippe Nunes
  2012-08-24 14:28 ` [PATCH 3/4] doc: Update STK API regarding the new argument immediate_response Philippe Nunes
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Philippe Nunes @ 2012-08-24 14:28 UTC (permalink / raw)
  To: ofono

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

---
 src/stkagent.c |    6 ++++--
 src/stkagent.h |    5 +++--
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/stkagent.c b/src/stkagent.c
index 7c3f697..ed5d28a 100644
--- a/src/stkagent.c
+++ b/src/stkagent.c
@@ -554,8 +554,9 @@ static void get_digit_cb(DBusPendingCall *call, void *data)
 
 int stk_agent_request_digit(struct stk_agent *agent, const char *text,
 				const struct stk_icon_id *icon,
-				stk_agent_string_cb cb, void *user_data,
-				ofono_destroy_func destroy, int timeout)
+				ofono_bool_t immediate, stk_agent_string_cb cb,
+				void *user_data, ofono_destroy_func destroy,
+				int timeout)
 {
 	DBusConnection *conn = ofono_dbus_get_connection();
 
@@ -568,6 +569,7 @@ int stk_agent_request_digit(struct stk_agent *agent, const char *text,
 	dbus_message_append_args(agent->msg,
 					DBUS_TYPE_STRING, &text,
 					DBUS_TYPE_BYTE, &icon->id,
+					DBUS_TYPE_BOOLEAN, &immediate,
 					DBUS_TYPE_INVALID);
 
 	if (dbus_connection_send_with_reply(conn, agent->msg, &agent->call,
diff --git a/src/stkagent.h b/src/stkagent.h
index 6e267fc..e797c1e 100644
--- a/src/stkagent.h
+++ b/src/stkagent.h
@@ -99,8 +99,9 @@ int stk_agent_request_confirmation(struct stk_agent *agent, const char *text,
 
 int stk_agent_request_digit(struct stk_agent *agent, const char *text,
 				const struct stk_icon_id *icon,
-				stk_agent_string_cb cb, void *user_data,
-				ofono_destroy_func destroy, int timeout);
+				ofono_bool_t immediate, stk_agent_string_cb cb,
+				void *user_data, ofono_destroy_func destroy,
+				int timeout);
 
 int stk_agent_request_key(struct stk_agent *agent, const char *text,
 				const struct stk_icon_id *icon,
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/4] doc: Update STK API regarding the new argument immediate_response
  2012-08-24 14:28 [PATCH 0/4] Immediate digit response Philippe Nunes
  2012-08-24 14:28 ` [PATCH 1/4] stk: check if immediate digit response is requested Philippe Nunes
  2012-08-24 14:28 ` [PATCH 2/4] stkagent: Add argument to notify when immediate digit response is required Philippe Nunes
@ 2012-08-24 14:28 ` Philippe Nunes
  2012-08-24 15:48   ` Denis Kenzior
  2012-08-24 14:28 ` [PATCH 4/4] test: Print the immediate_response argument for RequestDigit Philippe Nunes
  2012-08-24 15:52 ` [PATCH 0/4] Immediate digit response Denis Kenzior
  4 siblings, 1 reply; 7+ messages in thread
From: Philippe Nunes @ 2012-08-24 14:28 UTC (permalink / raw)
  To: ofono

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

---
 doc/stk-api.txt |   13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/doc/stk-api.txt b/doc/stk-api.txt
index 471e5d6..0d96246 100644
--- a/doc/stk-api.txt
+++ b/doc/stk-api.txt
@@ -170,8 +170,9 @@ Methods		byte RequestSelection(string title, byte icon_id,
 					string default, byte min, byte max,
 					boolean hide_typing)
 
-			Same as GetInput but only digit characters (0-9, *#+)
-			are expected.
+			Same as RequestInput but only digit characters
+			(0-9, *#+) are expected. In hidden entry mode, "+" is
+			not allowed for user input.
 
 			Possible Errors: [service].Error.SimToolkit.GoBack
 					 [service].Error.SimToolkit.EndSession
@@ -185,10 +186,14 @@ Methods		byte RequestSelection(string title, byte icon_id,
 			Possible Errors: [service].Error.SimToolkit.GoBack
 					 [service].Error.SimToolkit.EndSession
 
-		string RequestDigit(string alpha, byte icon_id)
+		string RequestDigit(string alpha, byte icon_id,
+					boolean immediate_response)
 
 			Same as above, but only digits (0-9, *#+) are
-			expected.
+			expected. The parameter immediate_response indicates
+			that the entered digit shall not be displayed and the
+			response shall be sent immediately after the key press.
+			"+" is not allowed for user input in this mode.
 
 			Possible Errors: [service].Error.SimToolkit.GoBack
 					 [service].Error.SimToolkit.EndSession
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 4/4] test: Print the immediate_response argument for RequestDigit
  2012-08-24 14:28 [PATCH 0/4] Immediate digit response Philippe Nunes
                   ` (2 preceding siblings ...)
  2012-08-24 14:28 ` [PATCH 3/4] doc: Update STK API regarding the new argument immediate_response Philippe Nunes
@ 2012-08-24 14:28 ` Philippe Nunes
  2012-08-24 15:52 ` [PATCH 0/4] Immediate digit response Denis Kenzior
  4 siblings, 0 replies; 7+ messages in thread
From: Philippe Nunes @ 2012-08-24 14:28 UTC (permalink / raw)
  To: ofono

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

---
 test/test-stk-menu |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/test/test-stk-menu b/test/test-stk-menu
index a9f92e8..3bd4483 100755
--- a/test/test-stk-menu
+++ b/test/test-stk-menu
@@ -113,10 +113,11 @@ class StkAgent(dbus.service.Object):
 			return key
 
 	@dbus.service.method("org.ofono.SimToolkitAgent",
-				in_signature="sy", out_signature="s")
-	def RequestDigit(self, title, icon):
+				in_signature="sys", out_signature="s")
+	def RequestDigit(self, title, icon, immediate_response):
 		print "Title: (%s)" % (title)
 		print "Icon: (%d)" % (icon)
+		print "Immediate response: (%s)" % (immediate_response)
 		key = raw_input("Enter Digit (t, b):")
 
 		if key == 'b':
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 3/4] doc: Update STK API regarding the new argument immediate_response
  2012-08-24 14:28 ` [PATCH 3/4] doc: Update STK API regarding the new argument immediate_response Philippe Nunes
@ 2012-08-24 15:48   ` Denis Kenzior
  0 siblings, 0 replies; 7+ messages in thread
From: Denis Kenzior @ 2012-08-24 15:48 UTC (permalink / raw)
  To: ofono

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

Hi Philippe,

On 08/24/2012 09:28 AM, Philippe Nunes wrote:
> ---
>   doc/stk-api.txt |   13 +++++++++----
>   1 file changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/doc/stk-api.txt b/doc/stk-api.txt
> index 471e5d6..0d96246 100644
> --- a/doc/stk-api.txt
> +++ b/doc/stk-api.txt
> @@ -170,8 +170,9 @@ Methods		byte RequestSelection(string title, byte icon_id,
>   					string default, byte min, byte max,
>   					boolean hide_typing)
>
> -			Same as GetInput but only digit characters (0-9, *#+)
> -			are expected.
> +			Same as RequestInput but only digit characters
> +			(0-9, *#+) are expected. In hidden entry mode, "+" is
> +			not allowed for user input.
>
>   			Possible Errors: [service].Error.SimToolkit.GoBack
>   					 [service].Error.SimToolkit.EndSession

Why is this chunk in this patch? What you're changing here does not 
match the patch description at all.

> @@ -185,10 +186,14 @@ Methods		byte RequestSelection(string title, byte icon_id,
>   			Possible Errors: [service].Error.SimToolkit.GoBack
>   					 [service].Error.SimToolkit.EndSession
>
> -		string RequestDigit(string alpha, byte icon_id)
> +		string RequestDigit(string alpha, byte icon_id,
> +					boolean immediate_response)
>
>   			Same as above, but only digits (0-9, *#+) are
> -			expected.
> +			expected. The parameter immediate_response indicates
> +			that the entered digit shall not be displayed and the
> +			response shall be sent immediately after the key press.
> +			"+" is not allowed for user input in this mode.
>
>   			Possible Errors: [service].Error.SimToolkit.GoBack
>   					 [service].Error.SimToolkit.EndSession

Unfortunately we cannot do it this way, the oFono API is frozen, we can 
only add new Methods, not change their arguments.  Naming is tricky 
since the immediate_response crap in the STK spec is utterly stupid. 
Name it RequestQuickDigit for now and I will think on it some more.

Regards,
-Denis

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/4] Immediate digit response
  2012-08-24 14:28 [PATCH 0/4] Immediate digit response Philippe Nunes
                   ` (3 preceding siblings ...)
  2012-08-24 14:28 ` [PATCH 4/4] test: Print the immediate_response argument for RequestDigit Philippe Nunes
@ 2012-08-24 15:52 ` Denis Kenzior
  4 siblings, 0 replies; 7+ messages in thread
From: Denis Kenzior @ 2012-08-24 15:52 UTC (permalink / raw)
  To: ofono

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

Hi Philippe,

On 08/24/2012 09:28 AM, Philippe Nunes wrote:
> For GET-INPUT proactive command, the command qualifier can require
> to send the response immediately after the user has entered a digit.
> In this mode, the entered digit shall not be displayed and the character
> '+' is not allowed for user input.
>
> Philippe Nunes (4):
>    stk: check if immediate digit response is requested
>    stkagent: Add argument to notify when immediate digit response is
>      required
>    doc: Update STK API regarding the new argument immediate_response
>    test: Print the immediate_response argument for RequestDigit
>

This patch ordering makes no sense.  The doc changes should be first, 
followed by stkagent changes followed by stk changes and then the test 
scripts.  Remember you want to break git bisect as little as possible.

Regards,
-Denis

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-08-24 15:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-24 14:28 [PATCH 0/4] Immediate digit response Philippe Nunes
2012-08-24 14:28 ` [PATCH 1/4] stk: check if immediate digit response is requested Philippe Nunes
2012-08-24 14:28 ` [PATCH 2/4] stkagent: Add argument to notify when immediate digit response is required Philippe Nunes
2012-08-24 14:28 ` [PATCH 3/4] doc: Update STK API regarding the new argument immediate_response Philippe Nunes
2012-08-24 15:48   ` Denis Kenzior
2012-08-24 14:28 ` [PATCH 4/4] test: Print the immediate_response argument for RequestDigit Philippe Nunes
2012-08-24 15:52 ` [PATCH 0/4] Immediate digit response Denis Kenzior

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.