technology: return already enabled when tethering is enabled
[framework/connectivity/connman.git] / doc / session-api.txt
index e20449b..e19c6bf 100644 (file)
@@ -51,9 +51,9 @@ Methods               void Destroy()
                        Depending on the bearer settings the current service
                        is used or a new service will be connected.
 
                        Depending on the bearer settings the current service
                        is used or a new service will be connected.
 
-                       This method returns when the connection has been
-                       established and it is online. Additionally an update
-                       notification with the IP settings is sent.
+                       This method returns immediately after it has been
+                       called. The application is informed through the update
+                       notification about the state of the session.
 
                        It is also not guaranteed that a session stays online
                        after this method call. It can be taken offline at any
 
                        It is also not guaranteed that a session stays online
                        after this method call. It can be taken offline at any
@@ -68,9 +68,9 @@ Methods               void Destroy()
                        This method indicates that the current session does
                        not need a connection anymore.
 
                        This method indicates that the current session does
                        not need a connection anymore.
 
-                       In most cases this method returns right away without
-                       any delays. However in some cases it might take a few
-                       seconds before a connection can be terminated.
+                       This method returns immediately. The application is
+                       informed through the update notification about the
+                       state of the session.
 
                void Change(string name, variant value)
 
 
                void Change(string name, variant value)
 
@@ -88,22 +88,45 @@ Settings    string  Bearer [readonly]
 
                        This indicates the current bearer that is used
                        for this session. Or an empty string if no bearer
 
                        This indicates the current bearer that is used
                        for this session. Or an empty string if no bearer
-                       is available.
-
-               boolean Online [readonly]
-
-                       This indicates if the connection is online or
-                       offline.
-
-                       This maps to the online service state. And it is
-                       only valid for the selected bearer configuration.
-                       Otherwise it will be reported as offline even if
-                       the global state would be online.
-
-                       In addition the Online settings notification might
-                       not happen right away. Notifications of online state
+                       if available.
+
+               string ConnectionType [readwrite]
+
+                       This is used to indicate which connection is requested
+                       from the session. The state of the session will be
+                       updated accordingly. Values can be nothing, 'local' or
+                       'internet'.
+                       'local' means the session requests to be connected,
+                       but does not require specifically to be online.
+                       Therefore State property will be set to 'connected' if
+                       underlying service gets ready and/or online.
+                       'online' means the session requests to be connected,
+                       and online. State property will never get 'connected'
+                       but instead will switch to 'online' if underlying
+                       service gets online.
+                       No value means the session requests any kind of
+                       connection and the state will be updated on all steps,
+                       'connected' and 'online'. This is the default value.
+
+               boolean State [readonly]
+
+                       This indicates if the connection is disconnected,
+                       connected or online. It is updated according to the
+                       selected ConnectionType. The session will not be
+                       in a useful shape (i.e.: providing a network connection
+                       to the owner) until its State gets updated to connected
+                       and/or online.
+
+                       This maps to the useful port of the  service state.
+                       And it is only valid for the selected bearer
+                       configuration. Otherwise it will be reported as
+                       disconnected even if connected services are present.
+
+                       In addition the State settings notification might
+                       not happen right away. Notifications of this state
                        can be delayed based on the speed of the bearer. It
                        can be delayed based on the speed of the bearer. It
-                       is done to avoid congestion on bearers like 3G etc.
+                       is done to avoid congestion on bearers like cellular
+                       etc.
 
                boolean Priority [readwrite]
 
 
                boolean Priority [readwrite]
 
@@ -147,17 +170,21 @@ Settings  string  Bearer [readonly]
                        In general this list should be empty to indicate that
                        any bearer is acceptable.
 
                        In general this list should be empty to indicate that
                        any bearer is acceptable.
 
+                       The order of the entries in AllowedBearers matters.
+                       The services are sorted in the order of the bearer
+                       entries in this list.
+
+                       Also "*" matches any bearer. This is usefull to prefer
+                       certain bearers such as Wifi with a fallback to any
+                       other available bearer.
+
                dict IPv4 [readonly]
 
                dict IPv4 [readonly]
 
-                       Current IPv4 configuration. This settings is only
-                       valid when online is true as well. Otherwise an
-                       empty dictionary is reported.
+                       Current IPv4 configuration.
 
                dict IPv6 [readonly]
 
 
                dict IPv6 [readonly]
 
-                       Current IPv6 configuration. This setting is only
-                       valid when online is true as well. Otherwise an
-                       empty dictionary is reported.
+                       Current IPv6 configuration.
 
                boolean AvoidHandover [readwrite]
 
 
                boolean AvoidHandover [readwrite]
 
@@ -229,11 +256,28 @@ Settings  string  Bearer [readonly]
                        modem. The Emergency is true if an emergency call or
                        related operation is currently active.
 
                        modem. The Emergency is true if an emergency call or
                        related operation is currently active.
 
+                       If the emergency application sets this setting to true
+                       all other session will be informed about the emergency
+                       situation with setting it also to true. Only the
+                       emergency application can set back to false.
+
+                       As long the EmergencyCall is true no new session can
+                       be created.
+
                        Only one application is supposed to write this setting
                        and therefore it will be protected by additional
                        PolicyKit rule so that only the emergency application
                        can write.
 
                        Only one application is supposed to write this setting
                        and therefore it will be protected by additional
                        PolicyKit rule so that only the emergency application
                        can write.
 
+                       The emergency application is expected to call Connect()
+                       after setting this setting true. If the emergency
+                       situation is over the application should call
+                       Disconnect() and also set the EmergencyCall to false
+                       afterward.
+
+                       Note only services matching the AllowedBearers rule
+                       will be considered.
+
                string  RoamingPolicy [readwrite]
 
                        The allowed roaming behavior.
                string  RoamingPolicy [readwrite]
 
                        The allowed roaming behavior.