Commit Graph
37 Commits
Author SHA1 Message Date
Aleksander Morgado d27e40ae9a core: new `Initializing' state in the global modem state machine
We need to define a state to be used while the modem is being initialized, so
that we forbid any operation on the modem on already exported interfaces, while
there are interfaces pending to get exported.

This Initializing state will also cover the state between having the SIM
unlocked (which launches re-initialization) and being completely initialized.
2012-03-16 14:53:24 +01:00
Aleksander Morgado 6de2e3f72c sim: don't require the Modem object in the context
It's already easily available in self->priv->modem;
2012-03-16 14:53:24 +01:00
Aleksander Morgado cdd339f802 base-modem: implement new modem-wide cancellable, and rework AT commands
Instead of the `_in_port()' variants, we'll provide more generic
`_full()' methods. These should be used either if we want to send commands
to a specific port, or if we want to use a specific user-provided GCancellable.

In addition to this user-provided GCancellable, we keep the internal modem-wide
one.
2012-03-16 14:53:23 +01:00
Aleksander Morgado cc6d4a97fb base-modem: new port getters and peekers
* mm_base_modem_peek_port_* () will return either a port object (no new
reference), or NULL if none available.

You would usually peek() a port if you're going to use it just in the current
method, as there is no way to that reference to get invalid (we're single
threaded).

 * mm_base_modem_get_port_* () will return either NEW references to valid
port objects, or NULL if none available.

And, you would usually get() a port, whenever you want the port object to be
valid even out of the current method, for example when keeping it in the
context of an async operation.

Also, we need to consider that the primary AT port MAY BE NULL when you
peek() or get() it. This is due to the fact that we may be releasing ports
(due to device disconnection) in the middle of async operations.
2012-03-16 14:53:23 +01:00
Aleksander Morgado 41fe01b217 sim: update unlock retry counts after PIN change/enable operations 2012-03-16 14:53:20 +01:00
Aleksander Morgado a797d6d683 sim: signal when the pin lock enabling status changes 2012-03-16 14:53:18 +01:00
Aleksander Morgado 454e3ab361 sim: include policy authorization checks 2012-03-16 14:53:16 +01:00
Aleksander Morgado c89fd703bb sim: allow subclasses to specify they can't load property values 2012-03-15 14:15:06 +01:00
Aleksander Morgado 7bc586258d sim: leave up to 10s for CRSM queries 2012-03-15 14:15:01 +01:00
Aleksander Morgado c2e750d5bf sim: avoid passing source of the async object in finish 2012-03-15 14:14:58 +01:00
Aleksander Morgado 93a776b17c sim: allow subclassing pin change/enabling 2012-03-15 14:14:55 +01:00
Aleksander Morgado c65c5aedc3 sim: allow subclassing pin/puk sending operations 2012-03-15 14:14:55 +01:00
Aleksander Morgado 72afc058bf sim: allow subclassing the SIM object
Plugins can subclass the MMSim object and provide custom implementations of the
actions performed by the object.
2012-03-15 14:14:55 +01:00
Aleksander Morgado 24c28c2692 sim: export only valid objects 2012-03-15 14:14:55 +01:00
Aleksander Morgado 7e36f04b37 core: use new enums/flags string getters/builders 2012-03-15 14:14:52 +01:00
Aleksander Morgado 816a1318cb sim: minor code simplification 2012-03-15 14:14:47 +01:00
Aleksander Morgado a534afa84d sim: handle initialization failures properly
We should't use MM_SIM() on possibly NULL values.
2012-03-15 14:14:47 +01:00
Aleksander Morgado 8c0d67a81a sim: use g_clear_object() before setting new objects 2012-03-15 14:14:44 +01:00
Aleksander Morgado 7d2626ea44 sim: new SIM path getter 2012-03-15 14:14:41 +01:00
Aleksander Morgado 937baa1a0a sim: allow sending PIN code internally, not just via DBus 2012-03-15 14:14:36 +01:00
Aleksander Morgado cadc27ca0e core,libmm-glib: include ony `libmm-common.h'
Don't include one by one all the headers from libmm-common, just include the
global `libmm-common.h' which includes all the others.
2012-03-15 14:14:34 +01:00
Aleksander Morgado a7acdcd071 sim: only unexport object if currently exported
Avoid trying to unexport the object if it was never exported before.
2012-03-15 14:14:32 +01:00
Aleksander Morgado ad1c7d8dec sim: bind connection property right away 2012-03-15 14:14:32 +01:00
Aleksander Morgado b435012eb1 sim: make sure we unexport the SIM object when destroying it
Usually, if not always, the connection stored in the SIM object never exists
when disposing it, as we clear the connection property in the Modem object
before destroying it, and both properties are bound. But just in case, in order
to avoid ending up with a zombie object in DBus, we make sure we unexport it.
2012-03-15 14:14:32 +01:00
Aleksander Morgado 3164f5512d sim: plug memleak, free path on finalize() 2012-03-15 14:14:31 +01:00
Aleksander Morgado fb90f205d1 core: port to use the new AT command/sequences in the MMBaseModem API 2012-03-15 14:14:31 +01:00
Aleksander Morgado ec1d94044f sim: during init, fall down to next states directly 2012-03-15 14:14:26 +01:00
Aleksander Morgado c58db4e015 core: start using our newly defined errors 2012-03-15 14:14:25 +01:00
Aleksander Morgado c2eac91b78 sim: handle SendPin() and SendPuk() calls 2012-03-15 14:14:23 +01:00
Aleksander Morgado 995e7ace07 sim: handle EnablePin() calls 2012-03-15 14:14:23 +01:00
Aleksander Morgado b29a8ba44f sim: handle ChangePin() calls 2012-03-15 14:14:23 +01:00
Aleksander Morgado 23dd4d7e82 sim: allow re-launching initialization
It may happen that we cannot load property values when the SIM is locked, so
we need to enable re-launching initialization in the object API.
2012-03-15 14:14:23 +01:00
Aleksander Morgado ff0136ed04 sim: load OperatorName during init 2012-03-15 14:14:23 +01:00
Aleksander Morgado e3e3b32b0a sim: load OperatorIdentifier during init 2012-03-15 14:14:23 +01:00
Aleksander Morgado bdd1d23ed2 sim: load IMSI during init 2012-03-15 14:14:23 +01:00
Aleksander Morgado 87823387f4 sim: load SIM Identifier during init 2012-03-15 14:14:23 +01:00
Aleksander Morgado e40d32ac94 core: new MMSim object, inherits from MmGdbusSim 2012-03-15 14:14:23 +01:00