/* auto-generated, do not modify */
#pragma once
#include <fwupd-common.h>

GByteArray *fu_struct_oprom_new(void);
GByteArray *fu_struct_oprom_parse_bytes(GBytes *blob, gsize offset, GError **error);
gboolean fu_struct_oprom_validate_bytes(GBytes *blob, gsize offset, GError **error);
guint16 fu_struct_oprom_get_image_size(const GByteArray *st);
guint32 fu_struct_oprom_get_init_func_entry_point(const GByteArray *st);
guint16 fu_struct_oprom_get_subsystem(const GByteArray *st);
guint16 fu_struct_oprom_get_machine_type(const GByteArray *st);
guint16 fu_struct_oprom_get_compression_type(const GByteArray *st);
guint16 fu_struct_oprom_get_efi_image_offset(const GByteArray *st);
guint16 fu_struct_oprom_get_pci_header_offset(const GByteArray *st);
guint16 fu_struct_oprom_get_expansion_header_offset(const GByteArray *st);
void fu_struct_oprom_set_image_size(GByteArray *st, guint16 value);
void fu_struct_oprom_set_init_func_entry_point(GByteArray *st, guint32 value);
void fu_struct_oprom_set_subsystem(GByteArray *st, guint16 value);
void fu_struct_oprom_set_machine_type(GByteArray *st, guint16 value);
void fu_struct_oprom_set_compression_type(GByteArray *st, guint16 value);
void fu_struct_oprom_set_efi_image_offset(GByteArray *st, guint16 value);
void fu_struct_oprom_set_pci_header_offset(GByteArray *st, guint16 value);
void fu_struct_oprom_set_expansion_header_offset(GByteArray *st, guint16 value);
#define FU_STRUCT_OPROM_OFFSET_SIGNATURE 0x0
#define FU_STRUCT_OPROM_OFFSET_IMAGE_SIZE 0x2
#define FU_STRUCT_OPROM_OFFSET_INIT_FUNC_ENTRY_POINT 0x4
#define FU_STRUCT_OPROM_OFFSET_SUBSYSTEM 0x8
#define FU_STRUCT_OPROM_OFFSET_MACHINE_TYPE 0xA
#define FU_STRUCT_OPROM_OFFSET_COMPRESSION_TYPE 0xC
#define FU_STRUCT_OPROM_OFFSET_EFI_IMAGE_OFFSET 0x16
#define FU_STRUCT_OPROM_OFFSET_PCI_HEADER_OFFSET 0x18
#define FU_STRUCT_OPROM_OFFSET_EXPANSION_HEADER_OFFSET 0x1A
#define FU_STRUCT_OPROM_SIZE 0x1C
#define FU_STRUCT_OPROM_DEFAULT_SIGNATURE 0xAA55
#define FU_STRUCT_OPROM_DEFAULT_PCI_HEADER_OFFSET 28

GByteArray *fu_struct_oprom_pci_new(void);
GByteArray *fu_struct_oprom_pci_parse_bytes(GBytes *blob, gsize offset, GError **error);
guint16 fu_struct_oprom_pci_get_vendor_id(const GByteArray *st);
guint16 fu_struct_oprom_pci_get_device_id(const GByteArray *st);
guint16 fu_struct_oprom_pci_get_device_list_pointer(const GByteArray *st);
guint16 fu_struct_oprom_pci_get_structure_length(const GByteArray *st);
guint8 fu_struct_oprom_pci_get_structure_revision(const GByteArray *st);
guint32 fu_struct_oprom_pci_get_class_code(const GByteArray *st);
guint16 fu_struct_oprom_pci_get_image_length(const GByteArray *st);
guint16 fu_struct_oprom_pci_get_image_revision(const GByteArray *st);
guint8 fu_struct_oprom_pci_get_code_type(const GByteArray *st);
guint8 fu_struct_oprom_pci_get_indicator(const GByteArray *st);
guint16 fu_struct_oprom_pci_get_max_runtime_image_length(const GByteArray *st);
guint16 fu_struct_oprom_pci_get_conf_util_code_header_pointer(const GByteArray *st);
guint16 fu_struct_oprom_pci_get_dmtf_clp_entry_point_pointer(const GByteArray *st);
void fu_struct_oprom_pci_set_vendor_id(GByteArray *st, guint16 value);
void fu_struct_oprom_pci_set_device_id(GByteArray *st, guint16 value);
void fu_struct_oprom_pci_set_device_list_pointer(GByteArray *st, guint16 value);
void fu_struct_oprom_pci_set_structure_length(GByteArray *st, guint16 value);
void fu_struct_oprom_pci_set_structure_revision(GByteArray *st, guint8 value);
void fu_struct_oprom_pci_set_class_code(GByteArray *st, guint32 value);
void fu_struct_oprom_pci_set_image_length(GByteArray *st, guint16 value);
void fu_struct_oprom_pci_set_image_revision(GByteArray *st, guint16 value);
void fu_struct_oprom_pci_set_code_type(GByteArray *st, guint8 value);
void fu_struct_oprom_pci_set_indicator(GByteArray *st, guint8 value);
void fu_struct_oprom_pci_set_max_runtime_image_length(GByteArray *st, guint16 value);
void fu_struct_oprom_pci_set_conf_util_code_header_pointer(GByteArray *st, guint16 value);
void fu_struct_oprom_pci_set_dmtf_clp_entry_point_pointer(GByteArray *st, guint16 value);
#define FU_STRUCT_OPROM_PCI_OFFSET_SIGNATURE 0x0
#define FU_STRUCT_OPROM_PCI_OFFSET_VENDOR_ID 0x4
#define FU_STRUCT_OPROM_PCI_OFFSET_DEVICE_ID 0x6
#define FU_STRUCT_OPROM_PCI_OFFSET_DEVICE_LIST_POINTER 0x8
#define FU_STRUCT_OPROM_PCI_OFFSET_STRUCTURE_LENGTH 0xA
#define FU_STRUCT_OPROM_PCI_OFFSET_STRUCTURE_REVISION 0xC
#define FU_STRUCT_OPROM_PCI_OFFSET_CLASS_CODE 0xD
#define FU_STRUCT_OPROM_PCI_OFFSET_IMAGE_LENGTH 0x10
#define FU_STRUCT_OPROM_PCI_OFFSET_IMAGE_REVISION 0x12
#define FU_STRUCT_OPROM_PCI_OFFSET_CODE_TYPE 0x14
#define FU_STRUCT_OPROM_PCI_OFFSET_INDICATOR 0x15
#define FU_STRUCT_OPROM_PCI_OFFSET_MAX_RUNTIME_IMAGE_LENGTH 0x16
#define FU_STRUCT_OPROM_PCI_OFFSET_CONF_UTIL_CODE_HEADER_POINTER 0x18
#define FU_STRUCT_OPROM_PCI_OFFSET_DMTF_CLP_ENTRY_POINT_POINTER 0x1A
#define FU_STRUCT_OPROM_PCI_SIZE 0x1C
#define FU_STRUCT_OPROM_PCI_DEFAULT_SIGNATURE 0x52494350
