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
@@ -47,6 +47,16 @@ invoke_mm_modem_string_fn (MMCallbackInfo *info)
|
||||
info->error, info->user_data);
|
||||
}
|
||||
|
||||
static void
|
||||
invoke_mm_modem_array_fn (MMCallbackInfo *info)
|
||||
{
|
||||
MMModemArrayFn callback = (MMModemArrayFn) info->callback;
|
||||
|
||||
callback (info->modem,
|
||||
(GArray *) mm_callback_info_get_data (info, CALLBACK_INFO_RESULT),
|
||||
info->error, info->user_data);
|
||||
}
|
||||
|
||||
static void
|
||||
modem_destroyed_cb (gpointer data, GObject *destroyed)
|
||||
{
|
||||
@@ -151,6 +161,16 @@ mm_callback_info_string_new (MMModem *modem,
|
||||
return mm_callback_info_new_full (modem, invoke_mm_modem_string_fn, (GCallback) callback, user_data);
|
||||
}
|
||||
|
||||
MMCallbackInfo *
|
||||
mm_callback_info_array_new (MMModem *modem,
|
||||
MMModemArrayFn callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
g_return_val_if_fail (modem != NULL, NULL);
|
||||
|
||||
return mm_callback_info_new_full (modem, invoke_mm_modem_array_fn, (GCallback) callback, user_data);
|
||||
}
|
||||
|
||||
gpointer
|
||||
mm_callback_info_get_result (MMCallbackInfo *info)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user