core: keep track of all PIN retry counts
Added a PinRetryCounts property on org.freedesktop.ModemManager.Modem. This is dictionary that records the number of PIN tries remaining for each of the possible PIN code types for which the modem is capable of reporting the count. Also, these counts are kept up to date across ChangePin and EnablePin operations, not just when an unlock is attempted.
This commit is contained in:

committed by
Dan Williams

parent
71598a6289
commit
e7b6b2dc1c
@@ -33,6 +33,8 @@ static void impl_modem_factory_reset (MMModem *modem, const char *code, DBusGMet
|
||||
|
||||
#include "mm-modem-glue.h"
|
||||
|
||||
#define MM_MODEM_PIN_RETRY_COUNTS_PROP_TYPE (dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_UINT))
|
||||
|
||||
static void
|
||||
async_op_not_supported (MMModem *self,
|
||||
MMModemFn callback,
|
||||
@@ -913,6 +915,14 @@ mm_modem_init (gpointer g_iface)
|
||||
0, G_MAXUINT32, 0,
|
||||
G_PARAM_READABLE));
|
||||
|
||||
g_object_interface_install_property
|
||||
(g_iface,
|
||||
g_param_spec_boxed (MM_MODEM_PIN_RETRY_COUNTS,
|
||||
"PinRetryCounts",
|
||||
"The remaining number of attempts for each PIN type",
|
||||
MM_MODEM_PIN_RETRY_COUNTS_PROP_TYPE,
|
||||
G_PARAM_READABLE));
|
||||
|
||||
g_object_interface_install_property
|
||||
(g_iface,
|
||||
g_param_spec_uint (MM_MODEM_HW_VID,
|
||||
|
Reference in New Issue
Block a user