/* auto-generated, do not modify */
#pragma once
#include <fwupd-common.h>
typedef enum {
    FU_EFI_SIGNATURE_KIND_UNKNOWN,
    FU_EFI_SIGNATURE_KIND_SHA256,
    FU_EFI_SIGNATURE_KIND_X509,
} FuEfiSignatureKind;
const gchar *fu_efi_signature_kind_to_string(FuEfiSignatureKind val);
typedef enum {
    FU_EFI_FILE_ATTRIB_NONE = 0x00,
    FU_EFI_FILE_ATTRIB_LARGE_FILE = 0x01,
    FU_EFI_FILE_ATTRIB_DATA_ALIGNMENT2 = 0x02,
    FU_EFI_FILE_ATTRIB_FIXED = 0x04,
    FU_EFI_FILE_ATTRIB_DATA_ALIGNMENT = 0x38,
    FU_EFI_FILE_ATTRIB_CHECKSUM = 0x40,
} FuEfiFileAttrib;
typedef enum {
    FU_EFI_FILE_TYPE_ALL = 0x00,
    FU_EFI_FILE_TYPE_RAW = 0x01,
    FU_EFI_FILE_TYPE_FREEFORM = 0x02,
    FU_EFI_FILE_TYPE_SECURITY_CORE = 0x03,
    FU_EFI_FILE_TYPE_PEI_CORE = 0x04,
    FU_EFI_FILE_TYPE_DXE_CORE = 0x05,
    FU_EFI_FILE_TYPE_PEIM = 0x06,
    FU_EFI_FILE_TYPE_DRIVER = 0x07,
    FU_EFI_FILE_TYPE_COMBINED_PEIM_DRIVER = 0x08,
    FU_EFI_FILE_TYPE_APPLICATION = 0x09,
    FU_EFI_FILE_TYPE_MM = 0x0A,
    FU_EFI_FILE_TYPE_FIRMWARE_VOLUME_IMAGE = 0x0B,
    FU_EFI_FILE_TYPE_COMBINED_MM_DXE = 0x0C,
    FU_EFI_FILE_TYPE_MM_CORE = 0x0D,
    FU_EFI_FILE_TYPE_MM_STANDALONE = 0x0E,
    FU_EFI_FILE_TYPE_MM_CORE_STANDALONE = 0x0F,
    FU_EFI_FILE_TYPE_FFS_PAD = 0xF0,
} FuEfiFileType;
const gchar *fu_efi_file_type_to_string(FuEfiFileType val);
typedef enum {
    FU_EFI_SECTION_TYPE_COMPRESSION = 0x01,
    FU_EFI_SECTION_TYPE_GUID_DEFINED = 0x02,
    FU_EFI_SECTION_TYPE_DISPOSABLE = 0x03,
    FU_EFI_SECTION_TYPE_PE32 = 0x10,
    FU_EFI_SECTION_TYPE_PIC = 0x11,
    FU_EFI_SECTION_TYPE_TE = 0x12,
    FU_EFI_SECTION_TYPE_DXE_DEPEX = 0x13,
    FU_EFI_SECTION_TYPE_VERSION = 0x14,
    FU_EFI_SECTION_TYPE_USER_INTERFACE = 0x15,
    FU_EFI_SECTION_TYPE_COMPATIBILITY16 = 0x16,
    FU_EFI_SECTION_TYPE_VOLUME_IMAGE = 0x17,
    FU_EFI_SECTION_TYPE_FREEFORM_SUBTYPE_GUID = 0x18,
    FU_EFI_SECTION_TYPE_RAW = 0x19,
    FU_EFI_SECTION_TYPE_PEI_DEPEX = 0x1B,
    FU_EFI_SECTION_TYPE_MM_DEPEX = 0x1C,
} FuEfiSectionType;
const gchar *fu_efi_section_type_to_string(FuEfiSectionType val);
typedef enum {
    FU_EFI_LOAD_OPTION_ATTRS_ACTIVE = 0x1,
    FU_EFI_LOAD_OPTION_ATTRS_FORCE_RECONNECT = 0x2,
    FU_EFI_LOAD_OPTION_ATTRS_HIDDEN = 0x8,
    FU_EFI_LOAD_OPTION_ATTRS_CATEGORY = 0x1F00,
    FU_EFI_LOAD_OPTION_ATTRS_CATEGORY_BOOT = 0x0,
    FU_EFI_LOAD_OPTION_ATTRS_CATEGORY_AP = 0x100,
} FuEfiLoadOptionAttrs;
typedef enum {
    FU_EFI_DEVICE_PATH_TYPE_HARDWARE = 0x01,
    FU_EFI_DEVICE_PATH_TYPE_ACPI,
    FU_EFI_DEVICE_PATH_TYPE_MESSAGE,
    FU_EFI_DEVICE_PATH_TYPE_MEDIA,
    FU_EFI_DEVICE_PATH_TYPE_BIOS_BOOT,
    FU_EFI_DEVICE_PATH_TYPE_END = 0x7F,
} FuEfiDevicePathType;
typedef enum {
    FU_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE_HARD_DRIVE = 0x01,
    FU_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE_CDROM = 0x02,
    FU_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE_VENDOR = 0x03,
    FU_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE_FILE_PATH = 0x04,
    FU_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE_MEDIA_PROTOCOL = 0x05,
    FU_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE_PIWG_FIRMWARE_FILE = 0x06,
    FU_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE_PIWG_FIRMWARE_VOLUME = 0x07,
    FU_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE_RELATIVE_OFFSET_RANGE = 0x08,
    FU_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE_RAM_DISK_DEVICE_PATH = 0x09,
} FuEfiHardDriveDevicePathSubtype;
typedef enum {
    FU_EFI_HARD_DRIVE_DEVICE_PATH_PARTITION_FORMAT_LEGACY_MBR = 0x01,
    FU_EFI_HARD_DRIVE_DEVICE_PATH_PARTITION_FORMAT_GUID_PARTITION_TABLE = 0x02,
} FuEfiHardDriveDevicePathPartitionFormat;
const gchar *fu_efi_hard_drive_device_path_partition_format_to_string(FuEfiHardDriveDevicePathPartitionFormat val);
FuEfiHardDriveDevicePathPartitionFormat fu_efi_hard_drive_device_path_partition_format_from_string(const gchar *val);
typedef enum {
    FU_EFI_HARD_DRIVE_DEVICE_PATH_SIGNATURE_TYPE_NONE,
    FU_EFI_HARD_DRIVE_DEVICE_PATH_SIGNATURE_TYPE_ADDR1B8,
    FU_EFI_HARD_DRIVE_DEVICE_PATH_SIGNATURE_TYPE_GUID,
} FuEfiHardDriveDevicePathSignatureType;
const gchar *fu_efi_hard_drive_device_path_signature_type_to_string(FuEfiHardDriveDevicePathSignatureType val);
FuEfiHardDriveDevicePathSignatureType fu_efi_hard_drive_device_path_signature_type_from_string(const gchar *val);

