summaryrefslogtreecommitdiff
path: root/src/mm-iface-modem.h
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2012-12-18 23:38:42 +0100
committerAleksander Morgado <aleksander@lanedo.com>2013-01-08 18:40:47 +0100
commit1372933345b197d89a7e4ae0d5bdcec1fd1e1b2e (patch)
tree908c7103dcf66afcb9090900ada612a6fc66c851 /src/mm-iface-modem.h
parent959bb9d2ffb8bd7a3d701c21ec2cb58cab3717d9 (diff)
downloadModemManager-1372933345b197d89a7e4ae0d5bdcec1fd1e1b2e.tar.gz
iface-modem,sim: improve lock info update logic
The logic to handle the lock information (current lock and unlock retry count) wasn't handling all possible cases properly, e.g.: * When PIN is incorrectly entered too many times, a SIM-PUK error may happen. In this case we need to directly assume SIM-PUK is the current lock (some modems, like Option HSO ones, would incorrectly reply SIM-PIN if CPIN? asked just after the SIM-PUK error). * After every operation acting in SIM locks, we need to update the current unlock retry count. This change tries to cover those cases, by: * The logic to check current lock is extended to also load the unlock retry count when needed. * Whenever a SIM-PUK error happens in the SIM operations, we directly assume that SIM-PUK is required, without re-asking CPIN?. * The overall logic of lock checking is now handled by a state machine, which is much easier to understand.
Diffstat (limited to 'src/mm-iface-modem.h')
-rw-r--r--src/mm-iface-modem.h26
1 files changed, 10 insertions, 16 deletions
diff --git a/src/mm-iface-modem.h b/src/mm-iface-modem.h
index 52b0d8eb4..23dac75b5 100644
--- a/src/mm-iface-modem.h
+++ b/src/mm-iface-modem.h
@@ -365,23 +365,17 @@ gboolean mm_iface_modem_disable_finish (MMIfaceModem *self,
/* Shutdown Modem interface */
void mm_iface_modem_shutdown (MMIfaceModem *self);
-/* Request unlock recheck.
+/* Request lock info update.
* It will not only return the lock status, but also set the property values
- * in the DBus interface. */
-void mm_iface_modem_unlock_check (MMIfaceModem *self,
- GAsyncReadyCallback callback,
- gpointer user_data);
-MMModemLock mm_iface_modem_unlock_check_finish (MMIfaceModem *self,
- GAsyncResult *res,
- GError **error);
-
-/* Check unlock retries */
-void mm_iface_modem_update_unlock_retries (MMIfaceModem *self,
- GAsyncReadyCallback callback,
- gpointer user_data);
-gboolean mm_iface_modem_update_unlock_retries_finish (MMIfaceModem *self,
- GAsyncResult *res,
- GError **error);
+ * in the DBus interface. If 'known_lock' is given, that lock status will be
+ * assumed. */
+void mm_iface_modem_update_lock_info (MMIfaceModem *self,
+ MMModemLock known_lock,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+MMModemLock mm_iface_modem_update_lock_info_finish (MMIfaceModem *self,
+ GAsyncResult *res,
+ GError **error);
/* Request signal quality check update.
* It will not only return the signal quality status, but also set the property