diff options
author | Torsten Hilbrich <torsten.hilbrich@secunet.com> | 2014-11-12 12:45:38 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2014-11-12 13:13:11 +0100 |
commit | bc410ce03f6bfbfc970a89d79f200cece4c582de (patch) | |
tree | 87ea1ce1c104376cbce195b7041bb0dfbd7fb0ce /src/mm-modem-helpers-qmi.c | |
parent | d44690489b57969bfdc44ebfcbfefce6cf3c5b42 (diff) |
qmi: retrieve MM_MODEM_3GPP_FACILITY_SIM
This facility cannot be retrieved via 'DMS UIM Get CK Status' and seems
currently unimplemented for mm-broadband-modem-qmi. The SIM enabled
status is however available via 'DMS UIM Get PIN Status'.
Using this message to add the retrieval of PIN status just after the
other facilities were queried.
Succesfully tested with Gobi2000 (05c6:9205), both retrieval of 3gpp
SIM lock status and enabling/disabling the PIN.
Diffstat (limited to 'src/mm-modem-helpers-qmi.c')
-rw-r--r-- | src/mm-modem-helpers-qmi.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/mm-modem-helpers-qmi.c b/src/mm-modem-helpers-qmi.c index c673697f..7e385320 100644 --- a/src/mm-modem-helpers-qmi.c +++ b/src/mm-modem-helpers-qmi.c @@ -98,6 +98,32 @@ mm_modem_lock_from_qmi_uim_pin_status (QmiDmsUimPinStatus status, /*****************************************************************************/ +gboolean +mm_pin_enabled_from_qmi_uim_pin_status (QmiDmsUimPinStatus status) +{ + switch (status) { + case QMI_DMS_UIM_PIN_STATUS_ENABLED_NOT_VERIFIED: + case QMI_DMS_UIM_PIN_STATUS_ENABLED_VERIFIED: + case QMI_DMS_UIM_PIN_STATUS_BLOCKED: + case QMI_DMS_UIM_PIN_STATUS_PERMANENTLY_BLOCKED: + case QMI_DMS_UIM_PIN_STATUS_UNBLOCKED: + case QMI_DMS_UIM_PIN_STATUS_CHANGED: + /* assume the PIN to be enabled then */ + return TRUE; + + case QMI_DMS_UIM_PIN_STATUS_DISABLED: + case QMI_DMS_UIM_PIN_STATUS_NOT_INITIALIZED: + /* assume the PIN to be disabled then */ + return FALSE; + + default: + /* by default assume disabled */ + return FALSE; + } +} + +/*****************************************************************************/ + QmiDmsUimFacility mm_3gpp_facility_to_qmi_uim_facility (MMModem3gppFacility mm) { |