/* auto-generated, do not modify */
#pragma once
#include <fwupd-common.h>
typedef enum {
    FU_SYNAPROM_FIRMWARE_TAG_MFW_UPDATE_HEADER = 0x0001,
    FU_SYNAPROM_FIRMWARE_TAG_MFW_UPDATE_PAYLOAD = 0x0002,
    FU_SYNAPROM_FIRMWARE_TAG_CFG_UPDATE_HEADER = 0x0003,
    FU_SYNAPROM_FIRMWARE_TAG_CFG_UPDATE_PAYLOAD = 0x0004,
} FuSynapromFirmwareTag;
const gchar *fu_synaprom_firmware_tag_to_string(FuSynapromFirmwareTag val);

GByteArray *fu_struct_synaprom_mfw_hdr_new(void);
GByteArray *fu_struct_synaprom_mfw_hdr_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error);
guint32 fu_struct_synaprom_mfw_hdr_get_product(const GByteArray *st);
guint32 fu_struct_synaprom_mfw_hdr_get_id(const GByteArray *st);
guint32 fu_struct_synaprom_mfw_hdr_get_buildtime(const GByteArray *st);
guint32 fu_struct_synaprom_mfw_hdr_get_buildnum(const GByteArray *st);
guint8 fu_struct_synaprom_mfw_hdr_get_vmajor(const GByteArray *st);
guint8 fu_struct_synaprom_mfw_hdr_get_vminor(const GByteArray *st);
const guint8 *fu_struct_synaprom_mfw_hdr_get_unused(const GByteArray *st, gsize *bufsz);
void fu_struct_synaprom_mfw_hdr_set_product(GByteArray *st, guint32 value);
void fu_struct_synaprom_mfw_hdr_set_id(GByteArray *st, guint32 value);
void fu_struct_synaprom_mfw_hdr_set_buildtime(GByteArray *st, guint32 value);
void fu_struct_synaprom_mfw_hdr_set_buildnum(GByteArray *st, guint32 value);
void fu_struct_synaprom_mfw_hdr_set_vmajor(GByteArray *st, guint8 value);
void fu_struct_synaprom_mfw_hdr_set_vminor(GByteArray *st, guint8 value);
gboolean fu_struct_synaprom_mfw_hdr_set_unused(GByteArray *st, const guint8 *buf, gsize bufsz, GError **error);
#define FU_STRUCT_SYNAPROM_MFW_HDR_OFFSET_PRODUCT 0x0
#define FU_STRUCT_SYNAPROM_MFW_HDR_OFFSET_ID 0x4
#define FU_STRUCT_SYNAPROM_MFW_HDR_OFFSET_BUILDTIME 0x8
#define FU_STRUCT_SYNAPROM_MFW_HDR_OFFSET_BUILDNUM 0xC
#define FU_STRUCT_SYNAPROM_MFW_HDR_OFFSET_VMAJOR 0x10
#define FU_STRUCT_SYNAPROM_MFW_HDR_OFFSET_VMINOR 0x11
#define FU_STRUCT_SYNAPROM_MFW_HDR_OFFSET_UNUSED 0x12
#define FU_STRUCT_SYNAPROM_MFW_HDR_SIZE_UNUSED 0x6
#define FU_STRUCT_SYNAPROM_MFW_HDR_SIZE 0x18
#define FU_STRUCT_SYNAPROM_MFW_HDR_DEFAULT_ID 0xFF
#define FU_STRUCT_SYNAPROM_MFW_HDR_DEFAULT_BUILDTIME 0xFF
#define FU_STRUCT_SYNAPROM_MFW_HDR_DEFAULT_BUILDNUM 0xFF
#define FU_STRUCT_SYNAPROM_MFW_HDR_DEFAULT_VMAJOR 10
#define FU_STRUCT_SYNAPROM_MFW_HDR_DEFAULT_VMINOR 1

GByteArray *fu_struct_synaprom_hdr_new(void);
GByteArray *fu_struct_synaprom_hdr_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error);
FuSynapromFirmwareTag fu_struct_synaprom_hdr_get_tag(const GByteArray *st);
guint32 fu_struct_synaprom_hdr_get_bufsz(const GByteArray *st);
void fu_struct_synaprom_hdr_set_tag(GByteArray *st, FuSynapromFirmwareTag value);
void fu_struct_synaprom_hdr_set_bufsz(GByteArray *st, guint32 value);
#define FU_STRUCT_SYNAPROM_HDR_OFFSET_TAG 0x0
#define FU_STRUCT_SYNAPROM_HDR_OFFSET_BUFSZ 0x2
#define FU_STRUCT_SYNAPROM_HDR_SIZE 0x6

