FwupdPlugin.Device.retry_add_recovery

### Method

# FwupdPlugin Deviceretry_add_recovery

since: 1.4.0

#### 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`

  Type: `GQuark`

  A `GQuark`, or `0` for all domains.

`code`

  Type: `gint`

  A `GError` code.

`func`

  Type: `FuDeviceRetryFunc`

  A function to recover the device.

  The argument can be `NULL`.