[PATCH 01/16] doc: Add RequestPeerInput method to agent API

2014-08-06 Thread Tomasz Bursztyka
This method will be used to handle extra input which might be requested
when connecting to a peer or in case a peer wants to connect to us.
---
 doc/agent-api.txt | 49 +
 1 file changed, 49 insertions(+)

diff --git a/doc/agent-api.txt b/doc/agent-api.txt
index a98343f..2ddd19a 100644
--- a/doc/agent-api.txt
+++ b/doc/agent-api.txt
@@ -23,6 +23,16 @@ Methods  void Release()
 
Possible Errors: net.connman.Agent.Error.Retry
 
+   void ReportPeerError(object peer, string error)
+
+   This method gets called when an error has to be
+   reported to the user about a peer connection.
+
+   A special return value can be used to trigger a
+   retry of the failed transaction.
+
+   Possible Errors: net.connman.Agent.Error.Retry
+
void RequestBrowser(object service, string url)
 
This method gets called when it is required
@@ -58,6 +68,25 @@ Methods  void Release()
Possible Errors: net.connman.Agent.Error.Canceled
 net.connman.Agent.Error.LaunchBrowser
 
+   dict RequestPeerAuthorization(object peer, dict fields) 
[experimental]
+
+   This method gets called when trying to connect to a
+   peer or when an incoming peer connection is requested,
+   for which some extra input is required. In this case,
+   it will only deal with WPS input as well as accepting
+   or rejecting an incoming connection.
+
+   The return value should be a dictionary where the
+   keys are the field names and the values are the
+   actual fields. Alternatively an error indicating that
+   the request got canceled or rejected can be returned.
+
+   The dictionary arguments contains field names with
+   their input parameters.
+
+   Possible Errors: net.connman.Agent.Error.Canceled
+net.connman.Agent.Error.Rejected
+
void Cancel()
 
This method gets called to indicate that the agent
@@ -107,6 +136,9 @@ Fields  string Name
method, or a pin code if user wants to use the pin
method.
 
+   In case of a RequestPeerAuthorization, this field will
+   be set as mandatory.
+
string Username
 
Username for WISPr authentication. This field will be
@@ -254,3 +286,20 @@ Examples   Requesting a passphrase for WPA2 network
}
 
==> { "Username" : "foo", "Password": "secret" }
+
+   Requesting a answer about an inconming peer connection:
+
+   RequestPeerAuthorization("/peer3", {})
+
+   ==> { }
+
+   Requesting the WPS details when connecting to a peer:
+
+   RequestPeerAuthorization("/peer4",
+   { "WPS":
+   { "Type": "wpspin",
+ "Requirement" : "mandatory"
+   }
+   }
+
+   ==> { "WPS" : "" }
-- 
1.8.5.5

___
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman


Re: [PATCH 01/16] doc: Add RequestPeerInput method to agent API

2014-08-05 Thread Guoqiang

On 08/05/2014 03:11 PM, Tomasz Bursztyka wrote:

Hi,


How does ConnMan support the remote peer which only support PIN?



It does not make the distinction. This was how wpspin field was 
specified for connman API 1.0.
That will be fixed for 2.0 version of the API probably. 

Glad to hear that, Thanks for your kindly reply.

Guoqiang

___
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman


Re: [PATCH 01/16] doc: Add RequestPeerInput method to agent API

2014-08-05 Thread Tomasz Bursztyka

Hi,


How does ConnMan support the remote peer which only support PIN?



It does not make the distinction. This was how wpspin field was 
specified for connman API 1.0.

That will be fixed for 2.0 version of the API probably.

Tomasz
___
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman


Re: [PATCH 01/16] doc: Add RequestPeerInput method to agent API

2014-08-05 Thread leonew

Hi Tomasz,

I have a question about this interface:

How does ConnMan support the remote peer which only support PIN?

On 08/01/2014 07:16 PM, Tomasz Bursztyka wrote:

+   Requesting the WPS details when connecting to a peer:
+
+   RequestPeerAuthorization("/peer4",
+   { "WPS":
+   { "Type": "wpspin",
+ "Requirement" : "mandatory"
+   }
+   }
+
+   ==> { "WPS" : "" }


Best Regards
Guoqiang
___
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman


[PATCH 01/16] doc: Add RequestPeerInput method to agent API

2014-08-01 Thread Tomasz Bursztyka
This method will be used to handle extra input which might be requested
when connecting to a peer or in case a peer wants to connect to us.
---
 doc/agent-api.txt | 49 +
 1 file changed, 49 insertions(+)

diff --git a/doc/agent-api.txt b/doc/agent-api.txt
index a98343f..2ddd19a 100644
--- a/doc/agent-api.txt
+++ b/doc/agent-api.txt
@@ -23,6 +23,16 @@ Methods  void Release()
 
Possible Errors: net.connman.Agent.Error.Retry
 
+   void ReportPeerError(object peer, string error)
+
+   This method gets called when an error has to be
+   reported to the user about a peer connection.
+
+   A special return value can be used to trigger a
+   retry of the failed transaction.
+
+   Possible Errors: net.connman.Agent.Error.Retry
+
void RequestBrowser(object service, string url)
 
This method gets called when it is required
@@ -58,6 +68,25 @@ Methods  void Release()
Possible Errors: net.connman.Agent.Error.Canceled
 net.connman.Agent.Error.LaunchBrowser
 
+   dict RequestPeerAuthorization(object peer, dict fields) 
[experimental]
+
+   This method gets called when trying to connect to a
+   peer or when an incoming peer connection is requested,
+   for which some extra input is required. In this case,
+   it will only deal with WPS input as well as accepting
+   or rejecting an incoming connection.
+
+   The return value should be a dictionary where the
+   keys are the field names and the values are the
+   actual fields. Alternatively an error indicating that
+   the request got canceled or rejected can be returned.
+
+   The dictionary arguments contains field names with
+   their input parameters.
+
+   Possible Errors: net.connman.Agent.Error.Canceled
+net.connman.Agent.Error.Rejected
+
void Cancel()
 
This method gets called to indicate that the agent
@@ -107,6 +136,9 @@ Fields  string Name
method, or a pin code if user wants to use the pin
method.
 
+   In case of a RequestPeerAuthorization, this field will
+   be set as mandatory.
+
string Username
 
Username for WISPr authentication. This field will be
@@ -254,3 +286,20 @@ Examples   Requesting a passphrase for WPA2 network
}
 
==> { "Username" : "foo", "Password": "secret" }
+
+   Requesting a answer about an inconming peer connection:
+
+   RequestPeerAuthorization("/peer3", {})
+
+   ==> { }
+
+   Requesting the WPS details when connecting to a peer:
+
+   RequestPeerAuthorization("/peer4",
+   { "WPS":
+   { "Type": "wpspin",
+ "Requirement" : "mandatory"
+   }
+   }
+
+   ==> { "WPS" : "" }
-- 
1.8.5.5

___
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman