diff options
author | Eric Caruso <ejcaruso@chromium.org> | 2017-12-13 10:17:33 -0800 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2017-12-18 10:16:18 +0100 |
commit | c44b928206c1147bd760b4aef48294d7dda28e24 (patch) | |
tree | 2e88cc80c3268efa1c560e523105dcdff7bc6c5d /src/mm-iface-modem.h | |
parent | 66dce6dacc440d8bfe4270562ef5a840c87e5a04 (diff) |
mm-iface-modem: add check_for_sim_swap method and enable steps
When in low-power mode, some modems will not dispatch unsolicited
notifications, such as for SIM hot swapping. There is code in
MMBroadbandModemTelit to handle this by checking the SIM identifier
during modem power up against the identifier cached in the SIM
D-Bus object. If they're different, the SIM has likely been
swapped while we were powered down.
We can move this code out to MMBroadbandModem because it doesn't
actually rely on any Telit-specific details, and invoke it from
MMIfaceModem via a new method.
Diffstat (limited to 'src/mm-iface-modem.h')
-rw-r--r-- | src/mm-iface-modem.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mm-iface-modem.h b/src/mm-iface-modem.h index d25fbd49..177bf910 100644 --- a/src/mm-iface-modem.h +++ b/src/mm-iface-modem.h @@ -281,6 +281,16 @@ struct _MMIfaceModem { GAsyncResult *res, GError **error); + /* Asynchronous check to see if the SIM was swapped. + * Useful for when the modem changes power states since we might + * not get the relevant notifications from the modem. */ + void (*check_for_sim_swap) (MMIfaceModem *self, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (*check_for_sim_swap_finish) (MMIfaceModem *self, + GAsyncResult *res, + GError **error); + /* Asynchronous flow control setup */ void (*setup_flow_control) (MMIfaceModem *self, GAsyncReadyCallback callback, |