Split up GPRS into two atoms: GPRS and GPRS Context. GPRS will handle
the areas of GPRS network registration, basic GPRS capability detection
and attach / detach.
GPRS Context will handle setting up / activating / deactivating the
indicidual contexts.
This will allow us to use the generic GPRS atom for most devices while
customizing the GPRS context accordingly.
This commit implements the GPRS context setup and teardown according to
doc/dataconnectionmanager-api.txt
One issue with the AT implementation of the api is that "Powered" (a
read-write property) can be set independently of "Attached" (read-only
property) and remain set when "Attached" is clear. The semantics would
be that the network doesn't have resources to let the modem attach,
but the modem waits for the resources to become available and then
attaches. On AT the modem is in this state only when executing +CGATT,
so currently the code will rerun +CGATT as soon as the previous one
returns with error, probably starving other commands. A possible
workaround would be for "Powered" to flip back to False after the modem
fails to attach once, or give up on having separate properties.
Alternatively we could re-try to attach periodically but on one modem
I've tried +CGATT fails after about 1 minute (that's the Calypso) and
on another only about 0.5s (Nokia phones with AT emulation).
When "Powered" is set and "RoamingAllowed" is clear and we manage to
attach and find that we're roaming, ofono resets "Powered".
We may want to catch the user trying to dial *99***1# which is the
backwards compatibility quirk for old modems (same way ofono parses
USSD strings).
When an active and a waiting call exist, and the active is released the
waiting call becomes incoming. This wasn't properly handled by the
generic at driver.
We already know the indicators we're interested in from the
specification, malloc/free-ing the indicator names is thus pointless.
Instead save off the indicator index positions in an array. Parse the
current values instead of storing the unparsed list.
Empty SMS messages are in sms_decode_text are returned as NULL, e.g.
error. This shouldn't be the case, empty messages should be reported
and signaled.