GByteArray *fu_struct_efi_file_new(void);
GByteArray *fu_struct_efi_file_parse_bytes(GBytes *blob, gsize offset, GError **error);
gboolean fu_struct_efi_file_validate(const guint8 *buf, gsize bufsz, gsize offset, GError **error);
const fwupd_guid_t *fu_struct_efi_file_get_name(const GByteArray *st);
guint8 fu_struct_efi_file_get_hdr_checksum(const GByteArray *st);
guint8 fu_struct_efi_file_get_data_checksum(const GByteArray *st);
FuEfiFileType fu_struct_efi_file_get_type(const GByteArray *st);
guint8 fu_struct_efi_file_get_attrs(const GByteArray *st);
guint32 fu_struct_efi_file_get_size(const GByteArray *st);
void fu_struct_efi_file_set_name(GByteArray *st, const fwupd_guid_t *value);
void fu_struct_efi_file_set_hdr_checksum(GByteArray *st, guint8 value);
void fu_struct_efi_file_set_data_checksum(GByteArray *st, guint8 value);
void fu_struct_efi_file_set_type(GByteArray *st, FuEfiFileType value);
void fu_struct_efi_file_set_attrs(GByteArray *st, guint8 value);
void fu_struct_efi_file_set_size(GByteArray *st, guint32 value);
#define FU_STRUCT_EFI_FILE_OFFSET_NAME 0x0
#define FU_STRUCT_EFI_FILE_OFFSET_HDR_CHECKSUM 0x10
#define FU_STRUCT_EFI_FILE_OFFSET_DATA_CHECKSUM 0x11
#define FU_STRUCT_EFI_FILE_OFFSET_TYPE 0x12
#define FU_STRUCT_EFI_FILE_OFFSET_ATTRS 0x13
#define FU_STRUCT_EFI_FILE_OFFSET_SIZE 0x14
#define FU_STRUCT_EFI_FILE_OFFSET_STATE 0x17
#define FU_STRUCT_EFI_FILE_SIZE_NAME 0x10
#define FU_STRUCT_EFI_FILE_SIZE 0x18
#define FU_STRUCT_EFI_FILE_DEFAULT_STATE 0xF8

