/* auto-generated, do not modify */
#pragma once
#include <fwupd-common.h>
typedef enum {
    FU_RMI_PARTITION_ID_NONE = 0x00,
    FU_RMI_PARTITION_ID_BOOTLOADER = 0x01,
    FU_RMI_PARTITION_ID_DEVICE_CONFIG,
    FU_RMI_PARTITION_ID_FLASH_CONFIG,
    FU_RMI_PARTITION_ID_MANUFACTURING_BLOCK,
    FU_RMI_PARTITION_ID_GUEST_SERIALIZATION,
    FU_RMI_PARTITION_ID_GLOBAL_PARAMETERS,
    FU_RMI_PARTITION_ID_CORE_CODE,
    FU_RMI_PARTITION_ID_CORE_CONFIG,
    FU_RMI_PARTITION_ID_GUEST_CODE,
    FU_RMI_PARTITION_ID_DISPLAY_CONFIG,
    FU_RMI_PARTITION_ID_EXTERNAL_TOUCH_AFE_CONFIG,
    FU_RMI_PARTITION_ID_UTILITY_PARAMETER,
    FU_RMI_PARTITION_ID_PUBKEY,
    FU_RMI_PARTITION_ID_FIXED_LOCATION_DATA = 0x0E,
} FuRmiPartitionId;
const gchar *fu_rmi_partition_id_to_string(FuRmiPartitionId val);
typedef enum {
    FU_RMI_CONTAINER_ID_TOP_LEVEL,
    FU_RMI_CONTAINER_ID_UI,
    FU_RMI_CONTAINER_ID_UI_CONFIG,
    FU_RMI_CONTAINER_ID_BL,
    FU_RMI_CONTAINER_ID_BL_IMAGE,
    FU_RMI_CONTAINER_ID_BL_CONFIG,
    FU_RMI_CONTAINER_ID_BL_LOCKDOWN_INFO,
    FU_RMI_CONTAINER_ID_PERMANENT_CONFIG,
    FU_RMI_CONTAINER_ID_GUEST_CODE,
    FU_RMI_CONTAINER_ID_BL_PROTOCOL_DESCRIPTOR,
    FU_RMI_CONTAINER_ID_UI_PROTOCOL_DESCRIPTOR,
    FU_RMI_CONTAINER_ID_RMI_SELF_DISCOVERY,
    FU_RMI_CONTAINER_ID_RMI_PAGE_CONTENT,
    FU_RMI_CONTAINER_ID_GENERAL_INFORMATION,
    FU_RMI_CONTAINER_ID_DEVICE_CONFIG,
    FU_RMI_CONTAINER_ID_FLASH_CONFIG,
    FU_RMI_CONTAINER_ID_GUEST_SERIALIZATION,
    FU_RMI_CONTAINER_ID_GLOBAL_PARAMETERS,
    FU_RMI_CONTAINER_ID_CORE_CODE,
    FU_RMI_CONTAINER_ID_CORE_CONFIG,
    FU_RMI_CONTAINER_ID_DISPLAY_CONFIG,
    FU_RMI_CONTAINER_ID_EXTERNAL_TOUCH_AFE_CONFIG,
    FU_RMI_CONTAINER_ID_UTILITY,
    FU_RMI_CONTAINER_ID_UTILITY_PARAMETER,
    FU_RMI_CONTAINER_ID_FIXED_LOCATION_DATA = 27,
} FuRmiContainerId;
const gchar *fu_rmi_container_id_to_string(FuRmiContainerId val);

GByteArray *fu_struct_rmi_partition_tbl_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error);
FuRmiPartitionId fu_struct_rmi_partition_tbl_get_partition_id(const GByteArray *st);
guint16 fu_struct_rmi_partition_tbl_get_partition_len(const GByteArray *st);
guint16 fu_struct_rmi_partition_tbl_get_partition_addr(const GByteArray *st);
guint16 fu_struct_rmi_partition_tbl_get_partition_prop(const GByteArray *st);
#define FU_STRUCT_RMI_PARTITION_TBL_OFFSET_PARTITION_ID 0x0
#define FU_STRUCT_RMI_PARTITION_TBL_OFFSET_PARTITION_LEN 0x2
#define FU_STRUCT_RMI_PARTITION_TBL_OFFSET_PARTITION_ADDR 0x4
#define FU_STRUCT_RMI_PARTITION_TBL_OFFSET_PARTITION_PROP 0x6
#define FU_STRUCT_RMI_PARTITION_TBL_SIZE 0x8

