Skip to contentSkip to conversation

stk-api.txt. Introduce the new API ConfirmOpenChannel

PATCH In review Philippe Nunes 3 participants 5 messages Apr 8, 2011 – Apr 12, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 2/6 stk-api.txt. Introduce the new API ConfirmOpenChannel

---
 doc/stk-api.txt |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
doc/stk-api.txt +7 -0
index 0bcc6b5..aaa9fba 100644
@@ -278,6 +278,13 @@ Methods		byte RequestSelection(string title, byte icon_id,
 
 			Possible Errors: [service].Error.SimToolkit.EndSession
 
+		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 Cancel() [noreply]
 
 			Asks the agent to cancel any ongoing operation in
Signature · 1 line
1.7.1
#1 lore raw

Hi Philippe,

Quoted 8 lines
 doc/stk-api.txt |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
doc/stk-api.txt +0 -0
index 0bcc6b5..aaa9fba 100644

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

Quoted 10 lines
doc/stk-api.txt +7 -0
@@ -278,6 +278,13 @@ Methods		byte RequestSelection(string title, byte icon_id,
 
 			Possible Errors: [service].Error.SimToolkit.EndSession
 
+		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
+

we need to talk a bit about these boolean return parameters for confirmation. Since essentially a positive D-Bus reply can be considered as TRUE and a D-Bus error as FALSE. So this essentially implicit.

You can not return FALSE and an error. That is not how D-Bus works.

Regards

Marcel

#2 lore raw

Hi Marcel,

Quoted 25 lines · Marcel Holtmann

Hi Philippe,

Quoted 8 lines
 doc/stk-api.txt |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
doc/stk-api.txt +0 -0
index 0bcc6b5..aaa9fba 100644

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

Quoted 10 lines
doc/stk-api.txt +7 -0
@@ -278,6 +278,13 @@ Methods		byte RequestSelection(string title, byte icon_id,
 
 			Possible Errors: [service].Error.SimToolkit.EndSession
 
+		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
+

we need to talk a bit about these boolean return parameters for confirmation. Since essentially a positive D-Bus reply can be considered as TRUE and a D-Bus error as FALSE. So this essentially implicit.

Quoted 1 line

You can not return FALSE and an error. That is not how D-Bus works.

Actually I'm fine with this. The error has a different intent.

There are three potential outcomes of this operation:

- User accepts (True)
- User Rejects (False)
- User decides to end the session, which in addition to rejecting the command as above, also reboots the STK session.

Unless you want to introduce org.ofono.Error.SimToolkit.UserRejected, which to me looks ugly.

Regards,
-Denis

#3 lore raw

Hi Denis,

Quoted 29 lines
Quoted 23 lines
Quoted 8 lines
 doc/stk-api.txt |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
doc/stk-api.txt +0 -0
index 0bcc6b5..aaa9fba 100644

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

Quoted 10 lines
doc/stk-api.txt +7 -0
@@ -278,6 +278,13 @@ Methods		byte RequestSelection(string title, byte icon_id,
 
 			Possible Errors: [service].Error.SimToolkit.EndSession
 
+		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
+

we need to talk a bit about these boolean return parameters for confirmation. Since essentially a positive D-Bus reply can be considered as TRUE and a D-Bus error as FALSE. So this essentially implicit.

Quoted 1 line

You can not return FALSE and an error. That is not how D-Bus works.

Actually I'm fine with this. The error has a different intent.

There are three potential outcomes of this operation:

Quoted 7 lines

- User accepts (True)
- User Rejects (False)
- User decides to end the session, which in addition to rejecting the command as above, also reboots the STK session.

Unless you want to introduce org.ofono.Error.SimToolkit.UserRejected, which to me looks ugly.

so within BlueZ, we did exactly that. We introduced an error to be able to reject this. Mainly since we actually expected an accept reply with data.

I don't find the rejected error ugly, but that is more like a personal preference. I can see both arguments here.

Anyhow if we keep it this way, then the documentation needs to clearly state the above with true == accept and false == reject.

Regards

Marcel

#4 lore raw
In reply to Philippe Nunes

Hi Philippe,

Quoted 4 lines · Philippe Nunes
---
 doc/stk-api.txt |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

Patch has been applied, thanks.

Regards,
-Denis