Imported Upstream version 1.35
[platform/upstream/connman.git] / doc / service-api.txt
index 4624522..6cdb0bb 100644 (file)
@@ -1,15 +1,18 @@
 Service hierarchy
 =================
 
-Service                org.moblin.connman
-Interface      org.moblin.connman.Service
+Service                net.connman
+Interface      net.connman.Service
 Object path    [variable prefix]/{service0,service1,...}
 
-Methods                dict GetProperties()
+Methods                dict GetProperties()  [deprecated]
 
                        Returns properties for the service object. See
                        the properties section for available properties.
 
+                       Usage of this method is highly discouraged. Use
+                       the Manager.GetServices() method instead.
+
                        Possible Errors: [service].Error.InvalidArguments
 
                void SetProperty(string name, variant value)
@@ -19,20 +22,25 @@ Methods             dict GetProperties()
                        changeable. On success a PropertyChanged signal
                        will be emitted.
 
+                       Properties cannot be set for hidden WiFi service
+                       entries or provisioned services.
+
                        Possible Errors: [service].Error.InvalidArguments
                                         [service].Error.InvalidProperty
 
                void ClearProperty(string name)
 
-                       Clears the value of the specified property.
+                       Clears the value of the specified property. Only
+                       the readonly Error property can be cleared using
+                       this method call. When cleared the service is reset
+                       to the idle state.
 
-                       Possible Errors: [service].Error.InvalidArguments
-                                        [service].Error.InvalidProperty
+                       Possible Errors: [service].Error.InvalidProperty
 
                void Connect()
 
                        Connect this service. It will attempt to connect
-                       WiFi, WiMAX or Bluetooth services.
+                       WiFi or Bluetooth services.
 
                        For Ethernet devices this method can only be used
                        if it has previously been disconnected. Otherwise
@@ -45,6 +53,11 @@ Methods              dict GetProperties()
                        setting a longer D-Bus timeout might be a really
                        good idea.
 
+                       Calling Connect() on a hidden WiFi service entry will
+                       query the missing SSID via the Agent API causing a
+                       WiFi service with the given SSID to be scanned,
+                       created and connected.
+
                        Possible Errors: [service].Error.InvalidArguments
 
                void Disconnect()
@@ -58,7 +71,10 @@ Methods              dict GetProperties()
                        method will fail.
 
                        This method can also be used to abort a previous
-                       connectiong attempt via the Connect method.
+                       connection attempt via the Connect method.
+
+                       Hidden WiFi service entries cannot be disconnected
+                       as they always stay in idle state.
 
                        Possible Errors: [service].Error.InvalidArguments
 
@@ -75,12 +91,14 @@ Methods             dict GetProperties()
                        to false, but that is currently not supported.
 
                        In the case a connection attempt failed and the
-                       service is in the State=failure, this method can
-                       also be used to reset the service.
+                       service is in the state "failure", "idle" or
+                       "disconnect", this method can also be used
+                       to reset the service.
 
-                       Calling this method on Ethernet devices will cause
-                       an error message. It is not possible to remove these
-                       kind of devices.
+                       Calling this method on Ethernet devices, hidden WiFi
+                       services or provisioned services will cause an error
+                       message. It is not possible to remove these kind of
+                       services.
 
                        Possible Errors: [service].Error.InvalidArguments
 
@@ -89,9 +107,6 @@ Methods              dict GetProperties()
                        If a service has been used before, this allows a
                        reorder of the favorite services.
 
-                       The target service object must be part of this
-                       profile. Moving between profiles is not supported.
-
                        Possible Errors: [service].Error.InvalidArguments
 
                void MoveAfter(object service)
@@ -99,12 +114,9 @@ Methods             dict GetProperties()
                        If a service has been used before, this allows a
                        reorder of the favorite services.
 
-                       The target service object must be part of this
-                       profile. Moving between profiles is not supported.
-
                        Possible Errors: [service].Error.InvalidArguments
 
-               void ResetCounters()
+               void ResetCounters()  [experimental]
 
                        Reset the counter statistics.
 
@@ -120,18 +132,22 @@ Properties        string State [readonly]
                        The service state information.
 
                        Valid states are "idle", "failure", "association",
-                       "configuration" and "ready".
+                       "configuration", "ready", "disconnect" and "online".
+
+                       The "ready" state signals a successfully
+                       connected device. "online" signals that an
+                       Internet connection is available and has been
+                       verified.
 
