diff options
author | Eric Shienbrood <ers@chromium.org> | 2011-11-16 17:42:50 -0600 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2011-11-16 17:42:50 -0600 |
commit | e7b6b2dc1c709ae877e3cd472d4134b918bb5fb7 (patch) | |
tree | 00307c0559926bddad575ca85f1bffab43105b56 /src/mm-callback-info.c | |
parent | 71598a628987162196b98124486ad8e728852ec5 (diff) |
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.
Diffstat (limited to 'src/mm-callback-info.c')
-rw-r--r-- | src/mm-callback-info.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/mm-callback-info.c b/src/mm-callback-info.c index 302a8160..c738b704 100644 --- a/src/mm-callback-info.c +++ b/src/mm-callback-info.c @@ -48,6 +48,16 @@ invoke_mm_modem_string_fn (MMCallbackInfo *info) } 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) { MMCallbackInfo *info = data; @@ -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) { |