technology: return already enabled when tethering is enabled
[framework/connectivity/connman.git] / doc / agent-api.txt
index c362339..91371af 100644 (file)
@@ -51,7 +51,12 @@ Methods              void Release()
                        The dictionary arguments contains field names with
                        their input parameters.
 
+                       In case of WISPr credentials requests and if the user
+                       prefers to login through the browser by himself, agent
+                       will have to return a LaunchBrowser error (see below).
+
                        Possible Errors: net.connman.Agent.Error.Canceled
+                                        net.connman.Agent.Error.LaunchBrowser
 
                void Cancel()
 
@@ -82,6 +87,15 @@ Fields               string Name
                        key, a PSK passphrase or a passphrase for EAP
                        authentication methods.
 
+               string PreviousPassphrase
+
+                       The previous passphrase successfully saved, i.e.
+                       which lead to a successfull connection. This field is
+                       provided as an informational argument when connecting
+                       with it does not work anymore, for instance when it
+                       has been changed on the AP. Such argument appears when
+                       a RequestInput is raised after a retry.
+
                string WPS
 
                        This field requests the use of WPS to get associated.
@@ -110,7 +124,8 @@ Arguments   string Type
                string Requirement
 
                        Contains the requirement option. Valid values are
-                       "mandatory", "optional" or "alternate".
+                       "mandatory", "optional", "alternate" or
+                       "informational".
 
                        The "alternate" value specifies that this field can be
                        returned as an alternative to another one. An example
@@ -119,20 +134,42 @@ Arguments string Type
                        All "mandatory" fields must be returned, while the
                        "optional" can be returned if available.
 
+                       Nothing needs to be returned for "informational", as it
+                       is here only to provide an information so a value is
+                       attached to it.
+
                array{string} Alternates
 
                        Contains the list of alternate field names this
                        field can be represented by.
 
+               string Value
+
+                       Contains data as a string, relatively to an
+                       "informational" argument.
+
 Examples       Requesting a passphrase for WPA2 network
 
                        RequestInput("/service1",
-                               { "Passphrase" : { "Type" : "psk",
+                               { "Passphrase" : { "Type"        : "psk",
                                                   "Requirement" : "mandatory"
                                                 }
                                }
                        ==> { "Passphrase" : "secret123" }
 
+               Requesting a passphrase after an error on the previous one:
+
+                       RequestInput("/service1",
+                               { "Passphrase" : { "Type"        : "psk",
+                                                  "Requirement" : "mandatory"
+                                                },
+                                 "PreviousPassphrase" :
+                                       { "Type"       : "psk",
+                                         "Requirement : "informational",
+                                         "Value"      : "secret123"
+                                       }
+                               }
+
                Requesting name for hidden network
 
                        RequestInput("/service2",
@@ -140,9 +177,9 @@ Examples    Requesting a passphrase for WPA2 network
                                             "Requirement" : "mandatory",
                                             "Alternates"  : [ "SSID" ]
                                           },
-                                 "SSID" : { "Type" : "ssid",
-                                            "Requirement" : "alternate"
-                                          }
+                                 "SSID" : { "Type"        : "ssid",
+                                            "Requirement" : "alternate"
+                                          }
                                }
                        ==> { "Name" : "My hidden network" }
 
@@ -154,7 +191,7 @@ Examples    Requesting a passphrase for WPA2 network
                                                   "Alternates"  : [ "WPS" ]
                                                 },
                                  "WPS"        : { "Type"        : "wpspin",
-                                                  "Requirement" : "alternate"
+                                                  "Requirement" : "alternate"
                                                 }
                                }
 
@@ -166,7 +203,7 @@ Examples    Requesting a passphrase for WPA2 network
                                { "Identity"   : { "Type"        : "string",
                                                   "Requirement" : "mandatory"
                                                 },
-                                 "Passphrase" : { "Type" : "passphrase",
+                                 "Passphrase" : { "Type"        : "passphrase",
                                                   "Requirement" : "mandatory"
                                                 }
                                }
@@ -179,7 +216,7 @@ Examples    Requesting a passphrase for WPA2 network
                                { "Identity"   : { "Type"        : "string",
                                                   "Requirement" : "mandatory"
                                                 },
-                                 "Passphrase" : { "Type" : "response",
+                                 "Passphrase" : { "Type"        : "response",
                                                   "Requirement" : "mandatory"
                                                 }
                                }
@@ -189,12 +226,12 @@ Examples  Requesting a passphrase for WPA2 network
                Requesting username and password for a WISPr-enabled hotspot:
 
                        RequestInput("/service5",
-                                { "Username"   : { "Type"        : "string",
-                                                   "Requirement" : "mandatory"
-                                                 },
-                                  "Password"   : { "Type"        : "passphrase",
-                                                   "Requirement" : "mandatory"
-                                                 }
-                                }
-
-                        ==> { "Username" : "foo", "Password": "secret" }
+                               { "Username"   : { "Type"        : "string",
+                                                  "Requirement" : "mandatory"
+                                                },
+                                 "Password"   : { "Type"        : "passphrase",
+                                                  "Requirement" : "mandatory"
+                                                }
+                               }
+
+                       ==> { "Username" : "foo", "Password": "secret" }