From: Daniel Wagner <[email protected]>

Instead of only having Offline and Online, report 4 states
online, offline, connecting and suspended.
---
 doc/session-api.txt |   45 +++++++++++++++++++++++++++++++++++----------
 1 files changed, 35 insertions(+), 10 deletions(-)

diff --git a/doc/session-api.txt b/doc/session-api.txt
index 3a0c9ca..600f057 100644
--- a/doc/session-api.txt
+++ b/doc/session-api.txt
@@ -90,20 +90,45 @@ Settings    string  Bearer [readonly]
                        for this session. Or an empty string if no bearer
                        is available.
 
-               boolean Online [readonly]
+               string  State [readonly]
 
-                       This indicates if the connection is online or
-                       offline.
+                       This indicates the state of the session.
 
-                       This maps to the online service state. And it is
+                       Valid states are "offline", "connecting",
+                       "online" and "suspended".
+
+                       This maps to the service states. 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
-                       can be delayed based on the speed of the bearer. It
-                       is done to avoid congestion on bearers like 3G etc.
+                       The "offline" state indicates that no services for
+                       a given session are online. "connecting" is indicating
+                       that the session has called Service.Connect()
+                       and if this call is successful the next state
+                       indicated is "online". The application could
+                       use the "connecting" state for starting to draw an
+                       animation.
+
+                       If the Service.Connect() is not successful
+                       the next state will be "offline". If the
+                       application has started to draw an animation on
+                       the "connecting" state it should stop drawing when
+                       "offline".
+
+                       "suspend" state indicates the special case when a
+                       GSM connection is used and a voice call is accepted.
+                       GSM cannot handle data and voice connection at the
+                       same time. "suspend" lets the application know that
+                       the data link is suspended and therefore any IP
+                       traffic is stalled. The application should also stop all
+                       timeouts etc. during this period, because after
+                       terminating the voice call the data link should recover
+                       again without any IP changes.
+
+                       In addition the notification sent upon a state change
+                       might not happen right away. Notifications of
+                       "connecting" and "online" state can be delayed based
+                       on the speed of the bearer. This is done to avoid
+                       congestion on bearers like cellular etc.
 
                boolean Priority [readwrite]
 
-- 
1.7.4.4

_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman

Reply via email to