-                       Also "login" and "online" states are used. The
-                       state "online" signals that an Internet connection
-                       is available and has been verified.
+                       See doc/overview-api.txt for more information about
+                       state transitions.
 
                string Error [readonly]
 
                        The service error status details.
 
                        When error occur during connection or disconnection
-                       the detailed information are represented in this
+                       the detailed information is represented in this
                        property to help the user interface to present the
                        user with alternate options.
 
@@ -139,17 +155,20 @@ Properties        string State [readonly]
                        the "failure" state. Otherwise it might be empty or
                        not present at all.
 
-                       Current defined error code is "dhcp-failed".
+                       Currently defined error codes are: "out-of-range",
+                       "pin-missing", "dhcp-failed", "connect-failed",
+                       "login-failed", "auth-failed" and "invalid-key".
 
                string Name [readonly]
 
                        The service name (for example "Wireless" etc.)
 
                        This name can be used for directly displaying it in
-                       the application. It has pure informational purpose.
+                       the application. It has pure informational purpose
+                       and no attempt should be made to translate it.
 
-                       For Ethernet devices and hidden WiFi networks it is
-                       not guaranteed that this property is present.
+                       For Ethernet devices and hidden WiFi networks this
+                       property is not present.
 
                string Type [readonly]
 
@@ -159,60 +178,21 @@ Properties        string State [readonly]
                        advanced properties or showing the correct icon
                        to the user.
 
-               string Mode [readonly]
-
-                       If the service type is WiFi or Cellular, then this
-                       property is present and contains the mode of the
-                       network.
-
-                       For WiFi services the possible values are "managed"
-                       and "adhoc". For Cellular services it describes the
-                       network technology. Possible values are "gprs", "edge"
-                       and "umts".
-
-                       This property might be only present for WiFi and
-                       Cellular services.
+                       Together with a missing Name property, this can
+                       be used to identify hidden WiFi networks.
 
-               string Security [readonly]
+               array{string} Security [readonly]
 
                        If the service type is WiFi, then this property is
-                       present and contains the security method or key
-                       management setting.
+                       present and contains the list of security methods
+                       or key management settings.
 
-                       Possible values are "none", "wep", "psk" and
-                       also "ieee8021x". Alternate values for "psk"
-                       can also be "wpa" and "rsn".
+                       Possible values are "none", "wep", "psk", "ieee8021x"
+                       and also "wps".
 
                        This property might be only present for WiFi
                        services.
 
-               boolean LoginRequired [readonly]
-
-                       This property indicates that an additional login
-                       step is needed before the connection establishment
-                       can proceed.
-
-               string Passphrase [readwrite]
-
-                       If the service type is WiFi, then this property
-                       can be used to store a passphrase.
-
-                       No PropertyChanged signals will be send for this
-                       property. The PassphraseRequired property should
-                       be monitored instead.
-
-                       This property might also not always be included
-                       since it is protected by a different security policy.
-
-               boolean PassphraseRequired [readonly]
-
-                       If the service type is WiFi, then this property
-                       indicates if a passphrase is required.
-
-                       If a passphrase has been set already or if no
-                       passphrase is needed, then this property will
-                       be set to false.
-
                uint8 Strength [readonly]
 
                        Indicates the signal strength of the service. This
@@ -235,46 +215,21 @@ Properties        string State [readonly]
                        This value will be set to true if the service is
                        configured externally via a configuration file.
 
-                       The only valid operation are Connect() and of
-                       course Disconnect(). The Remove() method will
-                       result in an error.
+                       The only valid operations are Connect(), Disconnect()
+                       and changing the AutoConnect property. The Remove()
+                       method will result in an error.
 
                boolean AutoConnect [readwrite]
 
                        If set to true, this service will auto-connect
-                       when not other connection is available.
+                       when no other connection is available.
+
+                       The service won't auto-connect while roaming.
 
                        For favorite services it is possible to change
                        this value to prevent or permit automatic
                        connection attempts.
 
-               boolean SetupRequired [readonly]
-
-                       If the service is Cellular, then this property
-                       indicates that some extra setup steps are required.
-
-                       In most cases it is required to fill in the APN
-                       details.
-
-               string APN [readwrite]
-
-                       If the service is Cellular, then this property
-                       contains the APN details.
-
-                       The APN is network provider specific and even
-                       sometimes data plan specific. Possible examples
-                       are "isp.cingular" or "internet.t-mobile".
-
-               string MCC [readonly]
-
-                       If the service is Cellular, then this property
-                       contains the Mobile Country Code.
-
-               string MNC [readonly]
-
-                       If the service is Cellular, then this property
-                       contains the Mobile Network Code.
-
                boolean Roaming [readonly]
 
                        This property indicates if this service is roaming.