GByteArray *fu_struct_efi_section_new(void);
GByteArray *fu_struct_efi_section_parse_bytes(GBytes *blob, gsize offset, GError **error);
gboolean fu_struct_efi_section_validate(const guint8 *buf, gsize bufsz, gsize offset, GError **error);
guint32 fu_struct_efi_section_get_size(const GByteArray *st);
FuEfiSectionType fu_struct_efi_section_get_type(const GByteArray *st);
void fu_struct_efi_section_set_size(GByteArray *st, guint32 value);
void fu_struct_efi_section_set_type(GByteArray *st, FuEfiSectionType value);
#define FU_STRUCT_EFI_SECTION_OFFSET_SIZE 0x0
#define FU_STRUCT_EFI_SECTION_OFFSET_TYPE 0x3
#define FU_STRUCT_EFI_SECTION_SIZE 0x4

GByteArray *fu_struct_efi_section_guid_defined_new(void);
GByteArray *fu_struct_efi_section_guid_defined_parse_bytes(GBytes *blob, gsize offset, GError **error);
gboolean fu_struct_efi_section_guid_defined_validate(const guint8 *buf, gsize bufsz, gsize offset, GError **error);
const fwupd_guid_t *fu_struct_efi_section_guid_defined_get_name(const GByteArray *st);
guint16 fu_struct_efi_section_guid_defined_get_offset(const GByteArray *st);
guint16 fu_struct_efi_section_guid_defined_get_attr(const GByteArray *st);
void fu_struct_efi_section_guid_defined_set_name(GByteArray *st, const fwupd_guid_t *value);
void fu_struct_efi_section_guid_defined_set_offset(GByteArray *st, guint16 value);
void fu_struct_efi_section_guid_defined_set_attr(GByteArray *st, guint16 value);
#define FU_STRUCT_EFI_SECTION_GUID_DEFINED_OFFSET_NAME 0x0
#define FU_STRUCT_EFI_SECTION_GUID_DEFINED_OFFSET_OFFSET 0x10
#define FU_STRUCT_EFI_SECTION_GUID_DEFINED_OFFSET_ATTR 0x12
#define FU_STRUCT_EFI_SECTION_GUID_DEFINED_SIZE_NAME 0x10
#define FU_STRUCT_EFI_SECTION_GUID_DEFINED_SIZE 0x14

