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

GByteArray *fu_struct_fmap_new(void);
GByteArray *fu_struct_fmap_parse_bytes(GBytes *blob, gsize offset, GError **error);
gboolean fu_struct_fmap_validate_bytes(GBytes *blob, gsize offset, GError **error);
guint8 fu_struct_fmap_get_ver_major(const GByteArray *st);
guint8 fu_struct_fmap_get_ver_minor(const GByteArray *st);
guint64 fu_struct_fmap_get_base(const GByteArray *st);
guint32 fu_struct_fmap_get_size(const GByteArray *st);
gchar *fu_struct_fmap_get_name(const GByteArray *st);
guint16 fu_struct_fmap_get_nareas(const GByteArray *st);
void fu_struct_fmap_set_ver_major(GByteArray *st, guint8 value);
void fu_struct_fmap_set_ver_minor(GByteArray *st, guint8 value);
void fu_struct_fmap_set_base(GByteArray *st, guint64 value);
void fu_struct_fmap_set_size(GByteArray *st, guint32 value);
gboolean fu_struct_fmap_set_name(GByteArray *st, const gchar *value, GError **error);
void fu_struct_fmap_set_nareas(GByteArray *st, guint16 value);
#define FU_STRUCT_FMAP_OFFSET_SIGNATURE 0x0
#define FU_STRUCT_FMAP_OFFSET_VER_MAJOR 0x8
#define FU_STRUCT_FMAP_OFFSET_VER_MINOR 0x9
#define FU_STRUCT_FMAP_OFFSET_BASE 0xA
#define FU_STRUCT_FMAP_OFFSET_SIZE 0x12
#define FU_STRUCT_FMAP_OFFSET_NAME 0x16
#define FU_STRUCT_FMAP_OFFSET_NAREAS 0x36
#define FU_STRUCT_FMAP_SIZE_SIGNATURE 0x8
#define FU_STRUCT_FMAP_SIZE_NAME 0x20
#define FU_STRUCT_FMAP_SIZE 0x38
#define FU_STRUCT_FMAP_DEFAULT_SIGNATURE "__FMAP__"
#define FU_STRUCT_FMAP_DEFAULT_VER_MAJOR 0x1
#define FU_STRUCT_FMAP_DEFAULT_VER_MINOR 0x1

GByteArray *fu_struct_fmap_area_new(void);
GByteArray *fu_struct_fmap_area_parse_bytes(GBytes *blob, gsize offset, GError **error);
guint32 fu_struct_fmap_area_get_offset(const GByteArray *st);
guint32 fu_struct_fmap_area_get_size(const GByteArray *st);
gchar *fu_struct_fmap_area_get_name(const GByteArray *st);
guint16 fu_struct_fmap_area_get_flags(const GByteArray *st);
void fu_struct_fmap_area_set_offset(GByteArray *st, guint32 value);
void fu_struct_fmap_area_set_size(GByteArray *st, guint32 value);
gboolean fu_struct_fmap_area_set_name(GByteArray *st, const gchar *value, GError **error);
void fu_struct_fmap_area_set_flags(GByteArray *st, guint16 value);
#define FU_STRUCT_FMAP_AREA_OFFSET_OFFSET 0x0
#define FU_STRUCT_FMAP_AREA_OFFSET_SIZE 0x4
#define FU_STRUCT_FMAP_AREA_OFFSET_NAME 0x8
#define FU_STRUCT_FMAP_AREA_OFFSET_FLAGS 0x28
#define FU_STRUCT_FMAP_AREA_SIZE_NAME 0x20
#define FU_STRUCT_FMAP_AREA_SIZE 0x2A
