/* auto-generated, do not modify */
#pragma once
#include <fwupd-common.h>
typedef enum {
    FU_EDID_DESCRIPTOR_TAG_DISPLAY_PRODUCT_SERIAL_NUMBER = 0xFF,
    FU_EDID_DESCRIPTOR_TAG_ALPHANUMERIC_DATA_STRING = 0xFE,
    FU_EDID_DESCRIPTOR_TAG_DISPLAY_RANGE_LIMITS = 0xFD,
    FU_EDID_DESCRIPTOR_TAG_DISPLAY_PRODUCT_NAME = 0xFC,
    FU_EDID_DESCRIPTOR_TAG_COLOR_POINT_DATA = 0xFB,
    FU_EDID_DESCRIPTOR_TAG_STANDARD_TIMING_IDENTIFICATIONS = 0xFA,
    FU_EDID_DESCRIPTOR_TAG_DISPLAY_COLOR_MANAGEMENT_DATA = 0xF9,
    FU_EDID_DESCRIPTOR_TAG_CVT_TIMING_CODES = 0xF8,
    FU_EDID_DESCRIPTOR_TAG_ESTABLISHED_TIMINGS = 0xF7,
    FU_EDID_DESCRIPTOR_TAG_DUMMY_DESCRIPTOR = 0x10,
} FuEdidDescriptorTag;

GByteArray *fu_struct_edid_descriptor_new(void);
GByteArray *fu_struct_edid_descriptor_parse_bytes(GBytes *blob, gsize offset, GError **error);
guint16 fu_struct_edid_descriptor_get_kind(const GByteArray *st);
guint8 fu_struct_edid_descriptor_get_subkind(const GByteArray *st);
FuEdidDescriptorTag fu_struct_edid_descriptor_get_tag(const GByteArray *st);
const guint8 *fu_struct_edid_descriptor_get_data(const GByteArray *st, gsize *bufsz);
void fu_struct_edid_descriptor_set_kind(GByteArray *st, guint16 value);
void fu_struct_edid_descriptor_set_subkind(GByteArray *st, guint8 value);
void fu_struct_edid_descriptor_set_tag(GByteArray *st, FuEdidDescriptorTag value);
gboolean fu_struct_edid_descriptor_set_data(GByteArray *st, const guint8 *buf, gsize bufsz, GError **error);
#define FU_STRUCT_EDID_DESCRIPTOR_OFFSET_KIND 0x0
#define FU_STRUCT_EDID_DESCRIPTOR_OFFSET_SUBKIND 0x2
#define FU_STRUCT_EDID_DESCRIPTOR_OFFSET_TAG 0x3
#define FU_STRUCT_EDID_DESCRIPTOR_OFFSET_DATA 0x5
#define FU_STRUCT_EDID_DESCRIPTOR_SIZE_DATA 0xD
#define FU_STRUCT_EDID_DESCRIPTOR_SIZE 0x12

GByteArray *fu_struct_edid_new(void);
GByteArray *fu_struct_edid_parse_bytes(GBytes *blob, gsize offset, GError **error);
const guint8 *fu_struct_edid_get_manufacturer_name(const GByteArray *st, gsize *bufsz);
guint16 fu_struct_edid_get_product_code(const GByteArray *st);
guint32 fu_struct_edid_get_serial_number(const GByteArray *st);
guint8 fu_struct_edid_get_week_of_manufacture(const GByteArray *st);
guint8 fu_struct_edid_get_year_of_manufacture(const GByteArray *st);
guint8 fu_struct_edid_get_revision_number(const GByteArray *st);
const guint8 *fu_struct_edid_get_data_blocks(const GByteArray *st, gsize *bufsz);
guint8 fu_struct_edid_get_extension_block_count(const GByteArray *st);
guint8 fu_struct_edid_get_checksum(const GByteArray *st);
gboolean fu_struct_edid_set_manufacturer_name(GByteArray *st, const guint8 *buf, gsize bufsz, GError **error);
void fu_struct_edid_set_product_code(GByteArray *st, guint16 value);
void fu_struct_edid_set_serial_number(GByteArray *st, guint32 value);
void fu_struct_edid_set_week_of_manufacture(GByteArray *st, guint8 value);
void fu_struct_edid_set_year_of_manufacture(GByteArray *st, guint8 value);
void fu_struct_edid_set_revision_number(GByteArray *st, guint8 value);
gboolean fu_struct_edid_set_data_blocks(GByteArray *st, const guint8 *buf, gsize bufsz, GError **error);
void fu_struct_edid_set_extension_block_count(GByteArray *st, guint8 value);
void fu_struct_edid_set_checksum(GByteArray *st, guint8 value);
#define FU_STRUCT_EDID_OFFSET_HEADER 0x0
#define FU_STRUCT_EDID_OFFSET_MANUFACTURER_NAME 0x8
#define FU_STRUCT_EDID_OFFSET_PRODUCT_CODE 0xA
#define FU_STRUCT_EDID_OFFSET_SERIAL_NUMBER 0xC
#define FU_STRUCT_EDID_OFFSET_WEEK_OF_MANUFACTURE 0x10
#define FU_STRUCT_EDID_OFFSET_YEAR_OF_MANUFACTURE 0x11
#define FU_STRUCT_EDID_OFFSET_EDID_VERSION_NUMBER 0x12
#define FU_STRUCT_EDID_OFFSET_REVISION_NUMBER 0x13
#define FU_STRUCT_EDID_OFFSET_DATA_BLOCKS 0x36
#define FU_STRUCT_EDID_OFFSET_EXTENSION_BLOCK_COUNT 0x7E
#define FU_STRUCT_EDID_OFFSET_CHECKSUM 0x7F
#define FU_STRUCT_EDID_SIZE_HEADER 0x8
#define FU_STRUCT_EDID_SIZE_MANUFACTURER_NAME 0x2
#define FU_STRUCT_EDID_SIZE_DATA_BLOCKS 0x48
#define FU_STRUCT_EDID_SIZE 0x80
#define FU_STRUCT_EDID_DEFAULT_HEADER "\x00\xFF\xFF\xFF\xFF\xFF\xFF\x00"
#define FU_STRUCT_EDID_DEFAULT_EDID_VERSION_NUMBER 0x1
#define FU_STRUCT_EDID_DEFAULT_REVISION_NUMBER 0x3
