Adding connman-test subpackage
[framework/connectivity/connman.git] / doc / service-api.txt
index ea725b5..ffd16b0 100644 (file)
@@ -1,8 +1,8 @@
 Service hierarchy
 =================
 
 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()
 Object path    [variable prefix]/{service0,service1,...}
 
 Methods                dict GetProperties()
@@ -57,6 +57,9 @@ Methods               dict GetProperties()
                        unplug the cable. When no cable is plugged in this
                        method will fail.
 
                        unplug the cable. When no cable is plugged in this
                        method will fail.
 
+                       This method can also be used to abort a previous
+                       connectiong attempt via the Connect method.
+
                        Possible Errors: [service].Error.InvalidArguments
 
                void Remove()
                        Possible Errors: [service].Error.InvalidArguments
 
                void Remove()
@@ -71,6 +74,10 @@ Methods              dict GetProperties()
                        This is similar to setting the Favorite property
                        to false, but that is currently not supported.
 
                        This is similar to setting the Favorite property
                        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.
+
                        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 will cause
                        an error message. It is not possible to remove these
                        kind of devices.
@@ -97,6 +104,12 @@ Methods             dict GetProperties()
 
                        Possible Errors: [service].Error.InvalidArguments
 
 
                        Possible Errors: [service].Error.InvalidArguments
 
+               void ResetCounters()
+
+                       Reset the counter statistics.
+
+                       Possible Errors: None
+
 Signals                PropertyChanged(string name, variant value)
 
                        This signal indicates a changed value of the given
 Signals                PropertyChanged(string name, variant value)
 
                        This signal indicates a changed value of the given
@@ -107,14 +120,19 @@ Properties        string State [readonly]
                        The service state information.
 
                        Valid states are "idle", "failure", "association",
                        The service state information.
 
                        Valid states are "idle", "failure", "association",
-                       "configuration" and "ready".
+                       "configuration", "ready" and "online".
+
+                       The "ready" state signals a successfully
+                       connected device. "online" signals that an
+                       Internet connection is available and has been
+                       verified.
 
                string Error [readonly]
 
                        The service error status details.
 
                        When error occur during connection or disconnection
 
                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.
 
                        property to help the user interface to present the
                        user with alternate options.
 
@@ -142,33 +160,71 @@ Properties        string State [readonly]
                        advanced properties or showing the correct icon
                        to the user.
 
                        advanced properties or showing the correct icon
                        to the user.
 
-               string Mode [readonly]
+               array{string} Security [readonly]
 
                        If the service type is WiFi, then this property is
 
                        If the service type is WiFi, then this property is
-                       present and contains the mode of the network. The
-                       possible values are "managed" or "adhoc".
+                       present and contains the list of security methods
+                       or key management settings.
+
+                       Possible values are "none", "wep", "psk", "ieee8021x"
+                       and also "wps". Alternate values for "psk" can also
+                       be "wpa" and "rsn".
 
                        This property might be only present for WiFi
                        services.
 
 
                        This property might be only present for WiFi
                        services.
 
-               string Security [readonly]
-
-                       If the service type is WiFi, then this property is
-                       present and contains the security method or key
-                       management setting.
-
-                       Possible values are "none", "wep", "wpa" and "rsn".
+               boolean LoginRequired [readonly]
 
 
-                       This property might be only present for WiFi
-                       services.
+                       This property indicates that an additional login
+                       step, like web based authentication, 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.
 
 
                string Passphrase [readwrite]
 
                        If the service type is WiFi, then this property
                        can be used to store a passphrase.
 
-                       This property is still experimental and might be
-                       removed in future version.
+                       No PropertyChanged signals will be sent 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.
+
+               string BSSID [readonly]
+
+                       If the service type is WiFi, then this property
+                       indicates the BSSID of the service.
+
+               uint32 MaxRate [readonly]
+
+                       If the service type is WiFi, then this property
+                       indicates the Maximum speed(bps) of the service.
+
+               uint16 Frequency [readonly]
+
+                       If the service type is WiFi, then this property
+                       indicates the frequency band(MHz) of the service.
+
+               string EncryptionMode [readonly]
+
+                       If the service type is WiFi, then this property
+                       indicates the key encryption mode.
+
+                       Possible values are "none", "wep", "tkip", "aes"
+                       and "mixed".
+
+                       This property might be only present for WiFi
+                       services.
 
                uint8 Strength [readonly]
 
 
                uint8 Strength [readonly]
 
@@ -183,16 +239,270 @@ Properties       string State [readonly]
                        Will be true if a cable is plugged in or the user
                        selected and successfully connected to this service.
 
                        Will be true if a cable is plugged in or the user
                        selected and successfully connected to this service.
 
