### Method

# FwupdPlugin Device retry_add_recovery

#### Declaration [src]

    void
    fu_device_retry_add_recovery (
      FuDevice* self,
      GQuark domain,
      gint code,
      FuDeviceRetryFunc func
    )

#### Description [src]

Sets the optional function to be called when `fu_device_retry()` fails, which is possibly a device reset.

If `func` is `NULL` then recovery is not possible and an error is returned straight away.

Available since: | 1.4.0

#### Parameters

`domain` | `GQuark`
| A `GQuark`, or `0` for all domains.
`code` | `gint`
| A `GError` code.
`func` | `FuDeviceRetryFunc`
| A function to recover the device.
| The argument can be `NULL`.