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

#pragma once
#include <fu-input-stream.h>
/**
 * FuQcOpcode:
 *
 * Upgrade protocol OpCode
 */
typedef enum {
    /**
     * FU_QC_OPCODE_START_REQ:
     */
    FU_QC_OPCODE_START_REQ = 0x01,
    /**
     * FU_QC_OPCODE_START_CFM:
     */
    FU_QC_OPCODE_START_CFM = 0x02,
    /**
     * FU_QC_OPCODE_DATA_BYTES_REQ:
     */
    FU_QC_OPCODE_DATA_BYTES_REQ = 0x03,
    /**
     * FU_QC_OPCODE_DATA:
     */
    FU_QC_OPCODE_DATA = 0x04,
    /**
     * FU_QC_OPCODE_ABORT_REQ:
     */
    FU_QC_OPCODE_ABORT_REQ = 0x07,
    /**
     * FU_QC_OPCODE_ABORT_CFM:
     */
    FU_QC_OPCODE_ABORT_CFM = 0x08,
    /**
     * FU_QC_OPCODE_TRANSFER_COMPLETE_IND:
     */
    FU_QC_OPCODE_TRANSFER_COMPLETE_IND = 0x0B,
    /**
     * FU_QC_OPCODE_TRANSFER_COMPLETE_RES:
     */
    FU_QC_OPCODE_TRANSFER_COMPLETE_RES = 0x0C,
    /**
     * FU_QC_OPCODE_PROCEED_TO_COMMIT:
     */
    FU_QC_OPCODE_PROCEED_TO_COMMIT = 0x0E,
    /**
     * FU_QC_OPCODE_COMMIT_REQ:
     */
    FU_QC_OPCODE_COMMIT_REQ = 0x0F,
    /**
     * FU_QC_OPCODE_COMMIT_CFM:
     */
    FU_QC_OPCODE_COMMIT_CFM = 0x10,
    /**
     * FU_QC_OPCODE_ERROR_IND:
     */
    FU_QC_OPCODE_ERROR_IND = 0x11,
    /**
     * FU_QC_OPCODE_COMPLETE_IND:
     */
    FU_QC_OPCODE_COMPLETE_IND = 0x12,
    /**
     * FU_QC_OPCODE_SYNC_REQ:
     */
    FU_QC_OPCODE_SYNC_REQ = 0x13,
    /**
     * FU_QC_OPCODE_SYNC_CFM:
     */
    FU_QC_OPCODE_SYNC_CFM = 0x14,
    /**
     * FU_QC_OPCODE_START_DATA_REQ:
     */
    FU_QC_OPCODE_START_DATA_REQ = 0x15,
    /**
     * FU_QC_OPCODE_IS_VALIDATION_DONE_REQ:
     */
    FU_QC_OPCODE_IS_VALIDATION_DONE_REQ = 0x16,
    /**
     * FU_QC_OPCODE_IS_VALIDATION_DONE_CFM:
     */
    FU_QC_OPCODE_IS_VALIDATION_DONE_CFM = 0x17,
    /**
     * FU_QC_OPCODE_HOST_VERSION_REQ:
     */
    FU_QC_OPCODE_HOST_VERSION_REQ = 0x19,
    /**
     * FU_QC_OPCODE_HOST_VERSION_CFM:
     */
    FU_QC_OPCODE_HOST_VERSION_CFM = 0x1A,
    /**
     * FU_QC_OPCODE_ERROR_RES:
     */
    FU_QC_OPCODE_ERROR_RES = 0x1F,
}  FuQcOpcode;
/**
 * FuQcReq:
 */
typedef enum {
    /**
     * FU_QC_REQ_CONNECT:
     */
    FU_QC_REQ_CONNECT = 0x02,
    /**
     * FU_QC_REQ_DISCONNECT:
     */
    FU_QC_REQ_DISCONNECT = 0x07,
}  FuQcReq;
/**
 * FuQcStatus:
 */