GByteArray *fu_struct_rmi_img_new(void);
GByteArray *fu_struct_rmi_img_parse_bytes(GBytes *blob, gsize offset, GError **error);
guint32 fu_struct_rmi_img_get_checksum(const GByteArray *st);
guint8 fu_struct_rmi_img_get_io_offset(const GByteArray *st);
guint8 fu_struct_rmi_img_get_bootloader_version(const GByteArray *st);
guint32 fu_struct_rmi_img_get_image_size(const GByteArray *st);
guint32 fu_struct_rmi_img_get_config_size(const GByteArray *st);
gchar *fu_struct_rmi_img_get_product_id(const GByteArray *st);
guint32 fu_struct_rmi_img_get_package_id(const GByteArray *st);
guint32 fu_struct_rmi_img_get_product_info(const GByteArray *st);
guint32 fu_struct_rmi_img_get_fw_build_id(const GByteArray *st);
guint32 fu_struct_rmi_img_get_signature_size(const GByteArray *st);
void fu_struct_rmi_img_set_checksum(GByteArray *st, guint32 value);
void fu_struct_rmi_img_set_io_offset(GByteArray *st, guint8 value);
void fu_struct_rmi_img_set_bootloader_version(GByteArray *st, guint8 value);
void fu_struct_rmi_img_set_image_size(GByteArray *st, guint32 value);
void fu_struct_rmi_img_set_config_size(GByteArray *st, guint32 value);
gboolean fu_struct_rmi_img_set_product_id(GByteArray *st, const gchar *value, GError **error);
void fu_struct_rmi_img_set_package_id(GByteArray *st, guint32 value);
void fu_struct_rmi_img_set_product_info(GByteArray *st, guint32 value);
void fu_struct_rmi_img_set_fw_build_id(GByteArray *st, guint32 value);
void fu_struct_rmi_img_set_signature_size(GByteArray *st, guint32 value);
#define FU_STRUCT_RMI_IMG_OFFSET_CHECKSUM 0x0
#define FU_STRUCT_RMI_IMG_OFFSET_IO_OFFSET 0x6
#define FU_STRUCT_RMI_IMG_OFFSET_BOOTLOADER_VERSION 0x7
#define FU_STRUCT_RMI_IMG_OFFSET_IMAGE_SIZE 0x8
#define FU_STRUCT_RMI_IMG_OFFSET_CONFIG_SIZE 0xC
#define FU_STRUCT_RMI_IMG_OFFSET_PRODUCT_ID 0x10
#define FU_STRUCT_RMI_IMG_OFFSET_PACKAGE_ID 0x1A
#define FU_STRUCT_RMI_IMG_OFFSET_PRODUCT_INFO 0x1E
#define FU_STRUCT_RMI_IMG_OFFSET_FW_BUILD_ID 0x50
#define FU_STRUCT_RMI_IMG_OFFSET_SIGNATURE_SIZE 0x54
#define FU_STRUCT_RMI_IMG_SIZE_PRODUCT_ID 0xA
#define FU_STRUCT_RMI_IMG_SIZE 0x58

GByteArray *fu_struct_rmi_container_descriptor_new(void);
GByteArray *fu_struct_rmi_container_descriptor_parse_bytes(GBytes *blob, gsize offset, GError **error);
guint32 fu_struct_rmi_container_descriptor_get_content_checksum(const GByteArray *st);
FuRmiContainerId fu_struct_rmi_container_descriptor_get_container_id(const GByteArray *st);
guint8 fu_struct_rmi_container_descriptor_get_minor_version(const GByteArray *st);
guint8 fu_struct_rmi_container_descriptor_get_major_version(const GByteArray *st);
guint32 fu_struct_rmi_container_descriptor_get_signature_size(const GByteArray *st);
guint32 fu_struct_rmi_container_descriptor_get_container_option_flags(const GByteArray *st);
guint32 fu_struct_rmi_container_descriptor_get_content_options_length(const GByteArray *st);
guint32 fu_struct_rmi_container_descriptor_get_content_options_address(const GByteArray *st);
guint32 fu_struct_rmi_container_descriptor_get_content_length(const GByteArray *st);
guint32 fu_struct_rmi_container_descriptor_get_content_address(const GByteArray *st);
void fu_struct_rmi_container_descriptor_set_content_checksum(GByteArray *st, guint32 value);
void fu_struct_rmi_container_descriptor_set_container_id(GByteArray *st, FuRmiContainerId value);
void fu_struct_rmi_container_descriptor_set_minor_version(GByteArray *st, guint8 value);
void fu_struct_rmi_container_descriptor_set_major_version(GByteArray *st, guint8 value);
void fu_struct_rmi_container_descriptor_set_signature_size(GByteArray *st, guint32 value);
void fu_struct_rmi_container_descriptor_set_container_option_flags(GByteArray *st, guint32 value);
void fu_struct_rmi_container_descriptor_set_content_options_length(GByteArray *st, guint32 value);
void fu_struct_rmi_container_descriptor_set_content_options_address(GByteArray *st, guint32 value);
void fu_struct_rmi_container_descriptor_set_content_length(GByteArray *st, guint32 value);
void fu_struct_rmi_container_descriptor_set_content_address(GByteArray *st, guint32 value);
#define FU_STRUCT_RMI_CONTAINER_DESCRIPTOR_OFFSET_CONTENT_CHECKSUM 0x0
#define FU_STRUCT_RMI_CONTAINER_DESCRIPTOR_OFFSET_CONTAINER_ID 0x4
#define FU_STRUCT_RMI_CONTAINER_DESCRIPTOR_OFFSET_MINOR_VERSION 0x6
#define FU_STRUCT_RMI_CONTAINER_DESCRIPTOR_OFFSET_MAJOR_VERSION 0x7
#define FU_STRUCT_RMI_CONTAINER_DESCRIPTOR_OFFSET_SIGNATURE_SIZE 0x8
#define FU_STRUCT_RMI_CONTAINER_DESCRIPTOR_OFFSET_CONTAINER_OPTION_FLAGS 0xC
#define FU_STRUCT_RMI_CONTAINER_DESCRIPTOR_OFFSET_CONTENT_OPTIONS_LENGTH 0x10
#define FU_STRUCT_RMI_CONTAINER_DESCRIPTOR_OFFSET_CONTENT_OPTIONS_ADDRESS 0x14
#define FU_STRUCT_RMI_CONTAINER_DESCRIPTOR_OFFSET_CONTENT_LENGTH 0x18
#define FU_STRUCT_RMI_CONTAINER_DESCRIPTOR_OFFSET_CONTENT_ADDRESS 0x1C
#define FU_STRUCT_RMI_CONTAINER_DESCRIPTOR_SIZE 0x20