GByteArray *fu_struct_efi_volume_new(void);
GByteArray *fu_struct_efi_volume_parse_bytes(GBytes *blob, gsize offset, GError **error);
gboolean fu_struct_efi_volume_validate_bytes(GBytes *blob, gsize offset, GError **error);
const fwupd_guid_t *fu_struct_efi_volume_get_zero_vector(const GByteArray *st);
const fwupd_guid_t *fu_struct_efi_volume_get_guid(const GByteArray *st);
guint64 fu_struct_efi_volume_get_length(const GByteArray *st);
guint32 fu_struct_efi_volume_get_attrs(const GByteArray *st);
guint16 fu_struct_efi_volume_get_hdr_len(const GByteArray *st);
guint16 fu_struct_efi_volume_get_checksum(const GByteArray *st);
guint16 fu_struct_efi_volume_get_ext_hdr(const GByteArray *st);
void fu_struct_efi_volume_set_zero_vector(GByteArray *st, const fwupd_guid_t *value);
void fu_struct_efi_volume_set_guid(GByteArray *st, const fwupd_guid_t *value);
void fu_struct_efi_volume_set_length(GByteArray *st, guint64 value);
void fu_struct_efi_volume_set_attrs(GByteArray *st, guint32 value);
void fu_struct_efi_volume_set_hdr_len(GByteArray *st, guint16 value);
void fu_struct_efi_volume_set_checksum(GByteArray *st, guint16 value);
void fu_struct_efi_volume_set_ext_hdr(GByteArray *st, guint16 value);
#define FU_STRUCT_EFI_VOLUME_OFFSET_ZERO_VECTOR 0x0
#define FU_STRUCT_EFI_VOLUME_OFFSET_GUID 0x10
#define FU_STRUCT_EFI_VOLUME_OFFSET_LENGTH 0x20
#define FU_STRUCT_EFI_VOLUME_OFFSET_SIGNATURE 0x28
#define FU_STRUCT_EFI_VOLUME_OFFSET_ATTRS 0x2C
#define FU_STRUCT_EFI_VOLUME_OFFSET_HDR_LEN 0x30
#define FU_STRUCT_EFI_VOLUME_OFFSET_CHECKSUM 0x32
#define FU_STRUCT_EFI_VOLUME_OFFSET_EXT_HDR 0x34
#define FU_STRUCT_EFI_VOLUME_OFFSET_REVISION 0x37
#define FU_STRUCT_EFI_VOLUME_SIZE_ZERO_VECTOR 0x10
#define FU_STRUCT_EFI_VOLUME_SIZE_GUID 0x10
#define FU_STRUCT_EFI_VOLUME_SIZE 0x38
#define FU_STRUCT_EFI_VOLUME_DEFAULT_SIGNATURE 0x4856465F
#define FU_STRUCT_EFI_VOLUME_DEFAULT_REVISION 0x02

GByteArray *fu_struct_efi_volume_block_map_new(void);
GByteArray *fu_struct_efi_volume_block_map_parse_bytes(GBytes *blob, gsize offset, GError **error);
gboolean fu_struct_efi_volume_block_map_validate(const guint8 *buf, gsize bufsz, gsize offset, GError **error);
guint32 fu_struct_efi_volume_block_map_get_num_blocks(const GByteArray *st);
guint32 fu_struct_efi_volume_block_map_get_length(const GByteArray *st);
void fu_struct_efi_volume_block_map_set_num_blocks(GByteArray *st, guint32 value);
void fu_struct_efi_volume_block_map_set_length(GByteArray *st, guint32 value);
#define FU_STRUCT_EFI_VOLUME_BLOCK_MAP_OFFSET_NUM_BLOCKS 0x0
#define FU_STRUCT_EFI_VOLUME_BLOCK_MAP_OFFSET_LENGTH 0x4
#define FU_STRUCT_EFI_VOLUME_BLOCK_MAP_SIZE 0x8

