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-modem.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-modem.c')
-rw-r--r-- | src/mm-modem.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mm-modem.c b/src/mm-modem.c index 4447a360..0b31108b 100644 --- a/src/mm-modem.c +++ b/src/mm-modem.c @@ -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, @@ -915,6 +917,14 @@ mm_modem_init (gpointer g_iface) 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, "Hardware vendor ID", "Hardware vendor ID", |