/* auto-generated, do not modify */
#pragma once
#include <fwupd-common.h>
typedef enum {
    FU_CCGX_IMAGE_TYPE_UNKNOWN,
    FU_CCGX_IMAGE_TYPE_SINGLE,
    FU_CCGX_IMAGE_TYPE_DUAL_SYMMETRIC,
    FU_CCGX_IMAGE_TYPE_DUAL_ASYMMETRIC,
    FU_CCGX_IMAGE_TYPE_DUAL_ASYMMETRIC_VARIABLE,
} FuCcgxImageType;
const gchar *fu_ccgx_image_type_to_string(FuCcgxImageType val);
FuCcgxImageType fu_ccgx_image_type_from_string(const gchar *val);
typedef enum {
    FU_CCGX_FW_MODE_BOOT,
    FU_CCGX_FW_MODE_FW1,
    FU_CCGX_FW_MODE_FW2,
    FU_CCGX_FW_MODE_LAST,
} FuCcgxFwMode;
const gchar *fu_ccgx_fw_mode_to_string(FuCcgxFwMode val);
typedef enum {
    FU_CCGX_PD_RESP_NO_RESPONSE,
    FU_CCGX_PD_RESP_SUCCESS = 0x02,
    FU_CCGX_PD_RESP_FLASH_DATA_AVAILABLE,
    FU_CCGX_PD_RESP_INVALID_COMMAND = 0x05,
    FU_CCGX_PD_RESP_COLLISION_DETECTED,
    FU_CCGX_PD_RESP_FLASH_UPDATE_FAILED,
    FU_CCGX_PD_RESP_INVALID_FW,
    FU_CCGX_PD_RESP_INVALID_ARGUMENTS,
    FU_CCGX_PD_RESP_NOT_SUPPORTED,
    FU_CCGX_PD_RESP_TRANSACTION_FAILED = 0x0C,
    FU_CCGX_PD_RESP_PD_COMMAND_FAILED,
    FU_CCGX_PD_RESP_UNDEFINED,
    FU_CCGX_PD_RESP_RA_DETECT = 0x10,
    FU_CCGX_PD_RESP_RA_REMOVED,
    FU_CCGX_PD_RESP_RESET_COMPLETE = 0x80,
    FU_CCGX_PD_RESP_MESSAGE_QUEUE_OVERFLOW,
    FU_CCGX_PD_RESP_OVER_CURRENT_DETECTED,
    FU_CCGX_PD_RESP_OVER_VOLTAGE_DETECTED,
    FU_CCGX_PD_RESP_TYPE_C_CONNECTED,
    FU_CCGX_PD_RESP_TYPE_C_DISCONNECTED,
    FU_CCGX_PD_RESP_PD_CONTRACT_ESTABLISHED,
    FU_CCGX_PD_RESP_DR_SWAP,
    FU_CCGX_PD_RESP_PR_SWAP,
    FU_CCGX_PD_RESP_VCON_SWAP,
    FU_CCGX_PD_RESP_PS_RDY,
    FU_CCGX_PD_RESP_GOTOMIN,
    FU_CCGX_PD_RESP_ACCEPT_MESSAGE,
    FU_CCGX_PD_RESP_REJECT_MESSAGE,
    FU_CCGX_PD_RESP_WAIT_MESSAGE,
    FU_CCGX_PD_RESP_HARD_RESET,
    FU_CCGX_PD_RESP_VDM_RECEIVED,
    FU_CCGX_PD_RESP_SRC_CAP_RCVD,
    FU_CCGX_PD_RESP_SINK_CAP_RCVD,
    FU_CCGX_PD_RESP_DP_ALTERNATE_MODE,
    FU_CCGX_PD_RESP_DP_DEVICE_NONNECTED,
    FU_CCGX_PD_RESP_DP_DEVICE_NOT_CONNECTED,
    FU_CCGX_PD_RESP_DP_SID_NOT_FOUND,
    FU_CCGX_PD_RESP_MULTIPLE_SVID_DISCOVERED,
    FU_CCGX_PD_RESP_DP_FUNCTION_NOT_SUPPORTED,
    FU_CCGX_PD_RESP_DP_PORT_CONFIG_NOT_SUPPORTED,
    FU_CCGX_PD_RESP_HARD_RESET_SENT,
    FU_CCGX_PD_RESP_SOFT_RESET_SENT,
    FU_CCGX_PD_RESP_CABLE_RESET_SENT,
    FU_CCGX_PD_RESP_SOURCE_DISABLED_STATE_ENTERED,
    FU_CCGX_PD_RESP_SENDER_RESPONSE_TIMER_TIMEOUT,
    FU_CCGX_PD_RESP_NO_VDM_RESPONSE_RECEIVED,
} FuCcgxPdResp;
const gchar *fu_ccgx_pd_resp_to_string(FuCcgxPdResp val);

GByteArray *fu_struct_ccgx_metadata_hdr_new(void);
GByteArray *fu_struct_ccgx_metadata_hdr_parse_bytes(GBytes *blob, gsize offset, GError **error);
guint8 fu_struct_ccgx_metadata_hdr_get_fw_checksum(const GByteArray *st);
guint32 fu_struct_ccgx_metadata_hdr_get_fw_entry(const GByteArray *st);
guint16 fu_struct_ccgx_metadata_hdr_get_last_boot_row(const GByteArray *st);
guint32 fu_struct_ccgx_metadata_hdr_get_fw_size(const GByteArray *st);
guint16 fu_struct_ccgx_metadata_hdr_get_metadata_valid(const GByteArray *st);
guint32 fu_struct_ccgx_metadata_hdr_get_boot_seq(const GByteArray *st);
void fu_struct_ccgx_metadata_hdr_set_fw_checksum(GByteArray *st, guint8 value);
void fu_struct_ccgx_metadata_hdr_set_fw_entry(GByteArray *st, guint32 value);
void fu_struct_ccgx_metadata_hdr_set_last_boot_row(GByteArray *st, guint16 value);
void fu_struct_ccgx_metadata_hdr_set_fw_size(GByteArray *st, guint32 value);
void fu_struct_ccgx_metadata_hdr_set_metadata_valid(GByteArray *st, guint16 value);
void fu_struct_ccgx_metadata_hdr_set_boot_seq(GByteArray *st, guint32 value);
#define FU_STRUCT_CCGX_METADATA_HDR_OFFSET_FW_CHECKSUM 0x0
#define FU_STRUCT_CCGX_METADATA_HDR_OFFSET_FW_ENTRY 0x1
#define FU_STRUCT_CCGX_METADATA_HDR_OFFSET_LAST_BOOT_ROW 0x5
#define FU_STRUCT_CCGX_METADATA_HDR_OFFSET_FW_SIZE 0x9
#define FU_STRUCT_CCGX_METADATA_HDR_OFFSET_METADATA_VALID 0x16
#define FU_STRUCT_CCGX_METADATA_HDR_OFFSET_BOOT_SEQ 0x1C
#define FU_STRUCT_CCGX_METADATA_HDR_SIZE 0x20
#define FU_STRUCT_CCGX_METADATA_HDR_DEFAULT_METADATA_VALID 0x4359