@@ -301,8 +256,9 @@ Properties  string State [readonly]
                array{string} Nameservers.Configuration [readwrite]
 
                        The list of manually configured domain name
-                       servers. Some 3G networks don't provide correct
-                       name servers and this allows for an override.
+                       servers. Some cellular networks don't provide
+                       correct name servers and this allows for an
+                       override.
 
                        This array is sorted by priority and the first
                        entry in the list represents the nameserver with
@@ -317,9 +273,32 @@ Properties string State [readonly]
                        the service. However there might be small window
                        where name resolution might fail.
 
+               array{string} Timeservers [readonly]
+
+                       The list of currently active timeservers for this
+                       service. If the server is not in READY or ONLINE
+                       state than this list will be empty.
+
+               array{string} Timeservers.Configuration [readwrite]
+
+                       The list of manually configured time servers.
+
+                       The first entry in the list represents the
+                       timeserver with the highest priority.
+
+                       When using manual configuration this setting
+                       is useful to override all the other timeserver
+                       settings. This is service specific, hence only
+                       the values for the default service are used.
+
+                       Changes to this property will result in restart
+                       of NTP query.
+
                array{string} Domains [readonly]
 
-                       The list of currently used search domains.
+                       The list of currently used search domains taken
+                       from Domains.Configurations if set, otherwise a
+                       domain name if provided by DHCP or VPNs.
 
                array{string} Domains.Configuration [readwrite]
 
@@ -329,9 +308,15 @@ Properties string State [readonly]
 
                        string Method [readonly]
 
-                               Possible values are "dhcp", "manual"
+                               Possible values are "dhcp", "manual", "auto"
                                and "off".
 
+                               It could be "auto" in case address was got
+                               through IPv4LL after DHCP failed. In this
+                               case also IPv4.Configuration will become
+                               "auto" to allow user to ask for a DHCP
+                               address at any time.
+
                                The value "fixed" indicates an IP address
                                that can not be modified. For example
                                cellular networks return fixed information.
@@ -363,14 +348,16 @@ Properties        string State [readonly]
 
                        string Method [readonly]
 
-                               Possible values are "dhcp", "manual"
+                               Possible values are "auto", "manual", "6to4"
                                and "off".
 
                                The value "fixed" indicates an IP address
                                that can not be modified. For example
                                cellular networks return fixed information.
-
-                               "dhcp" is not supported currently.
+                               The value "6to4" is returned if 6to4 tunnel
+                               is created by connman. The tunnel can only be
+                               created if method was set to "auto" by the
+                               user. User cannot set the method to "6to4".
 
                        string Address [readonly]
 
@@ -384,6 +371,26 @@ Properties string State [readonly]
 
                                The current configured IPv6 gateway.
 
+                       string Privacy [readonly]
+
+                               Enable or disable IPv6 privacy extension
+                               that is described in RFC 4941. The value
+                               has only meaning if Method is set to "auto".
+
+                               Value "disabled" means that privacy extension
+                               is disabled and normal autoconf addresses are
+                               used.
+
+                               Value "enabled" means that privacy extension is
+                               enabled and system prefers to use public
+                               addresses over temporary addresses.
+
+                               Value "prefered" means that privacy extension is
+                               enabled and system prefers temporary addresses
+                               over public addresses.
+
+                               Default value is "disabled".
+
                dict IPv6.Configuration [readwrite]
 
                        Same values as IPv6 property. The IPv6 represents
@@ -449,19 +456,19 @@ Properties        string State [readonly]
 
                        string Host [readonly]
 
-                              VPN host IP.
+                               VPN host IP.
 
                        string Domain [readonly]
 
-                              VPN Domain.
+                               VPN Domain.
 
                        string Name [readonly]
 
-                              VPN provider Name.
+                               VPN provider Name.
 
                        string Type [readonly]
 
-                              VPN provider type.
+                               VPN provider type.
 
                dict Ethernet [readonly]
 
@@ -481,18 +488,15 @@ Properties        string State [readonly]
 
                                The Ethernet MTU (default is 1500).
 
-                       uint16 Speed [readonly]
+                       uint16 Speed [readonly] [deprecated]
 
                                Selected speed of the line.
 
-                               This information might not always be
-                               available.
+                               This information is not available.
 
-                       string Duplex [readonly]
+                       string Duplex [readonly] [deprecated]
 
                                Selected duplex settings of the line.
-
                                Possible values are "half" and "full".
 
-                               This information might not always be
-                               available.
+                               This information is not available.