/*
 * This file is auto-generated, do not modify!
 *
 * SPDX-License-Identifier: LGPL-2.1-or-later
 */

#pragma once
#include <fu-input-stream.h>
/**
 * FuLogitechHidppRdfuReportId:
 *
 * the same as FuLogitechHidppReportId, need for the header
 */
typedef enum {
    /**
     * FU_LOGITECH_HIDPP_RDFU_REPORT_ID_SHORT:
     */
    FU_LOGITECH_HIDPP_RDFU_REPORT_ID_SHORT = 0x10,
    /**
     * FU_LOGITECH_HIDPP_RDFU_REPORT_ID_LONG:
     */
    FU_LOGITECH_HIDPP_RDFU_REPORT_ID_LONG = 0x11,
    /**
     * FU_LOGITECH_HIDPP_RDFU_REPORT_ID_VERY_LONG:
     */
    FU_LOGITECH_HIDPP_RDFU_REPORT_ID_VERY_LONG = 0x12,
    /**
     * FU_LOGITECH_HIDPP_RDFU_REPORT_ID_NOTIFICATION:
     */
    FU_LOGITECH_HIDPP_RDFU_REPORT_ID_NOTIFICATION = 0x01,
}  FuLogitechHidppRdfuReportId;
/**
 * FuLogitechHidppRdfuState:
 */
typedef enum {
    /**
     * FU_LOGITECH_HIDPP_RDFU_STATE_NOT_STARTED:
     */
    FU_LOGITECH_HIDPP_RDFU_STATE_NOT_STARTED,
    /**
     * FU_LOGITECH_HIDPP_RDFU_STATE_TRANSFER:
     */
    FU_LOGITECH_HIDPP_RDFU_STATE_TRANSFER,
    /**
     * FU_LOGITECH_HIDPP_RDFU_STATE_WAIT:
     *
     * waiting for the event from the device
     */
    FU_LOGITECH_HIDPP_RDFU_STATE_WAIT,
    /**
     * FU_LOGITECH_HIDPP_RDFU_STATE_RESUME_DFU:
     *
     * for soft recovery
     */
    FU_LOGITECH_HIDPP_RDFU_STATE_RESUME_DFU,
    /**
     * FU_LOGITECH_HIDPP_RDFU_STATE_APPLY:
     */
    FU_LOGITECH_HIDPP_RDFU_STATE_APPLY,
}  FuLogitechHidppRdfuState;
#define FU_LOGITECH_HIDPP_RDFU_STATE_LAST 5
/**
 * FuLogitechHidppRdfuFunc:
 */
typedef enum {
    /**
     * FU_LOGITECH_HIDPP_RDFU_FUNC_GET_CAPABILITIES:
     */
    FU_LOGITECH_HIDPP_RDFU_FUNC_GET_CAPABILITIES = 0,
    /**
     * FU_LOGITECH_HIDPP_RDFU_FUNC_START_DFU:
     */
    FU_LOGITECH_HIDPP_RDFU_FUNC_START_DFU = 1 << 4,
    /**
     * FU_LOGITECH_HIDPP_RDFU_FUNC_GET_DFU_STATUS:
     */
    FU_LOGITECH_HIDPP_RDFU_FUNC_GET_DFU_STATUS = 2 << 4,
    /**
     * FU_LOGITECH_HIDPP_RDFU_FUNC_APPLY_DFU:
     */
    FU_LOGITECH_HIDPP_RDFU_FUNC_APPLY_DFU = 3 << 4,
    /**
     * FU_LOGITECH_HIDPP_RDFU_FUNC_TRANSFER_DFU_DATA:
     */
    FU_LOGITECH_HIDPP_RDFU_FUNC_TRANSFER_DFU_DATA = 4 << 4,
} G_GNUC_FLAG_ENUM FuLogitechHidppRdfuFunc;
/**
 * FuLogitechHidppRdfuResponseCode:
 *
 * For both status and error codes
 */