GByteArray *fu_struct_synaprom_cfg_hdr_parse_bytes(GBytes *blob, gsize offset, GError **error);
guint32 fu_struct_synaprom_cfg_hdr_get_product(const GByteArray *st);
guint32 fu_struct_synaprom_cfg_hdr_get_id1(const GByteArray *st);
guint32 fu_struct_synaprom_cfg_hdr_get_id2(const GByteArray *st);
guint16 fu_struct_synaprom_cfg_hdr_get_version(const GByteArray *st);
#define FU_STRUCT_SYNAPROM_CFG_HDR_OFFSET_PRODUCT 0x0
#define FU_STRUCT_SYNAPROM_CFG_HDR_OFFSET_ID1 0x4
#define FU_STRUCT_SYNAPROM_CFG_HDR_OFFSET_ID2 0x8
#define FU_STRUCT_SYNAPROM_CFG_HDR_OFFSET_VERSION 0xC
#define FU_STRUCT_SYNAPROM_CFG_HDR_SIZE 0x10
#define FU_STRUCT_SYNAPROM_CFG_HDR_DEFAULT_PRODUCT 65

GByteArray *fu_struct_synaprom_iota_config_version_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error);
guint32 fu_struct_synaprom_iota_config_version_get_config_id1(const GByteArray *st);
guint32 fu_struct_synaprom_iota_config_version_get_config_id2(const GByteArray *st);
guint16 fu_struct_synaprom_iota_config_version_get_version(const GByteArray *st);
#define FU_STRUCT_SYNAPROM_IOTA_CONFIG_VERSION_OFFSET_CONFIG_ID1 0x0
#define FU_STRUCT_SYNAPROM_IOTA_CONFIG_VERSION_OFFSET_CONFIG_ID2 0x4
#define FU_STRUCT_SYNAPROM_IOTA_CONFIG_VERSION_OFFSET_VERSION 0x8
#define FU_STRUCT_SYNAPROM_IOTA_CONFIG_VERSION_SIZE 0x10

GByteArray *fu_struct_synaprom_reply_iota_find_hdr_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error);
guint16 fu_struct_synaprom_reply_iota_find_hdr_get_status(const GByteArray *st);
guint32 fu_struct_synaprom_reply_iota_find_hdr_get_fullsize(const GByteArray *st);
guint16 fu_struct_synaprom_reply_iota_find_hdr_get_nbytes(const GByteArray *st);
guint16 fu_struct_synaprom_reply_iota_find_hdr_get_itype(const GByteArray *st);
#define FU_STRUCT_SYNAPROM_REPLY_IOTA_FIND_HDR_OFFSET_STATUS 0x0
#define FU_STRUCT_SYNAPROM_REPLY_IOTA_FIND_HDR_OFFSET_FULLSIZE 0x2
#define FU_STRUCT_SYNAPROM_REPLY_IOTA_FIND_HDR_OFFSET_NBYTES 0x6
#define FU_STRUCT_SYNAPROM_REPLY_IOTA_FIND_HDR_OFFSET_ITYPE 0x8
#define FU_STRUCT_SYNAPROM_REPLY_IOTA_FIND_HDR_SIZE 0xA

GByteArray *fu_struct_synaprom_cmd_iota_find_new(void);
guint16 fu_struct_synaprom_cmd_iota_find_get_itype(const GByteArray *st);
guint16 fu_struct_synaprom_cmd_iota_find_get_flags(const GByteArray *st);
guint8 fu_struct_synaprom_cmd_iota_find_get_maxniotas(const GByteArray *st);
guint8 fu_struct_synaprom_cmd_iota_find_get_firstidx(const GByteArray *st);
guint32 fu_struct_synaprom_cmd_iota_find_get_offset(const GByteArray *st);
guint32 fu_struct_synaprom_cmd_iota_find_get_nbytes(const GByteArray *st);
void fu_struct_synaprom_cmd_iota_find_set_itype(GByteArray *st, guint16 value);
void fu_struct_synaprom_cmd_iota_find_set_flags(GByteArray *st, guint16 value);
void fu_struct_synaprom_cmd_iota_find_set_maxniotas(GByteArray *st, guint8 value);
void fu_struct_synaprom_cmd_iota_find_set_firstidx(GByteArray *st, guint8 value);
void fu_struct_synaprom_cmd_iota_find_set_offset(GByteArray *st, guint32 value);
void fu_struct_synaprom_cmd_iota_find_set_nbytes(GByteArray *st, guint32 value);
#define FU_STRUCT_SYNAPROM_CMD_IOTA_FIND_OFFSET_ITYPE 0x0
#define FU_STRUCT_SYNAPROM_CMD_IOTA_FIND_OFFSET_FLAGS 0x2
#define FU_STRUCT_SYNAPROM_CMD_IOTA_FIND_OFFSET_MAXNIOTAS 0x4
#define FU_STRUCT_SYNAPROM_CMD_IOTA_FIND_OFFSET_FIRSTIDX 0x5
#define FU_STRUCT_SYNAPROM_CMD_IOTA_FIND_OFFSET_OFFSET 0x8
#define FU_STRUCT_SYNAPROM_CMD_IOTA_FIND_OFFSET_NBYTES 0xC
#define FU_STRUCT_SYNAPROM_CMD_IOTA_FIND_SIZE 0x10
