diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2012-03-01 00:22:22 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2012-03-16 14:53:19 +0100 |
commit | 3ccc78e8588acec9632863d30e310cdc76ad8598 (patch) | |
tree | dbf0d5777866b07d571d2167d350e7385677a463 /libmm-glib/mm-modem.c | |
parent | 036711eb1cea191e7acc3c3858eebef850238fa6 (diff) |
api: `UnlockRetries' will reply a list of per-lock retry counts
Equivalent to `PinRetryCount' in the previous API. We don't have an additional
property for the retry count of the current lock, as it really is duplicating
information.
Diffstat (limited to 'libmm-glib/mm-modem.c')
-rw-r--r-- | libmm-glib/mm-modem.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/libmm-glib/mm-modem.c b/libmm-glib/mm-modem.c index 8157f4e6..5edf6abd 100644 --- a/libmm-glib/mm-modem.c +++ b/libmm-glib/mm-modem.c @@ -517,18 +517,22 @@ mm_modem_get_unlock_required (MMModem *self) * mm_modem_get_unlock_retries: * @self: A #MMModem. * - * Gets the number of unlock retries remaining for the lock code given by the - * UnlockRequired property (if any), or 999 if the device does not support reporting - * unlock retries. + * TODO * - * Returns: The number of unlock retries. + * Returns: a new reference to a #MMUnlockRetries object. */ -guint +MMUnlockRetries * mm_modem_get_unlock_retries (MMModem *self) { - g_return_val_if_fail (MM_GDBUS_IS_MODEM (self), 0); + MMUnlockRetries *unlock_retries; + GVariant *dictionary; + + g_return_val_if_fail (MM_GDBUS_IS_MODEM (self), NULL); + + dictionary = mm_gdbus_modem_get_unlock_retries (self); + unlock_retries = mm_unlock_retries_new_from_dictionary (dictionary); - return mm_gdbus_modem_get_unlock_retries (self); + return unlock_retries; } /** |