typedef enum {
    /**
     * FU_LOGITECH_HIDPP_RDFU_RESPONSE_CODE_DFU_NOT_STARTED:
     *
     * Status Codes
     */
    FU_LOGITECH_HIDPP_RDFU_RESPONSE_CODE_DFU_NOT_STARTED = 0x01,
    /**
     * FU_LOGITECH_HIDPP_RDFU_RESPONSE_CODE_DATA_TRANSFER_READY:
     */
    FU_LOGITECH_HIDPP_RDFU_RESPONSE_CODE_DATA_TRANSFER_READY = 0x02,
    /**
     * FU_LOGITECH_HIDPP_RDFU_RESPONSE_CODE_DATA_TRANSFER_WAIT:
     */
    FU_LOGITECH_HIDPP_RDFU_RESPONSE_CODE_DATA_TRANSFER_WAIT = 0x03,
    /**
     * FU_LOGITECH_HIDPP_RDFU_RESPONSE_CODE_DFU_TRANSFER_COMPLETE:
     */
    FU_LOGITECH_HIDPP_RDFU_RESPONSE_CODE_DFU_TRANSFER_COMPLETE = 0x04,
    /**
     * FU_LOGITECH_HIDPP_RDFU_RESPONSE_CODE_DFU_APPLY_PENDING:
     */
    FU_LOGITECH_HIDPP_RDFU_RESPONSE_CODE_DFU_APPLY_PENDING = 0x05,
    /**
     * FU_LOGITECH_HIDPP_RDFU_RESPONSE_CODE_DFU_TRANSFER_PKT_ACK:
     */
    FU_LOGITECH_HIDPP_RDFU_RESPONSE_CODE_DFU_TRANSFER_PKT_ACK = 0x06,
    /**
     * FU_LOGITECH_HIDPP_RDFU_RESPONSE_CODE_DFU_ABORT:
     */
    FU_LOGITECH_HIDPP_RDFU_RESPONSE_CODE_DFU_ABORT = 0x07,
    /**
     * FU_LOGITECH_HIDPP_RDFU_RESPONSE_CODE_INVALID_MAGIC_STRING:
     *
     * Error Codes
     */
    FU_LOGITECH_HIDPP_RDFU_RESPONSE_CODE_INVALID_MAGIC_STRING = 0x80,
    /**
     * FU_LOGITECH_HIDPP_RDFU_RESPONSE_CODE_INVALID_FW_ENTITY:
     */
    FU_LOGITECH_HIDPP_RDFU_RESPONSE_CODE_INVALID_FW_ENTITY = 0x81,
    /**
     * FU_LOGITECH_HIDPP_RDFU_RESPONSE_CODE_DEVICE_BUSY:
     */
    FU_LOGITECH_HIDPP_RDFU_RESPONSE_CODE_DEVICE_BUSY = 0x82,
    /**
     * FU_LOGITECH_HIDPP_RDFU_RESPONSE_CODE_DEVICE_OPERATION_FAILURE:
     */
    FU_LOGITECH_HIDPP_RDFU_RESPONSE_CODE_DEVICE_OPERATION_FAILURE = 0x83,
    /**
     * FU_LOGITECH_HIDPP_RDFU_RESPONSE_CODE_NOT_SUPPORTED:
     */
    FU_LOGITECH_HIDPP_RDFU_RESPONSE_CODE_NOT_SUPPORTED = 0x84,
    /**
     * FU_LOGITECH_HIDPP_RDFU_RESPONSE_CODE_DFU_STATE_ERROR:
     */
    FU_LOGITECH_HIDPP_RDFU_RESPONSE_CODE_DFU_STATE_ERROR = 0x85,
    /**
     * FU_LOGITECH_HIDPP_RDFU_RESPONSE_CODE_INVALID_BLOCK:
     */
    FU_LOGITECH_HIDPP_RDFU_RESPONSE_CODE_INVALID_BLOCK = 0x86,
    /**
     * FU_LOGITECH_HIDPP_RDFU_RESPONSE_CODE_GENERIC_ERROR:
     */
    FU_LOGITECH_HIDPP_RDFU_RESPONSE_CODE_GENERIC_ERROR = 0xFF,
}  FuLogitechHidppRdfuResponseCode;
const gchar *fu_logitech_hidpp_rdfu_response_code_to_string(FuLogitechHidppRdfuResponseCode val) G_GNUC_CONST;
/**
 * FuLogitechHidppRdfuCapabilities:
 */
