/* auto-generated, do not modify */
#pragma once
#include <fwupd-common.h>
typedef enum {
    FU_CFU_OFFER_INFO_CODE_START_ENTIRE_TRANSACTION = 0x00,
    FU_CFU_OFFER_INFO_CODE_START_OFFER_LIST = 0x01,
    FU_CFU_OFFER_INFO_CODE_END_OFFER_LIST = 0x02,
} FuCfuOfferInfoCode;
const gchar *fu_cfu_offer_info_code_to_string(FuCfuOfferInfoCode val);
typedef enum {
    FU_CFU_RR_CODE_OFFER_REJECT_OLD_FIRMWARE = 0x00,
    FU_CFU_RR_CODE_OFFER_REJECT_INV_COMPONENT = 0x01,
    FU_CFU_RR_CODE_UPDATE_OFFER_SWAP_PENDING = 0x02,
    FU_CFU_RR_CODE_WRONG_BANK = 0x04,
    FU_CFU_RR_CODE_SIGN_RULE = 0xE0,
    FU_CFU_RR_CODE_VER_RELEASE_DEBUG = 0xE1,
    FU_CFU_RR_CODE_DEBUG_SAME_VERSION = 0xE2,
    FU_CFU_RR_CODE_NONE = 0xFF,
} FuCfuRrCode;
const gchar *fu_cfu_rr_code_to_string(FuCfuRrCode val);
typedef enum {
    FU_CFU_OFFER_STATUS_SKIP = 0x00,
    FU_CFU_OFFER_STATUS_ACCEPT = 0x01,
    FU_CFU_OFFER_STATUS_REJECT = 0x02,
    FU_CFU_OFFER_STATUS_BUSY = 0x03,
    FU_CFU_OFFER_STATUS_COMMAND = 0x04,
    FU_CFU_OFFER_STATUS_CMD_NOT_SUPPORTED = 0xFF,
} FuCfuOfferStatus;
const gchar *fu_cfu_offer_status_to_string(FuCfuOfferStatus val);
typedef enum {
    FU_CFU_CONTENT_FLAG_VERIFY = 0x08,
    FU_CFU_CONTENT_FLAG_TEST_REPLACE_FILESYSTEM = 0x20,
    FU_CFU_CONTENT_FLAG_LAST_BLOCK = 0x40,
    FU_CFU_CONTENT_FLAG_FIRST_BLOCK = 0x80,
} FuCfuContentFlag;
typedef enum {
    FU_CFU_CONTENT_STATUS_SUCCESS = 0x00,
    FU_CFU_CONTENT_STATUS_ERROR_PREPARE = 0x01,
    FU_CFU_CONTENT_STATUS_ERROR_WRITE = 0x02,
    FU_CFU_CONTENT_STATUS_ERROR_COMPLETE = 0x03,
    FU_CFU_CONTENT_STATUS_ERROR_VERIFY = 0x04,
    FU_CFU_CONTENT_STATUS_ERROR_CRC = 0x05,
    FU_CFU_CONTENT_STATUS_ERROR_SIGNATURE = 0x06,
    FU_CFU_CONTENT_STATUS_ERROR_VERSION = 0x07,
    FU_CFU_CONTENT_STATUS_SWAP_PENDING = 0x08,
    FU_CFU_CONTENT_STATUS_ERROR_INVALID_ADDR0X09,
    FU_CFU_CONTENT_STATUS_ERROR_NO_OFFER = 0x0A,
    FU_CFU_CONTENT_STATUS_ERROR_INVALID = 0x0B,
} FuCfuContentStatus;
const gchar *fu_cfu_content_status_to_string(FuCfuContentStatus val);

GByteArray *fu_struct_cfu_get_version_rsp_new(void);
GByteArray *fu_struct_cfu_get_version_rsp_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error);
guint8 fu_struct_cfu_get_version_rsp_get_component_cnt(const GByteArray *st);
guint8 fu_struct_cfu_get_version_rsp_get_flags(const GByteArray *st);
void fu_struct_cfu_get_version_rsp_set_component_cnt(GByteArray *st, guint8 value);
void fu_struct_cfu_get_version_rsp_set_flags(GByteArray *st, guint8 value);
#define FU_STRUCT_CFU_GET_VERSION_RSP_OFFSET_COMPONENT_CNT 0x0
#define FU_STRUCT_CFU_GET_VERSION_RSP_OFFSET_FLAGS 0x3
#define FU_STRUCT_CFU_GET_VERSION_RSP_SIZE 0x4