GByteArray *fu_struct_efi_signature_list_new(void);
GByteArray *fu_struct_efi_signature_list_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error);
gboolean fu_struct_efi_signature_list_validate(const guint8 *buf, gsize bufsz, gsize offset, GError **error);
const fwupd_guid_t *fu_struct_efi_signature_list_get_type(const GByteArray *st);
guint32 fu_struct_efi_signature_list_get_list_size(const GByteArray *st);
guint32 fu_struct_efi_signature_list_get_header_size(const GByteArray *st);
guint32 fu_struct_efi_signature_list_get_size(const GByteArray *st);
void fu_struct_efi_signature_list_set_type(GByteArray *st, const fwupd_guid_t *value);
void fu_struct_efi_signature_list_set_list_size(GByteArray *st, guint32 value);
void fu_struct_efi_signature_list_set_header_size(GByteArray *st, guint32 value);
void fu_struct_efi_signature_list_set_size(GByteArray *st, guint32 value);
#define FU_STRUCT_EFI_SIGNATURE_LIST_OFFSET_TYPE 0x0
#define FU_STRUCT_EFI_SIGNATURE_LIST_OFFSET_LIST_SIZE 0x10
#define FU_STRUCT_EFI_SIGNATURE_LIST_OFFSET_HEADER_SIZE 0x14
#define FU_STRUCT_EFI_SIGNATURE_LIST_OFFSET_SIZE 0x18
#define FU_STRUCT_EFI_SIGNATURE_LIST_SIZE_TYPE 0x10
#define FU_STRUCT_EFI_SIGNATURE_LIST_SIZE 0x1C

GByteArray *fu_struct_efi_load_option_new(void);
GByteArray *fu_struct_efi_load_option_parse_bytes(GBytes *blob, gsize offset, GError **error);
FuEfiLoadOptionAttrs fu_struct_efi_load_option_get_attrs(const GByteArray *st);
guint16 fu_struct_efi_load_option_get_dp_size(const GByteArray *st);
void fu_struct_efi_load_option_set_attrs(GByteArray *st, FuEfiLoadOptionAttrs value);
void fu_struct_efi_load_option_set_dp_size(GByteArray *st, guint16 value);
#define FU_STRUCT_EFI_LOAD_OPTION_OFFSET_ATTRS 0x0
#define FU_STRUCT_EFI_LOAD_OPTION_OFFSET_DP_SIZE 0x4
#define FU_STRUCT_EFI_LOAD_OPTION_SIZE 0x6

GByteArray *fu_struct_efi_device_path_new(void);
GByteArray *fu_struct_efi_device_path_parse_bytes(GBytes *blob, gsize offset, GError **error);
FuEfiDevicePathType fu_struct_efi_device_path_get_type(const GByteArray *st);
guint8 fu_struct_efi_device_path_get_subtype(const GByteArray *st);
guint16 fu_struct_efi_device_path_get_length(const GByteArray *st);
void fu_struct_efi_device_path_set_type(GByteArray *st, FuEfiDevicePathType value);
void fu_struct_efi_device_path_set_subtype(GByteArray *st, guint8 value);
void fu_struct_efi_device_path_set_length(GByteArray *st, guint16 value);
#define FU_STRUCT_EFI_DEVICE_PATH_OFFSET_TYPE 0x0
#define FU_STRUCT_EFI_DEVICE_PATH_OFFSET_SUBTYPE 0x1
#define FU_STRUCT_EFI_DEVICE_PATH_OFFSET_LENGTH 0x2
#define FU_STRUCT_EFI_DEVICE_PATH_SIZE 0x4
#define FU_STRUCT_EFI_DEVICE_PATH_DEFAULT_SUBTYPE 0xFF
#define FU_STRUCT_EFI_DEVICE_PATH_DEFAULT_LENGTH 4