typedef enum {
    /**
     * FU_LOGITECH_HIDPP_RDFU_CAPABILITIES_RESUMABLE_DFU_BIT:
     */
    FU_LOGITECH_HIDPP_RDFU_CAPABILITIES_RESUMABLE_DFU_BIT = 1,
    /**
     * FU_LOGITECH_HIDPP_RDFU_CAPABILITIES_DEFERRABLE_DFU_BIT:
     */
    FU_LOGITECH_HIDPP_RDFU_CAPABILITIES_DEFERRABLE_DFU_BIT = 1 << 1,
    /**
     * FU_LOGITECH_HIDPP_RDFU_CAPABILITIES_FORCIBLE_DFU_BIT:
     */
    FU_LOGITECH_HIDPP_RDFU_CAPABILITIES_FORCIBLE_DFU_BIT = 1 << 2,
} G_GNUC_FLAG_ENUM FuLogitechHidppRdfuCapabilities;
/**
 * FuLogitechHidppRdfuApplyFlags:
 */
typedef enum {
    /**
     * FU_LOGITECH_HIDPP_RDFU_APPLY_FLAG_DEFER_DFU_BIT:
     */
    FU_LOGITECH_HIDPP_RDFU_APPLY_FLAG_DEFER_DFU_BIT = 1,
    /**
     * FU_LOGITECH_HIDPP_RDFU_APPLY_FLAG_FORCE_DFU_BIT:
     */
    FU_LOGITECH_HIDPP_RDFU_APPLY_FLAG_FORCE_DFU_BIT = 1 << 1,
} G_GNUC_FLAG_ENUM FuLogitechHidppRdfuApplyFlags;
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructLogitechHidppRdfuResponse;

