MMUnlockRetries

## MMUnlockRetries MMUnlockRetries — Helper object to report unlock retries. |

## Synopsis

    struct              MMUnlockRetries;
    #define             MM_UNLOCK_RETRIES_UNKNOWN

    guint               mm_unlock_retries_get               (MMUnlockRetries *self,
                                                             MMModemLock lock);
    void                (*MMUnlockRetriesForeachCb)         (MMModemLock lock,
                                                             guint count,
                                                             gpointer user_data);
    void                mm_unlock_retries_foreach           (MMUnlockRetries *self,
                                                             MMUnlockRetriesForeachCb callback,
                                                             gpointer user_data);

## Object Hierarchy

      GObject
       +----MMUnlockRetries

## Description

The MMUnlockRetries is an object exposing the unlock retry counts for different MMModemLock values.

This object is retrieved from the MMModem object with either `mm_modem_get_unlock_retries()` or `mm_modem_peek_unlock_retries()`.

## Details

### struct MMUnlockRetries

    struct MMUnlockRetries;

The MMUnlockRetries structure contains private data and should only be accessed using the provided API.

### MM_UNLOCK_RETRIES_UNKNOWN

    #define MM_UNLOCK_RETRIES_UNKNOWN 999

Identifier for reporting unknown unlock retries.

### mm_unlock_retries_get ()

    guint               mm_unlock_retries_get               (MMUnlockRetries *self,
                                                             MMModemLock lock);

Gets the unlock retries for the given `lock`.

`self` : | a MMUnlockRetries.
`lock` : | a MMModemLock.
Returns : | the unlock retries or `MM_UNLOCK_RETRIES_UNKNOWN` if unknown.

### MMUnlockRetriesForeachCb ()

    void                (*MMUnlockRetriesForeachCb)         (MMModemLock lock,
                                                             guint count,
                                                             gpointer user_data);

Specifies the type of function passed to `mm_unlock_retries_foreach()`.

`lock` : | a MMModemLock.
`count` : | the number of retries left for `lock`.
`user_data` : | data passed to the function.

### mm_unlock_retries_foreach ()

    void                mm_unlock_retries_foreach           (MMUnlockRetries *self,
                                                             MMUnlockRetriesForeachCb callback,
                                                             gpointer user_data);

Executes `callback` for each lock information found in `self`.

`self` : | a `MMUnlockRetries`.
`callback` : | callback to call for each available lock.
`user_data` : | data to pass to `callback`.