diff options
author | Rukun Mao <rmao@google.com> | 2023-08-11 00:17:06 +0000 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2023-10-11 14:01:33 +0000 |
commit | b7433b4c1499dbdbd7eac10a4ff2111fd4fdd6f4 (patch) | |
tree | 0395e2983232bd293021a6209aeab02b0946fd99 /src/mm-iface-modem.h | |
parent | 4fdda13c4eef051a6f3ffcddbf0c1fc9a67f1271 (diff) |
iface-modem: new logic to detect SIM swap with explicit IMSI/ICCID query
This improves SIM hot swap check process, and it can help avoid unnecessary
modem reprobe during suspend-resume without SIM inserted.
The changes in this CL implemented the new logic ONLY for MBIM, and the
new logic has not been implemented for QMI and AT yet. Thus, we keep the
legacy `mm_iface_modem_check_for_sim_swap()' till the new logic for QMI
and AT has been implemented.
Diffstat (limited to 'src/mm-iface-modem.h')
-rw-r--r-- | src/mm-iface-modem.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/mm-iface-modem.h b/src/mm-iface-modem.h index f6e81f22..37c961d8 100644 --- a/src/mm-iface-modem.h +++ b/src/mm-iface-modem.h @@ -291,14 +291,22 @@ struct _MMIfaceModem { * 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, - const gchar *iccid, - const gchar *imsi, GAsyncReadyCallback callback, gpointer user_data); gboolean (*check_for_sim_swap_finish) (MMIfaceModem *self, GAsyncResult *res, GError **error); + void (*check_basic_sim_details) (MMIfaceModem *self, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (*check_basic_sim_details_finish) (MMIfaceModem *self, + GAsyncResult *res, + gboolean *sim_inserted, + gchar **iccid, + gchar **imsi, + GError **error); + /* Asynchronous flow control setup */ void (*setup_flow_control) (MMIfaceModem *self, GAsyncReadyCallback callback, @@ -599,8 +607,6 @@ void mm_iface_modem_bind_simple_status (MMIfaceModem *self, /* Check if the SIM or eSIM profile has changed */ void mm_iface_modem_check_for_sim_swap (MMIfaceModem *self, - const gchar *iccid, - const gchar *imsi, GAsyncReadyCallback callback, gpointer user_data); gboolean mm_iface_modem_check_for_sim_swap_finish (MMIfaceModem *self, @@ -613,5 +619,4 @@ void mm_iface_modem_modify_sim (MMIfaceModem *self, void mm_iface_modem_process_sim_event (MMIfaceModem *self); - #endif /* MM_IFACE_MODEM_H */ |