FuStructLogitechHidppRdfuResponse *fu_struct_logitech_hidpp_rdfu_response_ref(FuStructLogitechHidppRdfuResponse *st) G_GNUC_NON_NULL(1);
void fu_struct_logitech_hidpp_rdfu_response_unref(FuStructLogitechHidppRdfuResponse *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructLogitechHidppRdfuResponse, fu_struct_logitech_hidpp_rdfu_response_unref)
FuStructLogitechHidppRdfuResponse *fu_struct_logitech_hidpp_rdfu_response_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_logitech_hidpp_rdfu_response_get_device_id(const FuStructLogitechHidppRdfuResponse *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_logitech_hidpp_rdfu_response_get_sub_id(const FuStructLogitechHidppRdfuResponse *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
FuLogitechHidppRdfuFunc fu_struct_logitech_hidpp_rdfu_response_get_function_id(const FuStructLogitechHidppRdfuResponse *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_logitech_hidpp_rdfu_response_get_fw_entity(const FuStructLogitechHidppRdfuResponse *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
FuLogitechHidppRdfuResponseCode fu_struct_logitech_hidpp_rdfu_response_get_status_code(const FuStructLogitechHidppRdfuResponse *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
const guint8 *fu_struct_logitech_hidpp_rdfu_response_get_parameters(const FuStructLogitechHidppRdfuResponse *st, gsize *bufsz) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_RESPONSE_OFFSET_REPORT_ID 0x0
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_RESPONSE_OFFSET_DEVICE_ID 0x1
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_RESPONSE_OFFSET_SUB_ID 0x2
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_RESPONSE_OFFSET_FUNCTION_ID 0x3
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_RESPONSE_OFFSET_FW_ENTITY 0x4
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_RESPONSE_OFFSET_STATUS_CODE 0x5
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_RESPONSE_OFFSET_PARAMETERS 0x6
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_RESPONSE_SIZE_PARAMETERS 0xE
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_RESPONSE_N_ELEMENTS_PARAMETERS 14
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_RESPONSE_SIZE 0x14
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_RESPONSE_DEFAULT_REPORT_ID FU_LOGITECH_HIDPP_RDFU_REPORT_ID_LONG
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructLogitechHidppRdfuGetCapabilities;

FuStructLogitechHidppRdfuGetCapabilities *fu_struct_logitech_hidpp_rdfu_get_capabilities_ref(FuStructLogitechHidppRdfuGetCapabilities *st) G_GNUC_NON_NULL(1);
void fu_struct_logitech_hidpp_rdfu_get_capabilities_unref(FuStructLogitechHidppRdfuGetCapabilities *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructLogitechHidppRdfuGetCapabilities, fu_struct_logitech_hidpp_rdfu_get_capabilities_unref)
FuStructLogitechHidppRdfuGetCapabilities *fu_struct_logitech_hidpp_rdfu_get_capabilities_new(void) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_logitech_hidpp_rdfu_get_capabilities_set_device_id(FuStructLogitechHidppRdfuGetCapabilities *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_struct_logitech_hidpp_rdfu_get_capabilities_set_sub_id(FuStructLogitechHidppRdfuGetCapabilities *st, guint8 value) G_GNUC_NON_NULL(1);
gboolean fu_struct_logitech_hidpp_rdfu_get_capabilities_set_data(FuStructLogitechHidppRdfuGetCapabilities *st, const guint8 *buf, gsize bufsz, GError **error) G_GNUC_NON_NULL(1, 2) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_GET_CAPABILITIES_OFFSET_REPORT_ID 0x0
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_GET_CAPABILITIES_OFFSET_DEVICE_ID 0x1
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_GET_CAPABILITIES_OFFSET_SUB_ID 0x2
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_GET_CAPABILITIES_OFFSET_FUNCTION_ID 0x3
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_GET_CAPABILITIES_OFFSET_DATA 0x4
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_GET_CAPABILITIES_SIZE_DATA 0x10
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_GET_CAPABILITIES_N_ELEMENTS_DATA 16
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_GET_CAPABILITIES_SIZE 0x14
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_GET_CAPABILITIES_DEFAULT_REPORT_ID FU_LOGITECH_HIDPP_RDFU_REPORT_ID_LONG
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_GET_CAPABILITIES_DEFAULT_FUNCTION_ID FU_LOGITECH_HIDPP_RDFU_FUNC_GET_CAPABILITIES
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructLogitechHidppRdfuCapabilities;

FuStructLogitechHidppRdfuCapabilities *fu_struct_logitech_hidpp_rdfu_capabilities_ref(FuStructLogitechHidppRdfuCapabilities *st) G_GNUC_NON_NULL(1);
void fu_struct_logitech_hidpp_rdfu_capabilities_unref(FuStructLogitechHidppRdfuCapabilities *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructLogitechHidppRdfuCapabilities, fu_struct_logitech_hidpp_rdfu_capabilities_unref)
FuStructLogitechHidppRdfuCapabilities *fu_struct_logitech_hidpp_rdfu_capabilities_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_logitech_hidpp_rdfu_capabilities_get_device_id(const FuStructLogitechHidppRdfuCapabilities *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_logitech_hidpp_rdfu_capabilities_get_sub_id(const FuStructLogitechHidppRdfuCapabilities *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
FuLogitechHidppRdfuFunc fu_struct_logitech_hidpp_rdfu_capabilities_get_function_id(const FuStructLogitechHidppRdfuCapabilities *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
FuLogitechHidppRdfuCapabilities fu_struct_logitech_hidpp_rdfu_capabilities_get_capabilities(const FuStructLogitechHidppRdfuCapabilities *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
const guint8 *fu_struct_logitech_hidpp_rdfu_capabilities_get_data(const FuStructLogitechHidppRdfuCapabilities *st, gsize *bufsz) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_CAPABILITIES_OFFSET_REPORT_ID 0x0
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_CAPABILITIES_OFFSET_DEVICE_ID 0x1
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_CAPABILITIES_OFFSET_SUB_ID 0x2
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_CAPABILITIES_OFFSET_FUNCTION_ID 0x3
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_CAPABILITIES_OFFSET_CAPABILITIES 0x4
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_CAPABILITIES_OFFSET_DATA 0x5
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_CAPABILITIES_SIZE_DATA 0xF
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_CAPABILITIES_N_ELEMENTS_DATA 15
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_CAPABILITIES_SIZE 0x14
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_CAPABILITIES_DEFAULT_REPORT_ID FU_LOGITECH_HIDPP_RDFU_REPORT_ID_LONG
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructLogitechHidppRdfuGetDfuStatus;

FuStructLogitechHidppRdfuGetDfuStatus *fu_struct_logitech_hidpp_rdfu_get_dfu_status_ref(FuStructLogitechHidppRdfuGetDfuStatus *st) G_GNUC_NON_NULL(1);
void fu_struct_logitech_hidpp_rdfu_get_dfu_status_unref(FuStructLogitechHidppRdfuGetDfuStatus *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructLogitechHidppRdfuGetDfuStatus, fu_struct_logitech_hidpp_rdfu_get_dfu_status_unref)
FuStructLogitechHidppRdfuGetDfuStatus *fu_struct_logitech_hidpp_rdfu_get_dfu_status_new(void) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_logitech_hidpp_rdfu_get_dfu_status_set_device_id(FuStructLogitechHidppRdfuGetDfuStatus *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_struct_logitech_hidpp_rdfu_get_dfu_status_set_sub_id(FuStructLogitechHidppRdfuGetDfuStatus *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_struct_logitech_hidpp_rdfu_get_dfu_status_set_fw_entity(FuStructLogitechHidppRdfuGetDfuStatus *st, guint8 value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_GET_DFU_STATUS_OFFSET_REPORT_ID 0x0
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_GET_DFU_STATUS_OFFSET_DEVICE_ID 0x1
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_GET_DFU_STATUS_OFFSET_SUB_ID 0x2
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_GET_DFU_STATUS_OFFSET_FUNCTION_ID 0x3
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_GET_DFU_STATUS_OFFSET_FW_ENTITY 0x4
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_GET_DFU_STATUS_SIZE 0x5
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_GET_DFU_STATUS_DEFAULT_REPORT_ID FU_LOGITECH_HIDPP_RDFU_REPORT_ID_LONG
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_GET_DFU_STATUS_DEFAULT_FUNCTION_ID FU_LOGITECH_HIDPP_RDFU_FUNC_GET_DFU_STATUS
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructLogitechHidppRdfuStartDfu;

FuStructLogitechHidppRdfuStartDfu *fu_struct_logitech_hidpp_rdfu_start_dfu_ref(FuStructLogitechHidppRdfuStartDfu *st) G_GNUC_NON_NULL(1);
void fu_struct_logitech_hidpp_rdfu_start_dfu_unref(FuStructLogitechHidppRdfuStartDfu *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructLogitechHidppRdfuStartDfu, fu_struct_logitech_hidpp_rdfu_start_dfu_unref)
FuStructLogitechHidppRdfuStartDfu *fu_struct_logitech_hidpp_rdfu_start_dfu_new(void) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_logitech_hidpp_rdfu_start_dfu_set_device_id(FuStructLogitechHidppRdfuStartDfu *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_struct_logitech_hidpp_rdfu_start_dfu_set_sub_id(FuStructLogitechHidppRdfuStartDfu *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_struct_logitech_hidpp_rdfu_start_dfu_set_fw_entity(FuStructLogitechHidppRdfuStartDfu *st, guint8 value) G_GNUC_NON_NULL(1);
gboolean fu_struct_logitech_hidpp_rdfu_start_dfu_set_magic(FuStructLogitechHidppRdfuStartDfu *st, const guint8 *buf, gsize bufsz, GError **error) G_GNUC_NON_NULL(1, 2) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_START_DFU_OFFSET_REPORT_ID 0x0
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_START_DFU_OFFSET_DEVICE_ID 0x1
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_START_DFU_OFFSET_SUB_ID 0x2
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_START_DFU_OFFSET_FUNCTION_ID 0x3
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_START_DFU_OFFSET_FW_ENTITY 0x4
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_START_DFU_OFFSET_MAGIC 0x5
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_START_DFU_SIZE_MAGIC 0xA
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_START_DFU_N_ELEMENTS_MAGIC 10
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_START_DFU_SIZE 0xF
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_START_DFU_DEFAULT_REPORT_ID FU_LOGITECH_HIDPP_RDFU_REPORT_ID_LONG
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_START_DFU_DEFAULT_FUNCTION_ID FU_LOGITECH_HIDPP_RDFU_FUNC_START_DFU
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructLogitechHidppRdfuStartDfuResponse;

FuStructLogitechHidppRdfuStartDfuResponse *fu_struct_logitech_hidpp_rdfu_start_dfu_response_ref(FuStructLogitechHidppRdfuStartDfuResponse *st) G_GNUC_NON_NULL(1);
void fu_struct_logitech_hidpp_rdfu_start_dfu_response_unref(FuStructLogitechHidppRdfuStartDfuResponse *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructLogitechHidppRdfuStartDfuResponse, fu_struct_logitech_hidpp_rdfu_start_dfu_response_unref)
FuStructLogitechHidppRdfuStartDfuResponse *fu_struct_logitech_hidpp_rdfu_start_dfu_response_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_logitech_hidpp_rdfu_start_dfu_response_get_device_id(const FuStructLogitechHidppRdfuStartDfuResponse *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_logitech_hidpp_rdfu_start_dfu_response_get_sub_id(const FuStructLogitechHidppRdfuStartDfuResponse *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
FuLogitechHidppRdfuFunc fu_struct_logitech_hidpp_rdfu_start_dfu_response_get_function_id(const FuStructLogitechHidppRdfuStartDfuResponse *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_logitech_hidpp_rdfu_start_dfu_response_get_fw_entity(const FuStructLogitechHidppRdfuStartDfuResponse *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
FuLogitechHidppRdfuResponseCode fu_struct_logitech_hidpp_rdfu_start_dfu_response_get_status_code(const FuStructLogitechHidppRdfuStartDfuResponse *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_logitech_hidpp_rdfu_start_dfu_response_get_status_params(const FuStructLogitechHidppRdfuStartDfuResponse *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_logitech_hidpp_rdfu_start_dfu_response_get_additional_status_params(const FuStructLogitechHidppRdfuStartDfuResponse *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_START_DFU_RESPONSE_OFFSET_REPORT_ID 0x0
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_START_DFU_RESPONSE_OFFSET_DEVICE_ID 0x1
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_START_DFU_RESPONSE_OFFSET_SUB_ID 0x2
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_START_DFU_RESPONSE_OFFSET_FUNCTION_ID 0x3
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_START_DFU_RESPONSE_OFFSET_FW_ENTITY 0x4
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_START_DFU_RESPONSE_OFFSET_STATUS_CODE 0x5
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_START_DFU_RESPONSE_OFFSET_STATUS_PARAMS 0x6
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_START_DFU_RESPONSE_OFFSET_ADDITIONAL_STATUS_PARAMS 0x7
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_START_DFU_RESPONSE_SIZE 0x8
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_START_DFU_RESPONSE_DEFAULT_REPORT_ID FU_LOGITECH_HIDPP_RDFU_REPORT_ID_LONG
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructLogitechHidppRdfuTransferDfuData;

FuStructLogitechHidppRdfuTransferDfuData *fu_struct_logitech_hidpp_rdfu_transfer_dfu_data_ref(FuStructLogitechHidppRdfuTransferDfuData *st) G_GNUC_NON_NULL(1);
void fu_struct_logitech_hidpp_rdfu_transfer_dfu_data_unref(FuStructLogitechHidppRdfuTransferDfuData *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructLogitechHidppRdfuTransferDfuData, fu_struct_logitech_hidpp_rdfu_transfer_dfu_data_unref)
FuStructLogitechHidppRdfuTransferDfuData *fu_struct_logitech_hidpp_rdfu_transfer_dfu_data_new(void) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_logitech_hidpp_rdfu_transfer_dfu_data_set_device_id(FuStructLogitechHidppRdfuTransferDfuData *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_struct_logitech_hidpp_rdfu_transfer_dfu_data_set_sub_id(FuStructLogitechHidppRdfuTransferDfuData *st, guint8 value) G_GNUC_NON_NULL(1);
gboolean fu_struct_logitech_hidpp_rdfu_transfer_dfu_data_set_data(FuStructLogitechHidppRdfuTransferDfuData *st, const guint8 *buf, gsize bufsz, GError **error) G_GNUC_NON_NULL(1, 2) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_TRANSFER_DFU_DATA_OFFSET_REPORT_ID 0x0
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_TRANSFER_DFU_DATA_OFFSET_DEVICE_ID 0x1
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_TRANSFER_DFU_DATA_OFFSET_SUB_ID 0x2
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_TRANSFER_DFU_DATA_OFFSET_FUNCTION_ID 0x3
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_TRANSFER_DFU_DATA_OFFSET_DATA 0x4
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_TRANSFER_DFU_DATA_SIZE_DATA 0x10
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_TRANSFER_DFU_DATA_N_ELEMENTS_DATA 16
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_TRANSFER_DFU_DATA_SIZE 0x14
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_TRANSFER_DFU_DATA_DEFAULT_REPORT_ID FU_LOGITECH_HIDPP_RDFU_REPORT_ID_LONG
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_TRANSFER_DFU_DATA_DEFAULT_FUNCTION_ID FU_LOGITECH_HIDPP_RDFU_FUNC_TRANSFER_DFU_DATA
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructLogitechHidppRdfuDataTransferReady;

FuStructLogitechHidppRdfuDataTransferReady *fu_struct_logitech_hidpp_rdfu_data_transfer_ready_ref(FuStructLogitechHidppRdfuDataTransferReady *st) G_GNUC_NON_NULL(1);
void fu_struct_logitech_hidpp_rdfu_data_transfer_ready_unref(FuStructLogitechHidppRdfuDataTransferReady *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructLogitechHidppRdfuDataTransferReady, fu_struct_logitech_hidpp_rdfu_data_transfer_ready_unref)
FuStructLogitechHidppRdfuDataTransferReady *fu_struct_logitech_hidpp_rdfu_data_transfer_ready_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_logitech_hidpp_rdfu_data_transfer_ready_get_block_id(const FuStructLogitechHidppRdfuDataTransferReady *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_DATA_TRANSFER_READY_OFFSET_STATUS_CODE 0x0
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_DATA_TRANSFER_READY_OFFSET_BLOCK_ID 0x1
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_DATA_TRANSFER_READY_SIZE 0x3
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_DATA_TRANSFER_READY_DEFAULT_STATUS_CODE FU_LOGITECH_HIDPP_RDFU_RESPONSE_CODE_DATA_TRANSFER_READY
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructLogitechHidppRdfuDataTransferWait;

FuStructLogitechHidppRdfuDataTransferWait *fu_struct_logitech_hidpp_rdfu_data_transfer_wait_ref(FuStructLogitechHidppRdfuDataTransferWait *st) G_GNUC_NON_NULL(1);
void fu_struct_logitech_hidpp_rdfu_data_transfer_wait_unref(FuStructLogitechHidppRdfuDataTransferWait *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructLogitechHidppRdfuDataTransferWait, fu_struct_logitech_hidpp_rdfu_data_transfer_wait_unref)
FuStructLogitechHidppRdfuDataTransferWait *fu_struct_logitech_hidpp_rdfu_data_transfer_wait_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_logitech_hidpp_rdfu_data_transfer_wait_get_delay_ms(const FuStructLogitechHidppRdfuDataTransferWait *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_DATA_TRANSFER_WAIT_OFFSET_STATUS_CODE 0x0
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_DATA_TRANSFER_WAIT_OFFSET_DELAY_MS 0x1
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_DATA_TRANSFER_WAIT_SIZE 0x3
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_DATA_TRANSFER_WAIT_DEFAULT_STATUS_CODE FU_LOGITECH_HIDPP_RDFU_RESPONSE_CODE_DATA_TRANSFER_WAIT
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructLogitechHidppRdfuDfuTransferPktAck;

FuStructLogitechHidppRdfuDfuTransferPktAck *fu_struct_logitech_hidpp_rdfu_dfu_transfer_pkt_ack_ref(FuStructLogitechHidppRdfuDfuTransferPktAck *st) G_GNUC_NON_NULL(1);
void fu_struct_logitech_hidpp_rdfu_dfu_transfer_pkt_ack_unref(FuStructLogitechHidppRdfuDfuTransferPktAck *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructLogitechHidppRdfuDfuTransferPktAck, fu_struct_logitech_hidpp_rdfu_dfu_transfer_pkt_ack_unref)
FuStructLogitechHidppRdfuDfuTransferPktAck *fu_struct_logitech_hidpp_rdfu_dfu_transfer_pkt_ack_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_logitech_hidpp_rdfu_dfu_transfer_pkt_ack_get_pkt_number(const FuStructLogitechHidppRdfuDfuTransferPktAck *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_DFU_TRANSFER_PKT_ACK_OFFSET_STATUS_CODE 0x0
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_DFU_TRANSFER_PKT_ACK_OFFSET_PKT_NUMBER 0x1
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_DFU_TRANSFER_PKT_ACK_SIZE 0x5
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_DFU_TRANSFER_PKT_ACK_DEFAULT_STATUS_CODE FU_LOGITECH_HIDPP_RDFU_RESPONSE_CODE_DFU_TRANSFER_PKT_ACK
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructLogitechHidppRdfuApplyDfu;

FuStructLogitechHidppRdfuApplyDfu *fu_struct_logitech_hidpp_rdfu_apply_dfu_ref(FuStructLogitechHidppRdfuApplyDfu *st) G_GNUC_NON_NULL(1);
void fu_struct_logitech_hidpp_rdfu_apply_dfu_unref(FuStructLogitechHidppRdfuApplyDfu *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructLogitechHidppRdfuApplyDfu, fu_struct_logitech_hidpp_rdfu_apply_dfu_unref)
FuStructLogitechHidppRdfuApplyDfu *fu_struct_logitech_hidpp_rdfu_apply_dfu_new(void) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_logitech_hidpp_rdfu_apply_dfu_set_device_id(FuStructLogitechHidppRdfuApplyDfu *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_struct_logitech_hidpp_rdfu_apply_dfu_set_sub_id(FuStructLogitechHidppRdfuApplyDfu *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_struct_logitech_hidpp_rdfu_apply_dfu_set_fw_entity(FuStructLogitechHidppRdfuApplyDfu *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_struct_logitech_hidpp_rdfu_apply_dfu_set_flags(FuStructLogitechHidppRdfuApplyDfu *st, guint8 value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_APPLY_DFU_OFFSET_REPORT_ID 0x0
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_APPLY_DFU_OFFSET_DEVICE_ID 0x1
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_APPLY_DFU_OFFSET_SUB_ID 0x2
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_APPLY_DFU_OFFSET_FUNCTION_ID 0x3
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_APPLY_DFU_OFFSET_FW_ENTITY 0x4
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_APPLY_DFU_OFFSET_FLAGS 0x5
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_APPLY_DFU_SIZE 0x6
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_APPLY_DFU_DEFAULT_REPORT_ID FU_LOGITECH_HIDPP_RDFU_REPORT_ID_LONG
#define FU_STRUCT_LOGITECH_HIDPP_RDFU_APPLY_DFU_DEFAULT_FUNCTION_ID FU_LOGITECH_HIDPP_RDFU_FUNC_APPLY_DFU
#endif