typedef enum {
    /**
     * FU_QC_STATUS_SUCCESS:
     *
     * Operation succeeded
     */
    FU_QC_STATUS_SUCCESS = 0,
    /**
     * FU_QC_STATUS_UNEXPECTED_ERROR:
     *
     * Operation failed
     */
    FU_QC_STATUS_UNEXPECTED_ERROR,
    /**
     * FU_QC_STATUS_ALREADY_CONNECTED_WARNING:
     *
     * Already connected
     */
    FU_QC_STATUS_ALREADY_CONNECTED_WARNING,
    /**
     * FU_QC_STATUS_IN_PROGRESS:
     *
     * Requested operation failed, an upgrade is in progress
     */
    FU_QC_STATUS_IN_PROGRESS,
    /**
     * FU_QC_STATUS_BUSY:
     *
     * UNUSED
     */
    FU_QC_STATUS_BUSY,
    /**
     * FU_QC_STATUS_INVALID_POWER_STATE:
     *
     * Invalid power management state
     */
    FU_QC_STATUS_INVALID_POWER_STATE,
}  FuQcStatus;
const gchar *fu_qc_status_to_string(FuQcStatus val) G_GNUC_CONST;
/**
 * FuQcResumePoint:
 */
typedef enum {
    /**
     * FU_QC_RESUME_POINT_START:
     */
    FU_QC_RESUME_POINT_START = 0,
    /**
     * FU_QC_RESUME_POINT_PRE_VALIDATE:
     */
    FU_QC_RESUME_POINT_PRE_VALIDATE,
    /**
     * FU_QC_RESUME_POINT_PRE_REBOOT:
     */
    FU_QC_RESUME_POINT_PRE_REBOOT,
    /**
     * FU_QC_RESUME_POINT_POST_REBOOT:
     */
    FU_QC_RESUME_POINT_POST_REBOOT,
    /**
     * FU_QC_RESUME_POINT_COMMIT:
     */
    FU_QC_RESUME_POINT_COMMIT,
    /**
     * FU_QC_RESUME_POINT_POST_COMMIT:
     */
    FU_QC_RESUME_POINT_POST_COMMIT,
}  FuQcResumePoint;
const gchar *fu_qc_resume_point_to_string(FuQcResumePoint val) G_GNUC_CONST;
/**
 * FuQcStartStatus:
 */
typedef enum {
    /**
     * FU_QC_START_STATUS_SUCCESS:
     */
    FU_QC_START_STATUS_SUCCESS,
    /**
     * FU_QC_START_STATUS_FAILURE:
     */
    FU_QC_START_STATUS_FAILURE,
}  FuQcStartStatus;
#define FU_QC_START_STATUS_LAST 2
const gchar *fu_qc_start_status_to_string(FuQcStartStatus val) G_GNUC_CONST;
/**
 * FuQcMoreData:
 */
typedef enum {
    /**
     * FU_QC_MORE_DATA_MORE:
     */
    FU_QC_MORE_DATA_MORE,
    /**
     * FU_QC_MORE_DATA_LAST_PACKET:
     */
    FU_QC_MORE_DATA_LAST_PACKET,
}  FuQcMoreData;
#define FU_QC_MORE_DATA_LAST 2
/**
 * FuQcTransferAction:
 */
typedef enum {
    /**
     * FU_QC_TRANSFER_ACTION_INTERACTIVE:
     */
    FU_QC_TRANSFER_ACTION_INTERACTIVE,
    /**
     * FU_QC_TRANSFER_ACTION_ABORT:
     */
    FU_QC_TRANSFER_ACTION_ABORT,
    /**
     * FU_QC_TRANSFER_ACTION_SILENT:
     */
    FU_QC_TRANSFER_ACTION_SILENT,
}  FuQcTransferAction;
#define FU_QC_TRANSFER_ACTION_LAST 3
/**
 * FuQcCommitAction:
 */
typedef enum {
    /**
     * FU_QC_COMMIT_ACTION_PROCEED:
     */
    FU_QC_COMMIT_ACTION_PROCEED,
    /**
     * FU_QC_COMMIT_ACTION_NOT_PROCEED:
     */
    FU_QC_COMMIT_ACTION_NOT_PROCEED,
}  FuQcCommitAction;
#define FU_QC_COMMIT_ACTION_LAST 2
/**
 * FuQcCommitCfmAction:
 */
