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. ---
- v2: Moved towards RequestPeerAuthorization name. Input could mean that much more fields could appear at some point but this will never happen. Added the Rejected Error, it's much nicer to reject an incoming connection doc/agent-api.txt | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/doc/agent-api.txt b/doc/agent-api.txt index a98343f..7d9aa53 100644 --- a/doc/agent-api.txt +++ b/doc/agent-api.txt @@ -58,6 +58,25 @@ Methods void Release() Possible Errors: net.connman.Agent.Error.Canceled net.connman.Agent.Error.LaunchBrowser + dict RequestPeerAuthorization(object peer, dict fields) + + 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 +126,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 @@ -117,6 +139,12 @@ Fields string Name Password for WISPr authentication. This field will be requested when connecting to a WISPr-enabled hotspot. + string AcceptConnection + + The answer about an incoming peer connection. This + field will be requested only in this situation through + RequestPeerAuthorization. + Arguments string Type Contains the type of a field. For example "psk", "wep" @@ -254,3 +282,26 @@ Examples Requesting a passphrase for WPA2 network } ==> { "Username" : "foo", "Password": "secret" } + + Requesting a answer about an inconming peer connection: + + RequestPeerAuthorization("/peer3", + { "AcceptConnection" : + { "Type" : "string", + "Requirement" : "mandatory" + } + } + + ==> { "AcceptConnection" : "" } + + 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