GByteArray *fu_struct_cfu_get_version_rsp_component_new(void);
GByteArray *fu_struct_cfu_get_version_rsp_component_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error);
guint32 fu_struct_cfu_get_version_rsp_component_get_fw_version(const GByteArray *st);
guint8 fu_struct_cfu_get_version_rsp_component_get_flags(const GByteArray *st);
guint8 fu_struct_cfu_get_version_rsp_component_get_component_id(const GByteArray *st);
void fu_struct_cfu_get_version_rsp_component_set_fw_version(GByteArray *st, guint32 value);
void fu_struct_cfu_get_version_rsp_component_set_flags(GByteArray *st, guint8 value);
void fu_struct_cfu_get_version_rsp_component_set_component_id(GByteArray *st, guint8 value);
#define FU_STRUCT_CFU_GET_VERSION_RSP_COMPONENT_OFFSET_FW_VERSION 0x0
#define FU_STRUCT_CFU_GET_VERSION_RSP_COMPONENT_OFFSET_FLAGS 0x4
#define FU_STRUCT_CFU_GET_VERSION_RSP_COMPONENT_OFFSET_COMPONENT_ID 0x5
#define FU_STRUCT_CFU_GET_VERSION_RSP_COMPONENT_SIZE 0x8

GByteArray *fu_struct_cfu_offer_info_req_new(void);
void fu_struct_cfu_offer_info_req_set_code(GByteArray *st, FuCfuOfferInfoCode value);
#define FU_STRUCT_CFU_OFFER_INFO_REQ_OFFSET_CODE 0x0
#define FU_STRUCT_CFU_OFFER_INFO_REQ_OFFSET_COMPONENT_ID 0x2
#define FU_STRUCT_CFU_OFFER_INFO_REQ_OFFSET_TOKEN 0x3
#define FU_STRUCT_CFU_OFFER_INFO_REQ_SIZE 0x10
#define FU_STRUCT_CFU_OFFER_INFO_REQ_DEFAULT_COMPONENT_ID 0xFF
#define FU_STRUCT_CFU_OFFER_INFO_REQ_DEFAULT_TOKEN 0xDE

GByteArray *fu_struct_cfu_offer_rsp_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error);
guint8 fu_struct_cfu_offer_rsp_get_token(const GByteArray *st);
FuCfuRrCode fu_struct_cfu_offer_rsp_get_rr_code(const GByteArray *st);
FuCfuOfferStatus fu_struct_cfu_offer_rsp_get_status(const GByteArray *st);
#define FU_STRUCT_CFU_OFFER_RSP_OFFSET_TOKEN 0x3
#define FU_STRUCT_CFU_OFFER_RSP_OFFSET_RR_CODE 0x8
#define FU_STRUCT_CFU_OFFER_RSP_OFFSET_STATUS 0xC
#define FU_STRUCT_CFU_OFFER_RSP_SIZE 0x10

GByteArray *fu_struct_cfu_content_req_new(void);
FuCfuContentFlag fu_struct_cfu_content_req_get_flags(const GByteArray *st);
guint8 fu_struct_cfu_content_req_get_data_length(const GByteArray *st);
guint16 fu_struct_cfu_content_req_get_seq_number(const GByteArray *st);
guint32 fu_struct_cfu_content_req_get_address(const GByteArray *st);
void fu_struct_cfu_content_req_set_flags(GByteArray *st, FuCfuContentFlag value);
void fu_struct_cfu_content_req_set_data_length(GByteArray *st, guint8 value);
void fu_struct_cfu_content_req_set_seq_number(GByteArray *st, guint16 value);
void fu_struct_cfu_content_req_set_address(GByteArray *st, guint32 value);
#define FU_STRUCT_CFU_CONTENT_REQ_OFFSET_FLAGS 0x0
#define FU_STRUCT_CFU_CONTENT_REQ_OFFSET_DATA_LENGTH 0x1
#define FU_STRUCT_CFU_CONTENT_REQ_OFFSET_SEQ_NUMBER 0x2
#define FU_STRUCT_CFU_CONTENT_REQ_OFFSET_ADDRESS 0x4
#define FU_STRUCT_CFU_CONTENT_REQ_SIZE 0x8

GByteArray *fu_struct_cfu_content_rsp_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error);
guint16 fu_struct_cfu_content_rsp_get_seq_number(const GByteArray *st);
FuCfuContentStatus fu_struct_cfu_content_rsp_get_status(const GByteArray *st);
#define FU_STRUCT_CFU_CONTENT_RSP_OFFSET_SEQ_NUMBER 0x0
#define FU_STRUCT_CFU_CONTENT_RSP_OFFSET_STATUS 0x4
#define FU_STRUCT_CFU_CONTENT_RSP_SIZE 0x10