-                       Setting this property to true has no effect at all
-                       and setting it to false is similar to the Remove()
-                       method. So for now it will be considered a read
-                       only property.
+                       This value is automatically changed and to revert
+                       it back to false the Remove() method needs to be
+                       used.
+
+               boolean Immutable [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.
+
+               boolean AutoConnect [readwrite]
+
+                       If set to true, this service will auto-connect
+                       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 Roaming [readonly]
+
+                       This property indicates if this service is roaming.
+
+                       In the case of Cellular services this normally
+                       indicates connections to a foreign provider when
+                       traveling abroad.
+
+               array{string} Nameservers [readonly]
+
+                       The list of currently active nameservers for this
+                       service. If the server is not in READY or ONLINE
+                       state than this list will be empty.
+
+                       Global nameservers are automatically added to this
+                       list. The array represents a sorted list of the
+                       current nameservers. The first one has the highest
+                       priority and is used by default.
+
+                       When using DHCP this array represents the nameservers
+                       provided by the network. In case of manual settings,
+                       the ones from Nameservers.Configuration are used.
+
+               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.
+
+                       This array is sorted by priority and the first
+                       entry in the list represents the nameserver with
+                       the highest priority.
+
+                       When using manual configuration and no global
+                       nameservers are configured, then it is useful
+                       to configure this setting.
+
+                       Changes to the domain name servers can be done
+                       at any time. It will not cause a disconnect of
+                       the service. However there might be small window
+                       where name resolution might fail.
+
+               array{string} Domains [readonly]
+
+                       The list of currently used search domains.
+
+               array{string} Domains.Configuration [readwrite]
+
+                       The list of manually configured search domains.
+
+               dict IPv4 [readonly]
+
+                       string Method [readonly]
+
+                               Possible values are "dhcp", "manual"
+                               and "off".
+
+                               The value "fixed" indicates an IP address
+                               that can not be modified. For example
+                               cellular networks return fixed information.
+
+                       string Address [readonly]
+
+                               The current configured IPv4 address.
+
+                       string Netmask [readonly]
+
+                               The current configured IPv4 netmask.
+
+                       string Gateway [readonly]
+
+                               The current configured IPv4 gateway.
+
+               dict IPv4.Configuration [readwrite]
+
+                       Same values as IPv4 property. The IPv4 represents
+                       the actual system configuration while this allows
+                       user configuration.
+
+                       Changing these settings will cause a state change
+                       of the service. The service will become unavailable
+                       until the new configuration has been successfully
+                       installed.
+
+               dict IPv6 [readonly]
+
+                       string Method [readonly]
+
+                               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.
+                               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]
+
+                               The current configured IPv6 address.
+
+                       uint8 PrefixLength [readonly]
+
+                               The prefix length of the IPv6 address.
+
+                       string Gateway [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
+                       the actual system configuration while this allows
+                       user configuration.
+
+                       Changing these settings will cause a state change
+                       of the service. The service will become unavailable
+                       until the new configuration has been successfully
+                       installed.
+
+               dict Proxy [readonly]
+
+                       string Method [readonly]
+
+                               Possible values are "direct", "auto" and
+                               "manual".
+
+                               In case of "auto" method, the URL file can be
+                               provided unless you want to let DHCP/WPAD
+                               auto-discover to be tried. In such case if DHCP
+                               and WPAD auto-discover methods fails then
+                               method will be "direct".
+
+                               In case of "direct" no additional information
+                               are provided. For the "manual" method the
+                               Servers have to be set, Excludes is optional.
+
+                       string URL [readonly]
+
+                               Automatic proxy configuration URL. Used by
+                               "auto" method.
+
+                       array{string} Servers [readonly]
+
+                               Used when "manual" method is set.
+
+                               List of proxy URIs. The URI without a protocol
+                               will be interpreted as the generic proxy URI.
+                               All others will target a specific protocol and
+                               only once.
+
+                               Example for generic proxy server entry would
+                               be like this: "server.example.com:911".
+
+                       array{string} Excludes [readonly]
+
+                               Used when "manual" method is set.
+
+                               List of hosts which can be accessed directly.
+
+               dict Proxy.Configuration [readwrite]
+
+                       Same values as Proxy property. The Proxy represents
+                       the actual system configuration while this allows
+                       user configuration.
+
+                       If "auto" method is set with an empty URL, then
+                       DHCP/WPAD auto-discover will be tried. Otherwise the
+                       specified URL will be used.
+
+               dict Provider [readonly]
+
+                       string Host [readonly]
+
+                              VPN host IP.
+
+                       string Domain [readonly]
+
+                              VPN Domain.
+
+                       string Name [readonly]
+
+                              VPN provider Name.
+
+                       string Type [readonly]
+
+                              VPN provider type.
+
+               dict Ethernet [readonly]
+
+                       string Method [readonly]
+
+                               Possible values are "auto" and "manual".
+
+                       string Interface [readonly]
+
+                               Interface name (for example eth0).
+
+                       string Address [readonly]
+
+                               Ethernet device address (MAC address).
+
+                       uint16 MTU [readonly]
+
+                               The Ethernet MTU (default is 1500).
+
+                       uint16 Speed [readonly]
+
+                               Selected speed of the line.
+
+                               This information might not always be
+                               available.
 
 
-               string IPv4.Method [readwrite]
+                       string Duplex [readonly]
 
 
-                       The IPv4 configuration method. Possible values here
-                       are "dhcp" and "static".
+                               Selected duplex settings of the line.
 
 
-               string IPv4.Address [readwrite]
+                               Possible values are "half" and "full".
 
 
-                       The current configured IPv4 address.
+                               This information might not always be
+                               available.