GByteArray *fu_struct_efi_hard_drive_device_path_new(void);
GByteArray *fu_struct_efi_hard_drive_device_path_parse_bytes(GBytes *blob, gsize offset, GError **error);
FuEfiHardDriveDevicePathSubtype fu_struct_efi_hard_drive_device_path_get_subtype(const GByteArray *st);
guint32 fu_struct_efi_hard_drive_device_path_get_partition_number(const GByteArray *st);
guint64 fu_struct_efi_hard_drive_device_path_get_partition_start(const GByteArray *st);
guint64 fu_struct_efi_hard_drive_device_path_get_partition_size(const GByteArray *st);
const fwupd_guid_t *fu_struct_efi_hard_drive_device_path_get_partition_signature(const GByteArray *st);
FuEfiHardDriveDevicePathPartitionFormat fu_struct_efi_hard_drive_device_path_get_partition_format(const GByteArray *st);
FuEfiHardDriveDevicePathSignatureType fu_struct_efi_hard_drive_device_path_get_signature_type(const GByteArray *st);
void fu_struct_efi_hard_drive_device_path_set_subtype(GByteArray *st, FuEfiHardDriveDevicePathSubtype value);
void fu_struct_efi_hard_drive_device_path_set_partition_number(GByteArray *st, guint32 value);
void fu_struct_efi_hard_drive_device_path_set_partition_start(GByteArray *st, guint64 value);
void fu_struct_efi_hard_drive_device_path_set_partition_size(GByteArray *st, guint64 value);
void fu_struct_efi_hard_drive_device_path_set_partition_signature(GByteArray *st, const fwupd_guid_t *value);
void fu_struct_efi_hard_drive_device_path_set_partition_format(GByteArray *st, FuEfiHardDriveDevicePathPartitionFormat value);
void fu_struct_efi_hard_drive_device_path_set_signature_type(GByteArray *st, FuEfiHardDriveDevicePathSignatureType value);
#define FU_STRUCT_EFI_HARD_DRIVE_DEVICE_PATH_OFFSET_TYPE 0x0
#define FU_STRUCT_EFI_HARD_DRIVE_DEVICE_PATH_OFFSET_SUBTYPE 0x1
#define FU_STRUCT_EFI_HARD_DRIVE_DEVICE_PATH_OFFSET_LENGTH 0x2
#define FU_STRUCT_EFI_HARD_DRIVE_DEVICE_PATH_OFFSET_PARTITION_NUMBER 0x4
#define FU_STRUCT_EFI_HARD_DRIVE_DEVICE_PATH_OFFSET_PARTITION_START 0x8
#define FU_STRUCT_EFI_HARD_DRIVE_DEVICE_PATH_OFFSET_PARTITION_SIZE 0x10
#define FU_STRUCT_EFI_HARD_DRIVE_DEVICE_PATH_OFFSET_PARTITION_SIGNATURE 0x18
#define FU_STRUCT_EFI_HARD_DRIVE_DEVICE_PATH_OFFSET_PARTITION_FORMAT 0x28
#define FU_STRUCT_EFI_HARD_DRIVE_DEVICE_PATH_OFFSET_SIGNATURE_TYPE 0x29
#define FU_STRUCT_EFI_HARD_DRIVE_DEVICE_PATH_SIZE_PARTITION_SIGNATURE 0x10
#define FU_STRUCT_EFI_HARD_DRIVE_DEVICE_PATH_SIZE 0x2A
#define FU_STRUCT_EFI_HARD_DRIVE_DEVICE_PATH_DEFAULT_TYPE FU_EFI_DEVICE_PATH_TYPE_MEDIA
#define FU_STRUCT_EFI_HARD_DRIVE_DEVICE_PATH_DEFAULT_SUBTYPE FU_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE_HARD_DRIVE
#define FU_STRUCT_EFI_HARD_DRIVE_DEVICE_PATH_DEFAULT_LENGTH 42
#define FU_STRUCT_EFI_HARD_DRIVE_DEVICE_PATH_DEFAULT_PARTITION_FORMAT FU_EFI_HARD_DRIVE_DEVICE_PATH_PARTITION_FORMAT_GUID_PARTITION_TABLE
#define FU_STRUCT_EFI_HARD_DRIVE_DEVICE_PATH_DEFAULT_SIGNATURE_TYPE FU_EFI_HARD_DRIVE_DEVICE_PATH_SIGNATURE_TYPE_GUID
