Skip to contentSkip to conversation

stk-api.txt: Describe new d-bus APIs related to BIP commands.

PATCH In review Philippe Nunes 2 participants 4 messages Mar 22, 2011 – Mar 24, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 2/6 stk-api.txt: Describe new d-bus APIs related to BIP commands.

---
 doc/stk-api.txt |   27 ++++++++++++++++++++++++++-
 1 files changed, 26 insertions(+), 1 deletions(-)
doc/stk-api.txt +26 -1
index 529c734..772e4ce 100644
@@ -96,6 +96,7 @@ Methods		byte RequestSelection(string title, byte icon_id,
 			an error given below.
 
 			Possible Errors: [service].Error.SimToolkit.GoBack
+					 [service].Error.SimToolkit.EndSession
 
 			Implementation notes:
 
@@ -111,6 +112,7 @@ Methods		byte RequestSelection(string title, byte icon_id,
 			cleared prior to the display of this text.
 
 			Possible Errors: [service].Error.SimToolkit.GoBack
+					 [service].Error.SimToolkit.EndSession
 					 [service].Error.SimToolkit.Busy
 
 			Implementation notes:
@@ -154,6 +156,7 @@ Methods		byte RequestSelection(string title, byte icon_id,
 			should be opaque.
 
 			Possible Errors: [service].Error.SimToolkit.GoBack
+					 [service].Error.SimToolkit.EndSession
 
 			Implementation notes:
 
@@ -171,6 +174,7 @@ Methods		byte RequestSelection(string title, byte icon_id,
 			are expected.
 
 			Possible Errors: [service].Error.SimToolkit.GoBack
+					 [service].Error.SimToolkit.EndSession
 
 		string RequestKey(string alpha, byte icon_id)
 
@@ -179,6 +183,7 @@ Methods		byte RequestSelection(string title, byte icon_id,
 			for the request.
 
 			Possible Errors: [service].Error.SimToolkit.GoBack
+					 [service].Error.SimToolkit.EndSession
 
 		string RequestDigit(string alpha, byte icon_id)
 
@@ -186,12 +191,14 @@ Methods		byte RequestSelection(string title, byte icon_id,
 			expected.
 
 			Possible Errors: [service].Error.SimToolkit.GoBack
+					 [service].Error.SimToolkit.EndSession
 
 		boolean RequestConfirmation(string alpha, byte icon_id)
 
 			Asks the agent to get confirmation from the user.
 
 			Possible Errors: [service].Error.SimToolkit.GoBack
+					 [service].Error.SimToolkit.EndSession
 
 		boolean ConfirmCallSetup(string information, byte icon_id)
 
@@ -245,6 +252,7 @@ Methods		byte RequestSelection(string title, byte icon_id,
 			Possible Errors: [service].Error.SimToolkit.EndSession
 
 		void DisplayActionInformation(string text, byte icon_id)
+						[noreply]
 
 			Supplies a text string and/or icon concerning the
 			current activity in the terminal and UICC.  The
@@ -260,6 +268,23 @@ Methods		byte RequestSelection(string title, byte icon_id,
 			confirmation message to oFono and then should open
 			the launch browser with the given url.
 
+		boolean ConfirmOpenChannel(string information, byte icon_id)
+
+			Asks the agent to request user to confirm the channel
+			set-up.
+
+			Possible Errors: [service].Error.SimToolkit.EndSession
+
+		void DisplayChannelActivity(string text, byte icon_id)
+
+			Supplies a text string and/or icon concerning the
+			current activity linked to the channel set-up. The
+			text should be displayed to the user on screen
+			until the call is canceled using Cancel() or until the
+			user decides to end the session.
+
+			Possible Errors: [service].Error.SimToolkit.EndSession
+
 		void Cancel() [noreply]
 
 			Asks the agent to cancel any ongoing operation in
@@ -270,6 +295,6 @@ Methods		byte RequestSelection(string title, byte icon_id,
 		void Release() [noreply]
 
 			Agent is being released, possibly because of oFono
-			terminating, SimToolkit interface torn down or modem
+			terminating, SimToolkit interface turn down or modem
 			off.  If the agent is registered as a global agent,
 			no UnregisterAgent call is expected.
Signature · 1 line
1.7.1
#1 lore raw

Hi Philippe,

Quoted 51 lines · Philippe Nunes
---
 doc/stk-api.txt |   27 ++++++++++++++++++++++++++-
 1 files changed, 26 insertions(+), 1 deletions(-)
doc/stk-api.txt +5 -0
index 529c734..772e4ce 100644
@@ -96,6 +96,7 @@ Methods		byte RequestSelection(string title, byte icon_id,
 			an error given below.
 
 			Possible Errors: [service].Error.SimToolkit.GoBack
+					 [service].Error.SimToolkit.EndSession
 
 			Implementation notes:
 
@@ -111,6 +112,7 @@ Methods		byte RequestSelection(string title, byte icon_id,
 			cleared prior to the display of this text.
 
 			Possible Errors: [service].Error.SimToolkit.GoBack
+					 [service].Error.SimToolkit.EndSession
 					 [service].Error.SimToolkit.Busy
 
 			Implementation notes:
@@ -154,6 +156,7 @@ Methods		byte RequestSelection(string title, byte icon_id,
 			should be opaque.
 
 			Possible Errors: [service].Error.SimToolkit.GoBack
+					 [service].Error.SimToolkit.EndSession
 
 			Implementation notes:
 
@@ -171,6 +174,7 @@ Methods		byte RequestSelection(string title, byte icon_id,
 			are expected.
 
 			Possible Errors: [service].Error.SimToolkit.GoBack
+					 [service].Error.SimToolkit.EndSession
 
 		string RequestKey(string alpha, byte icon_id)
 
@@ -179,6 +183,7 @@ Methods		byte RequestSelection(string title, byte icon_id,
 			for the request.
 
 			Possible Errors: [service].Error.SimToolkit.GoBack
+					 [service].Error.SimToolkit.EndSession
 
 		string RequestDigit(string alpha, byte icon_id)
 
@@ -186,12 +191,14 @@ Methods		byte RequestSelection(string title, byte icon_id,
 			expected.
 

doc/stk-api.txt Methods byte RequestSelection(string title, byte icon_id, · line 202

Quoted 10 lines
doc/stk-api.txt +2 -0
 			Possible Errors: [service].Error.SimToolkit.GoBack
+					 [service].Error.SimToolkit.EndSession
 
 		boolean RequestConfirmation(string alpha, byte icon_id)
 
 			Asks the agent to get confirmation from the user.
 
 			Possible Errors: [service].Error.SimToolkit.GoBack
+					 [service].Error.SimToolkit.EndSession
 

That's great that you're fixing up the possible errors in the documentation, but they really need to be in a separate patch.

doc/stk-api.txt Methods byte RequestSelection(string title, byte icon_id, · line 256

Quoted 8 lines
doc/stk-api.txt +1 -0
 		boolean ConfirmCallSetup(string information, byte icon_id)
 
@@ -245,6 +252,7 @@ Methods		byte RequestSelection(string title, byte icon_id,
 			Possible Errors: [service].Error.SimToolkit.EndSession
 
 		void DisplayActionInformation(string text, byte icon_id)
+						[noreply]
 

Why are you marking this noreply when we do actually expect one?

Quoted 11 lines
doc/stk-api.txt +5 -0
 			Supplies a text string and/or icon concerning the
 			current activity in the terminal and UICC.  The
@@ -260,6 +268,23 @@ Methods		byte RequestSelection(string title, byte icon_id,
 			confirmation message to oFono and then should open
 			the launch browser with the given url.
 
+		boolean ConfirmOpenChannel(string information, byte icon_id)
+
+			Asks the agent to request user to confirm the channel
+			set-up.
+

doc/stk-api.txt Methods byte RequestSelection(string title, byte icon_id, · line 285

Quoted 10 lines
doc/stk-api.txt +10 -0
+			Possible Errors: [service].Error.SimToolkit.EndSession
+
+		void DisplayChannelActivity(string text, byte icon_id)
+
+			Supplies a text string and/or icon concerning the
+			current activity linked to the channel set-up. The
+			text should be displayed to the user on screen
+			until the call is canceled using Cancel() or until the
+			user decides to end the session.
+

Why can we not re-use DisplayActionInformation here?

doc/stk-api.txt Methods byte RequestSelection(string title, byte icon_id, · line 298

Quoted 11 lines
doc/stk-api.txt +3 -1
+			Possible Errors: [service].Error.SimToolkit.EndSession
+
 		void Cancel() [noreply]
 
 			Asks the agent to cancel any ongoing operation in
@@ -270,6 +295,6 @@ Methods		byte RequestSelection(string title, byte icon_id,
 		void Release() [noreply]
 
 			Agent is being released, possibly because of oFono
-			terminating, SimToolkit interface torn down or modem
+			terminating, SimToolkit interface turn down or modem

The original is actually correct, but should probably have the word 'being' in front of torn. e.g. SimToolkit interface is being torn down or modem terminating...

doc/stk-api.txt Methods byte RequestSelection(string title, byte icon_id, · line 300

Quoted 2 lines
doc/stk-api.txt +0 -0
 			off.  If the agent is registered as a global agent,
 			no UnregisterAgent call is expected.

Regards,
-Denis

#2 lore raw
Quoted 59 lines · Denis Kenzior

Hi Philippe,

Quoted 56 lines · Philippe Nunes
---
  doc/stk-api.txt |   27 ++++++++++++++++++++++++++-
  1 files changed, 26 insertions(+), 1 deletions(-)
doc/stk-api.txt +6 -0
index 529c734..772e4ce 100644
@@ -96,6 +96,7 @@ Methods		byte RequestSelection(string title, byte icon_id,
  			an error given below.
 
  			Possible Errors: [service].Error.SimToolkit.GoBack
+					 [service].Error.SimToolkit.EndSession
 
  			Implementation notes:
 
@@ -111,6 +112,7 @@ Methods		byte RequestSelection(string title, byte icon_id,
  			cleared prior to the display of this text.
 
  			Possible Errors: [service].Error.SimToolkit.GoBack
+					 [service].Error.SimToolkit.EndSession
  					 [service].Error.SimToolkit.Busy
 
  			Implementation notes:
@@ -154,6 +156,7 @@ Methods		byte RequestSelection(string title, byte icon_id,
  			should be opaque.
 
  			Possible Errors: [service].Error.SimToolkit.GoBack
+					 [service].Error.SimToolkit.EndSession
 
  			Implementation notes:
 
@@ -171,6 +174,7 @@ Methods		byte RequestSelection(string title, byte icon_id,
  			are expected.
 
  			Possible Errors: [service].Error.SimToolkit.GoBack
+					 [service].Error.SimToolkit.EndSession
 
  		string RequestKey(string alpha, byte icon_id)
 
@@ -179,6 +183,7 @@ Methods		byte RequestSelection(string title, byte icon_id,
  			for the request.
 
  			Possible Errors: [service].Error.SimToolkit.GoBack
+					 [service].Error.SimToolkit.EndSession
 
  		string RequestDigit(string alpha, byte icon_id)
 
@@ -186,12 +191,14 @@ Methods		byte RequestSelection(string title, byte icon_id,
  			expected.
 
  			Possible Errors: [service].Error.SimToolkit.GoBack
+					 [service].Error.SimToolkit.EndSession
 
  		boolean RequestConfirmation(string alpha, byte icon_id)
 
Quoted 8 lines

doc/stk-api.txt Methods byte RequestSelection(string title, byte icon_id, · line 202

Quoted 5 lines
doc/stk-api.txt +1 -0
  			Asks the agent to get confirmation from the user.
 
  			Possible Errors: [service].Error.SimToolkit.GoBack
+					 [service].Error.SimToolkit.EndSession
 

That's great that you're fixing up the possible errors in the documentation, but they really need to be in a separate patch.

OK, so be it. I will split this patch

Quoted 11 lines

doc/stk-api.txt Methods byte RequestSelection(string title, byte icon_id, · line 256

Quoted 9 lines
doc/stk-api.txt +1 -0
  		boolean ConfirmCallSetup(string information, byte icon_id)
 
@@ -245,6 +252,7 @@ Methods		byte RequestSelection(string title, byte icon_id,
  			Possible Errors: [service].Error.SimToolkit.EndSession
 
  		void DisplayActionInformation(string text, byte icon_id)
+						[noreply]
 

Why are you marking this noreply when we do actually expect one?

In practice, this API is called once an alpha Id is provided by the proactive commands SEND SS, SEND SMS, SEND USSD.

For such proactive commands, no "user" answer is expected. That's why the error code [service].Error.SimToolkit.EndSession is even not allowed. And that's the reason why I added the criteria [No reply]

Now, I just realized that I missed the proactive command SEND DTMF for which this API is also relevant and for which the user can indeed request to end the session. So, the criteria [noreply] is indeed not fair.

But, the reason for which I introduced the new API DisplayChannelActivity was to distinguish precisely when the STK agent could allow the user to end the session (typically when the button Cancel could be displayed).

Now, to handle correctly the case SEND DTMF, I presume that it would be better to refactor this API 'DisplayActionInformation' in order to address all the proactive commands which require simply to display an alpha ID. But this requires I guess to introduce a new argument like a boolean "end_session_allowed".

Quoted 47 lines
Quoted 12 lines
doc/stk-api.txt +5 -0
  			Supplies a text string and/or icon concerning the
  			current activity in the terminal and UICC.  The
@@ -260,6 +268,23 @@ Methods		byte RequestSelection(string title, byte icon_id,
  			confirmation message to oFono and then should open
  			the launch browser with the given url.
 
+		boolean ConfirmOpenChannel(string information, byte icon_id)
+
+			Asks the agent to request user to confirm the channel
+			set-up.
+

doc/stk-api.txt Methods byte RequestSelection(string title, byte icon_id, · line 285

Quoted 10 lines
doc/stk-api.txt +10 -0
+			Possible Errors: [service].Error.SimToolkit.EndSession
+
+		void DisplayChannelActivity(string text, byte icon_id)
+
+			Supplies a text string and/or icon concerning the
+			current activity linked to the channel set-up. The
+			text should be displayed to the user on screen
+			until the call is canceled using Cancel() or until the
+			user decides to end the session.
+

Why can we not re-use DisplayActionInformation here?

doc/stk-api.txt Methods byte RequestSelection(string title, byte icon_id, · line 298

Quoted 11 lines
doc/stk-api.txt +3 -1
+			Possible Errors: [service].Error.SimToolkit.EndSession
+
  		void Cancel() [noreply]
 
  			Asks the agent to cancel any ongoing operation in
@@ -270,6 +295,6 @@ Methods		byte RequestSelection(string title, byte icon_id,
  		void Release() [noreply]
 
  			Agent is being released, possibly because of oFono
-			terminating, SimToolkit interface torn down or modem
+			terminating, SimToolkit interface turn down or modem

The original is actually correct, but should probably have the word 'being' in front of torn. e.g. SimToolkit interface is being torn down or modem terminating...

doc/stk-api.txt Methods byte RequestSelection(string title, byte icon_id, · line 300

Quoted 2 lines
doc/stk-api.txt +0 -0
  			off.  If the agent is registered as a global agent,
  			no UnregisterAgent call is expected.

Regards,
-Denis

#3 lore raw

Hi Philippe,

Quoted 12 lines
Quoted 11 lines

doc/stk-api.txt Methods byte RequestSelection(string · line 257

Quoted 9 lines

boolean ConfirmCallSetup(string information, byte icon_id)

doc/stk-api.txt +1 -0
@@ -245,6 +252,7 @@ Methods        byte RequestSelection(string
 title, byte icon_id,
              Possible Errors: [service].Error.SimToolkit.EndSession
 
          void DisplayActionInformation(string text, byte icon_id)
+                        [noreply]
 

Why are you marking this noreply when we do actually expect one?

Quoted 6 lines

In practice, this API is called once an alpha Id is provided by the proactive commands SEND SS, SEND SMS, SEND USSD.

For such proactive commands, no "user" answer is expected. That's why the error code [service].Error.SimToolkit.EndSession is even not allowed. And that's the reason why I added the criteria [No reply]

Ok fair enough.

Quoted 5 lines

Now, I just realized that I missed the proactive command SEND DTMF for which this API is also relevant and for which the user can indeed request to end the session. So, the criteria [noreply] is indeed not fair.

Send DTMF is a little bit more subtle. The problem is that it is usually handled by the modem side and we have no control over the terminal response. So the current Send DTMF implementation will likely work magically everywhere anyway. We probably should split up this implementation into two paths:

- If the command is notified via ofono_stk_proactive_command_handled_notify, then do as we do now, e.g. using DisplayActionInformation
- If the command is notified via ofono_stk_proactive_command_notify, then we should probably call a different function.

Quoted 5 lines

But, the reason for which I introduced the new API DisplayChannelActivity was to distinguish precisely when the STK agent could allow the user to end the session (typically when the button Cancel could be displayed).

And that makes sense to me now

Quoted 6 lines

Now, to handle correctly the case SEND DTMF, I presume that it would be better to refactor this API 'DisplayActionInformation' in order to address all the proactive commands which require simply to display an alpha ID. But this requires I guess to introduce a new argument like a boolean "end_session_allowed".

I think a separate function makes sense. Perhaps DisplayAbortableActionInfo or feel free to come up with a better name.

Regards,
-Denis