Hi Wagi,

> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of Daniel Wagner
> Sent: Thursday, October 13, 2011 11:05 PM
> To: [email protected]
> Cc: Daniel Wagner
> Subject: [RFC v2 5/7] session: Change "Online" to "State"
> 
> 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".

I have two questions:

1. How to deal with service.State = 'ready', in which state Service.Connect() 
returns successfully?
2. State here is different than State in ' Session States and Transitions', is 
it possible to use another name?

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

Reply via email to