typedef enum {
    /**
     * FU_QC_COMMIT_CFM_ACTION_UPGRADE:
     */
    FU_QC_COMMIT_CFM_ACTION_UPGRADE,
    /**
     * FU_QC_COMMIT_CFM_ACTION_ROLLBACK:
     */
    FU_QC_COMMIT_CFM_ACTION_ROLLBACK,
}  FuQcCommitCfmAction;
#define FU_QC_COMMIT_CFM_ACTION_LAST 2
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructQcConnectReq;

FuStructQcConnectReq *fu_struct_qc_connect_req_ref(FuStructQcConnectReq *st) G_GNUC_NON_NULL(1);
void fu_struct_qc_connect_req_unref(FuStructQcConnectReq *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructQcConnectReq, fu_struct_qc_connect_req_unref)
FuStructQcConnectReq *fu_struct_qc_connect_req_new(void) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_qc_connect_req_set_data_len(FuStructQcConnectReq *st, guint16 value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_CONNECT_REQ_OFFSET_REQ 0x0
#define FU_STRUCT_QC_CONNECT_REQ_OFFSET_DATA_LEN 0x1
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_CONNECT_REQ_SIZE 0x3
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_CONNECT_REQ_DEFAULT_REQ FU_QC_REQ_CONNECT
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructQcDisconnectReq;

FuStructQcDisconnectReq *fu_struct_qc_disconnect_req_ref(FuStructQcDisconnectReq *st) G_GNUC_NON_NULL(1);
void fu_struct_qc_disconnect_req_unref(FuStructQcDisconnectReq *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructQcDisconnectReq, fu_struct_qc_disconnect_req_unref)
FuStructQcDisconnectReq *fu_struct_qc_disconnect_req_new(void) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_qc_disconnect_req_set_data_len(FuStructQcDisconnectReq *st, guint16 value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_DISCONNECT_REQ_OFFSET_REQ 0x0
#define FU_STRUCT_QC_DISCONNECT_REQ_OFFSET_DATA_LEN 0x1
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_DISCONNECT_REQ_SIZE 0x3
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_DISCONNECT_REQ_DEFAULT_REQ FU_QC_REQ_DISCONNECT
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructQcUpdateStatus;

FuStructQcUpdateStatus *fu_struct_qc_update_status_ref(FuStructQcUpdateStatus *st) G_GNUC_NON_NULL(1);
void fu_struct_qc_update_status_unref(FuStructQcUpdateStatus *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructQcUpdateStatus, fu_struct_qc_update_status_unref)
FuStructQcUpdateStatus *fu_struct_qc_update_status_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
FuQcStatus fu_struct_qc_update_status_get_status(const FuStructQcUpdateStatus *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_UPDATE_STATUS_OFFSET_STATUS 0x0
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_UPDATE_STATUS_SIZE 0x1
#endif

#ifndef __GI_SCANNER__
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructQcVersionReq;

FuStructQcVersionReq *fu_struct_qc_version_req_ref(FuStructQcVersionReq *st) G_GNUC_NON_NULL(1);
void fu_struct_qc_version_req_unref(FuStructQcVersionReq *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructQcVersionReq, fu_struct_qc_version_req_unref)
FuStructQcVersionReq *fu_struct_qc_version_req_new(void) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_VERSION_REQ_OFFSET_OPCODE 0x0
#define FU_STRUCT_QC_VERSION_REQ_OFFSET_DATA_LEN 0x1
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_VERSION_REQ_SIZE 0x3
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_VERSION_REQ_DEFAULT_OPCODE FU_QC_OPCODE_HOST_VERSION_REQ
#define FU_STRUCT_QC_VERSION_REQ_DEFAULT_DATA_LEN 0x00
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructQcVersion;

FuStructQcVersion *fu_struct_qc_version_ref(FuStructQcVersion *st) G_GNUC_NON_NULL(1);
void fu_struct_qc_version_unref(FuStructQcVersion *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructQcVersion, fu_struct_qc_version_unref)
FuStructQcVersion *fu_struct_qc_version_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_qc_version_get_major(const FuStructQcVersion *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_qc_version_get_minor(const FuStructQcVersion *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_qc_version_get_config(const FuStructQcVersion *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_VERSION_OFFSET_STATUS 0x0
#define FU_STRUCT_QC_VERSION_OFFSET_DATA_LEN 0x1
#define FU_STRUCT_QC_VERSION_OFFSET_MAJOR 0x3
#define FU_STRUCT_QC_VERSION_OFFSET_MINOR 0x5
#define FU_STRUCT_QC_VERSION_OFFSET_CONFIG 0x7
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_VERSION_SIZE 0x9
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_VERSION_DEFAULT_STATUS FU_QC_OPCODE_HOST_VERSION_CFM
#define FU_STRUCT_QC_VERSION_DEFAULT_DATA_LEN 0x0006
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructQcAbortReq;

FuStructQcAbortReq *fu_struct_qc_abort_req_ref(FuStructQcAbortReq *st) G_GNUC_NON_NULL(1);
void fu_struct_qc_abort_req_unref(FuStructQcAbortReq *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructQcAbortReq, fu_struct_qc_abort_req_unref)
FuStructQcAbortReq *fu_struct_qc_abort_req_new(void) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_qc_abort_req_set_data_len(FuStructQcAbortReq *st, guint16 value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_ABORT_REQ_OFFSET_OPCODE 0x0
#define FU_STRUCT_QC_ABORT_REQ_OFFSET_DATA_LEN 0x1
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_ABORT_REQ_SIZE 0x3
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_ABORT_REQ_DEFAULT_OPCODE FU_QC_OPCODE_ABORT_REQ
#define FU_STRUCT_QC_ABORT_REQ_DEFAULT_DATA_LEN 0x00
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructQcAbort;

FuStructQcAbort *fu_struct_qc_abort_ref(FuStructQcAbort *st) G_GNUC_NON_NULL(1);
void fu_struct_qc_abort_unref(FuStructQcAbort *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructQcAbort, fu_struct_qc_abort_unref)
FuStructQcAbort *fu_struct_qc_abort_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_qc_abort_get_data_len(const FuStructQcAbort *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_ABORT_OFFSET_OPCODE 0x0
#define FU_STRUCT_QC_ABORT_OFFSET_DATA_LEN 0x1
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_ABORT_SIZE 0x3
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_ABORT_DEFAULT_OPCODE FU_QC_OPCODE_ABORT_CFM
#define FU_STRUCT_QC_ABORT_DEFAULT_DATA_LEN 0x00
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructQcSyncReq;

FuStructQcSyncReq *fu_struct_qc_sync_req_ref(FuStructQcSyncReq *st) G_GNUC_NON_NULL(1);
void fu_struct_qc_sync_req_unref(FuStructQcSyncReq *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructQcSyncReq, fu_struct_qc_sync_req_unref)
FuStructQcSyncReq *fu_struct_qc_sync_req_new(void) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_qc_sync_req_set_data_len(FuStructQcSyncReq *st, guint16 value) G_GNUC_NON_NULL(1);
void fu_struct_qc_sync_req_set_file_id(FuStructQcSyncReq *st, guint32 value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_SYNC_REQ_OFFSET_OPCODE 0x0
#define FU_STRUCT_QC_SYNC_REQ_OFFSET_DATA_LEN 0x1
#define FU_STRUCT_QC_SYNC_REQ_OFFSET_FILEID 0x3
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_SYNC_REQ_SIZE 0x7
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_SYNC_REQ_DEFAULT_OPCODE FU_QC_OPCODE_SYNC_REQ
#define FU_STRUCT_QC_SYNC_REQ_DEFAULT_DATA_LEN 0x04
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructQcSync;

FuStructQcSync *fu_struct_qc_sync_ref(FuStructQcSync *st) G_GNUC_NON_NULL(1);
void fu_struct_qc_sync_unref(FuStructQcSync *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructQcSync, fu_struct_qc_sync_unref)
FuStructQcSync *fu_struct_qc_sync_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_qc_sync_get_data_len(const FuStructQcSync *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
FuQcResumePoint fu_struct_qc_sync_get_resume_point(const FuStructQcSync *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_qc_sync_get_file_id(const FuStructQcSync *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_qc_sync_get_protocol_version(const FuStructQcSync *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_SYNC_OFFSET_OPCODE 0x0
#define FU_STRUCT_QC_SYNC_OFFSET_DATA_LEN 0x1
#define FU_STRUCT_QC_SYNC_OFFSET_RESUME_POINT 0x3
#define FU_STRUCT_QC_SYNC_OFFSET_FILE_ID 0x4
#define FU_STRUCT_QC_SYNC_OFFSET_PROTOCOLVERSION 0x8
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_SYNC_SIZE 0x9
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_SYNC_DEFAULT_OPCODE FU_QC_OPCODE_SYNC_CFM
#define FU_STRUCT_QC_SYNC_DEFAULT_DATA_LEN 0x06
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructQcStartReq;

FuStructQcStartReq *fu_struct_qc_start_req_ref(FuStructQcStartReq *st) G_GNUC_NON_NULL(1);
void fu_struct_qc_start_req_unref(FuStructQcStartReq *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructQcStartReq, fu_struct_qc_start_req_unref)
FuStructQcStartReq *fu_struct_qc_start_req_new(void) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_qc_start_req_set_data_len(FuStructQcStartReq *st, guint16 value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_START_REQ_OFFSET_OPCODE 0x0
#define FU_STRUCT_QC_START_REQ_OFFSET_DATA_LEN 0x1
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_START_REQ_SIZE 0x3
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_START_REQ_DEFAULT_OPCODE FU_QC_OPCODE_START_REQ
#define FU_STRUCT_QC_START_REQ_DEFAULT_DATA_LEN 0x00
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructQcStart;

FuStructQcStart *fu_struct_qc_start_ref(FuStructQcStart *st) G_GNUC_NON_NULL(1);
void fu_struct_qc_start_unref(FuStructQcStart *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructQcStart, fu_struct_qc_start_unref)
FuStructQcStart *fu_struct_qc_start_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_qc_start_get_data_len(const FuStructQcStart *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
FuQcStartStatus fu_struct_qc_start_get_status(const FuStructQcStart *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_qc_start_get_battery_level(const FuStructQcStart *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_START_OFFSET_OPCODE 0x0
#define FU_STRUCT_QC_START_OFFSET_DATA_LEN 0x1
#define FU_STRUCT_QC_START_OFFSET_STATUS 0x3
#define FU_STRUCT_QC_START_OFFSET_BATTERY_LEVEL 0x4
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_START_SIZE 0x6
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_START_DEFAULT_OPCODE FU_QC_OPCODE_START_CFM
#define FU_STRUCT_QC_START_DEFAULT_DATA_LEN 0x0003
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructQcStartDataReq;

FuStructQcStartDataReq *fu_struct_qc_start_data_req_ref(FuStructQcStartDataReq *st) G_GNUC_NON_NULL(1);
void fu_struct_qc_start_data_req_unref(FuStructQcStartDataReq *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructQcStartDataReq, fu_struct_qc_start_data_req_unref)
FuStructQcStartDataReq *fu_struct_qc_start_data_req_new(void) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_qc_start_data_req_set_data_len(FuStructQcStartDataReq *st, guint16 value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_START_DATA_REQ_OFFSET_OPCODE 0x0
#define FU_STRUCT_QC_START_DATA_REQ_OFFSET_DATA_LEN 0x1
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_START_DATA_REQ_SIZE 0x3
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_START_DATA_REQ_DEFAULT_OPCODE FU_QC_OPCODE_START_DATA_REQ
#define FU_STRUCT_QC_START_DATA_REQ_DEFAULT_DATA_LEN 0x00
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructQcDataReq;

FuStructQcDataReq *fu_struct_qc_data_req_ref(FuStructQcDataReq *st) G_GNUC_NON_NULL(1);
void fu_struct_qc_data_req_unref(FuStructQcDataReq *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructQcDataReq, fu_struct_qc_data_req_unref)
FuStructQcDataReq *fu_struct_qc_data_req_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_qc_data_req_get_data_len(const FuStructQcDataReq *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_qc_data_req_get_fw_data_len(const FuStructQcDataReq *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_qc_data_req_get_fw_data_offset(const FuStructQcDataReq *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_DATA_REQ_OFFSET_OPCODE 0x0
#define FU_STRUCT_QC_DATA_REQ_OFFSET_DATA_LEN 0x1
#define FU_STRUCT_QC_DATA_REQ_OFFSET_FW_DATA_LEN 0x3
#define FU_STRUCT_QC_DATA_REQ_OFFSET_FW_DATA_OFFSET 0x7
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_DATA_REQ_SIZE 0xB
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_DATA_REQ_DEFAULT_OPCODE FU_QC_OPCODE_DATA_BYTES_REQ
#define FU_STRUCT_QC_DATA_REQ_DEFAULT_DATA_LEN 0x0008
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructQcData;

FuStructQcData *fu_struct_qc_data_ref(FuStructQcData *st) G_GNUC_NON_NULL(1);
void fu_struct_qc_data_unref(FuStructQcData *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructQcData, fu_struct_qc_data_unref)
FuStructQcData *fu_struct_qc_data_new(void) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_qc_data_set_data_len(FuStructQcData *st, guint16 value) G_GNUC_NON_NULL(1);
void fu_struct_qc_data_set_last_packet(FuStructQcData *st, FuQcMoreData value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_DATA_OFFSET_OPCODE 0x0
#define FU_STRUCT_QC_DATA_OFFSET_DATA_LEN 0x1
#define FU_STRUCT_QC_DATA_OFFSET_LAST_PACKET 0x3
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_DATA_SIZE 0x4
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_DATA_DEFAULT_OPCODE FU_QC_OPCODE_DATA
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructQcValidationReq;

FuStructQcValidationReq *fu_struct_qc_validation_req_ref(FuStructQcValidationReq *st) G_GNUC_NON_NULL(1);
void fu_struct_qc_validation_req_unref(FuStructQcValidationReq *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructQcValidationReq, fu_struct_qc_validation_req_unref)
FuStructQcValidationReq *fu_struct_qc_validation_req_new(void) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_qc_validation_req_set_data_len(FuStructQcValidationReq *st, guint16 value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_VALIDATION_REQ_OFFSET_OPCODE 0x0
#define FU_STRUCT_QC_VALIDATION_REQ_OFFSET_DATA_LEN 0x1
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_VALIDATION_REQ_SIZE 0x3
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_VALIDATION_REQ_DEFAULT_OPCODE FU_QC_OPCODE_IS_VALIDATION_DONE_REQ
#define FU_STRUCT_QC_VALIDATION_REQ_DEFAULT_DATA_LEN 0x00
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructQcIsValidationDone;

FuStructQcIsValidationDone *fu_struct_qc_is_validation_done_ref(FuStructQcIsValidationDone *st) G_GNUC_NON_NULL(1);
void fu_struct_qc_is_validation_done_unref(FuStructQcIsValidationDone *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructQcIsValidationDone, fu_struct_qc_is_validation_done_unref)
FuStructQcIsValidationDone *fu_struct_qc_is_validation_done_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_qc_is_validation_done_get_data_len(const FuStructQcIsValidationDone *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_qc_is_validation_done_get_delay(const FuStructQcIsValidationDone *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_IS_VALIDATION_DONE_OFFSET_OPCODE 0x0
#define FU_STRUCT_QC_IS_VALIDATION_DONE_OFFSET_DATA_LEN 0x1
#define FU_STRUCT_QC_IS_VALIDATION_DONE_OFFSET_DELAY 0x3
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_IS_VALIDATION_DONE_SIZE 0x5
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_IS_VALIDATION_DONE_DEFAULT_OPCODE FU_QC_OPCODE_IS_VALIDATION_DONE_CFM
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructQcTransferCompleteInd;

FuStructQcTransferCompleteInd *fu_struct_qc_transfer_complete_ind_ref(FuStructQcTransferCompleteInd *st) G_GNUC_NON_NULL(1);
void fu_struct_qc_transfer_complete_ind_unref(FuStructQcTransferCompleteInd *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructQcTransferCompleteInd, fu_struct_qc_transfer_complete_ind_unref)
FuStructQcTransferCompleteInd *fu_struct_qc_transfer_complete_ind_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_qc_transfer_complete_ind_get_data_len(const FuStructQcTransferCompleteInd *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_TRANSFER_COMPLETE_IND_OFFSET_OPCODE 0x0
#define FU_STRUCT_QC_TRANSFER_COMPLETE_IND_OFFSET_DATA_LEN 0x1
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_TRANSFER_COMPLETE_IND_SIZE 0x3
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_TRANSFER_COMPLETE_IND_DEFAULT_OPCODE FU_QC_OPCODE_TRANSFER_COMPLETE_IND
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructQcTransferComplete;

FuStructQcTransferComplete *fu_struct_qc_transfer_complete_ref(FuStructQcTransferComplete *st) G_GNUC_NON_NULL(1);
void fu_struct_qc_transfer_complete_unref(FuStructQcTransferComplete *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructQcTransferComplete, fu_struct_qc_transfer_complete_unref)
FuStructQcTransferComplete *fu_struct_qc_transfer_complete_new(void) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_qc_transfer_complete_set_data_len(FuStructQcTransferComplete *st, guint16 value) G_GNUC_NON_NULL(1);
void fu_struct_qc_transfer_complete_set_action(FuStructQcTransferComplete *st, FuQcTransferAction value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_TRANSFER_COMPLETE_OFFSET_OPCODE 0x0
#define FU_STRUCT_QC_TRANSFER_COMPLETE_OFFSET_DATA_LEN 0x1
#define FU_STRUCT_QC_TRANSFER_COMPLETE_OFFSET_ACTION 0x3
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_TRANSFER_COMPLETE_SIZE 0x4
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_TRANSFER_COMPLETE_DEFAULT_OPCODE FU_QC_OPCODE_TRANSFER_COMPLETE_RES
#define FU_STRUCT_QC_TRANSFER_COMPLETE_DEFAULT_DATA_LEN 0x01
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructQcProceedToCommit;

FuStructQcProceedToCommit *fu_struct_qc_proceed_to_commit_ref(FuStructQcProceedToCommit *st) G_GNUC_NON_NULL(1);
void fu_struct_qc_proceed_to_commit_unref(FuStructQcProceedToCommit *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructQcProceedToCommit, fu_struct_qc_proceed_to_commit_unref)
FuStructQcProceedToCommit *fu_struct_qc_proceed_to_commit_new(void) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_qc_proceed_to_commit_set_data_len(FuStructQcProceedToCommit *st, guint16 value) G_GNUC_NON_NULL(1);
void fu_struct_qc_proceed_to_commit_set_action(FuStructQcProceedToCommit *st, FuQcCommitAction value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_PROCEED_TO_COMMIT_OFFSET_OPCODE 0x0
#define FU_STRUCT_QC_PROCEED_TO_COMMIT_OFFSET_DATA_LEN 0x1
#define FU_STRUCT_QC_PROCEED_TO_COMMIT_OFFSET_ACTION 0x3
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_PROCEED_TO_COMMIT_SIZE 0x4
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_PROCEED_TO_COMMIT_DEFAULT_OPCODE FU_QC_OPCODE_PROCEED_TO_COMMIT
#define FU_STRUCT_QC_PROCEED_TO_COMMIT_DEFAULT_DATA_LEN 0x01
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructQcCommitReq;

FuStructQcCommitReq *fu_struct_qc_commit_req_ref(FuStructQcCommitReq *st) G_GNUC_NON_NULL(1);
void fu_struct_qc_commit_req_unref(FuStructQcCommitReq *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructQcCommitReq, fu_struct_qc_commit_req_unref)
FuStructQcCommitReq *fu_struct_qc_commit_req_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_qc_commit_req_get_data_len(const FuStructQcCommitReq *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_COMMIT_REQ_OFFSET_OPCODE 0x0
#define FU_STRUCT_QC_COMMIT_REQ_OFFSET_DATA_LEN 0x1
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_COMMIT_REQ_SIZE 0x3
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_COMMIT_REQ_DEFAULT_OPCODE FU_QC_OPCODE_COMMIT_REQ
#define FU_STRUCT_QC_COMMIT_REQ_DEFAULT_DATA_LEN 0x00
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructQcCommitCfm;

FuStructQcCommitCfm *fu_struct_qc_commit_cfm_ref(FuStructQcCommitCfm *st) G_GNUC_NON_NULL(1);
void fu_struct_qc_commit_cfm_unref(FuStructQcCommitCfm *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructQcCommitCfm, fu_struct_qc_commit_cfm_unref)
FuStructQcCommitCfm *fu_struct_qc_commit_cfm_new(void) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_qc_commit_cfm_set_data_len(FuStructQcCommitCfm *st, guint16 value) G_GNUC_NON_NULL(1);
void fu_struct_qc_commit_cfm_set_action(FuStructQcCommitCfm *st, FuQcCommitCfmAction value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_COMMIT_CFM_OFFSET_OPCODE 0x0
#define FU_STRUCT_QC_COMMIT_CFM_OFFSET_DATA_LEN 0x1
#define FU_STRUCT_QC_COMMIT_CFM_OFFSET_ACTION 0x3
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_COMMIT_CFM_SIZE 0x4
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_COMMIT_CFM_DEFAULT_OPCODE FU_QC_OPCODE_COMMIT_CFM
#define FU_STRUCT_QC_COMMIT_CFM_DEFAULT_DATA_LEN 0x01
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructQcComplete;

FuStructQcComplete *fu_struct_qc_complete_ref(FuStructQcComplete *st) G_GNUC_NON_NULL(1);
void fu_struct_qc_complete_unref(FuStructQcComplete *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructQcComplete, fu_struct_qc_complete_unref)
FuStructQcComplete *fu_struct_qc_complete_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_qc_complete_get_data_len(const FuStructQcComplete *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_COMPLETE_OFFSET_OPCODE 0x0
#define FU_STRUCT_QC_COMPLETE_OFFSET_DATA_LEN 0x1
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_COMPLETE_SIZE 0x3
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_COMPLETE_DEFAULT_OPCODE FU_QC_OPCODE_COMPLETE_IND
#define FU_STRUCT_QC_COMPLETE_DEFAULT_DATA_LEN 0x00
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructQcErrorInd;

FuStructQcErrorInd *fu_struct_qc_error_ind_ref(FuStructQcErrorInd *st) G_GNUC_NON_NULL(1);
void fu_struct_qc_error_ind_unref(FuStructQcErrorInd *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructQcErrorInd, fu_struct_qc_error_ind_unref)
FuStructQcErrorInd *fu_struct_qc_error_ind_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_qc_error_ind_get_data_len(const FuStructQcErrorInd *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_qc_error_ind_get_error_code(const FuStructQcErrorInd *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_ERROR_IND_OFFSET_OPCODE 0x0
#define FU_STRUCT_QC_ERROR_IND_OFFSET_DATA_LEN 0x1
#define FU_STRUCT_QC_ERROR_IND_OFFSET_ERROR_CODE 0x3
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_ERROR_IND_SIZE 0x5
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_ERROR_IND_DEFAULT_OPCODE FU_QC_OPCODE_ERROR_IND
#define FU_STRUCT_QC_ERROR_IND_DEFAULT_DATA_LEN 0x02
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructQcErrorRes;

FuStructQcErrorRes *fu_struct_qc_error_res_ref(FuStructQcErrorRes *st) G_GNUC_NON_NULL(1);
void fu_struct_qc_error_res_unref(FuStructQcErrorRes *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructQcErrorRes, fu_struct_qc_error_res_unref)
FuStructQcErrorRes *fu_struct_qc_error_res_new(void) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_qc_error_res_set_data_len(FuStructQcErrorRes *st, guint16 value) G_GNUC_NON_NULL(1);
void fu_struct_qc_error_res_set_error_code(FuStructQcErrorRes *st, guint16 value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_ERROR_RES_OFFSET_OPCODE 0x0
#define FU_STRUCT_QC_ERROR_RES_OFFSET_DATA_LEN 0x1
#define FU_STRUCT_QC_ERROR_RES_OFFSET_ERROR_CODE 0x3
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_ERROR_RES_SIZE 0x5
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_ERROR_RES_DEFAULT_OPCODE FU_QC_OPCODE_ERROR_RES
#define FU_STRUCT_QC_ERROR_RES_DEFAULT_DATA_LEN 0x02
#endif
