Hi,
I know this has been already discussed sometime ago, in a different proposal
from Daniel* but I would like to raise it again,
with a slightly different solution.
*: see http://lists.connman.net/pipermail/connman/2011-October/006635.html
Problem:
-------
A session is only able to tell if we are online (internet access) or not.
However an application might not care much about being able to access internet,
it might just want to know if we are connected or not.
Currently, if the service goes ready, the session will notify the application
about the ip, bearer... and with online = false.
So of course the application might use the workaround that: "hey, I have an IP
so I am connected."
But somehow I think it's not really nice.
If the service goes online at some point, session will notify the application
dith same date and with online = true.
Solution:
--------
Let's have a "State" string property instead of "Online" boolean property in
the Session API.
Its possible values would be as simple as:
- offline: not connected at all, it has nothing to do with offlinemode. This
means the session is disconnected.
Well if you prefer, we may use "disconnected" instead)
- connected: when service is ready so it got an ip and so on but cannot access
internet.
- online: the service provides an access to internet.
This will not change how current Session code works, and how/when it notifies
the applications. It just makes things nicer, to remove
such workaround I have shown for instance etc...
Of course we can continue with this workaround but imho this is a misuse of the
API.
Br,
Tomasz
_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman