/*
 * This file is auto-generated, do not modify!
 *
 * SPDX-License-Identifier: LGPL-2.1-or-later
 */

#pragma once
#include <fu-input-stream.h>
/**
 * FuIfdRegion:
 */
typedef enum {
    /**
     * FU_IFD_REGION_DESC:
     */
    FU_IFD_REGION_DESC = 0x00,
    /**
     * FU_IFD_REGION_BIOS:
     */
    FU_IFD_REGION_BIOS = 0x01,
    /**
     * FU_IFD_REGION_ME:
     */
    FU_IFD_REGION_ME = 0x02,
    /**
     * FU_IFD_REGION_GBE:
     */
    FU_IFD_REGION_GBE = 0x03,
    /**
     * FU_IFD_REGION_PLATFORM:
     */
    FU_IFD_REGION_PLATFORM = 0x04,
    /**
     * FU_IFD_REGION_DEVEXP:
     */
    FU_IFD_REGION_DEVEXP = 0x05,
    /**
     * FU_IFD_REGION_BIOS2:
     */
    FU_IFD_REGION_BIOS2 = 0x06,
    /**
     * FU_IFD_REGION_EC:
     */
    FU_IFD_REGION_EC = 0x08,
    /**
     * FU_IFD_REGION_IE:
     */
    FU_IFD_REGION_IE = 0x0A,
    /**
     * FU_IFD_REGION_10GBE:
     */
    FU_IFD_REGION_10GBE = 0x0B,
    /**
     * FU_IFD_REGION_MAX:
     */
    FU_IFD_REGION_MAX = 0x0F,
}  FuIfdRegion;
const gchar *fu_ifd_region_to_string(FuIfdRegion val) G_GNUC_CONST;
/**
 * FuIfdAccess:
 */
typedef enum {
    /**
     * FU_IFD_ACCESS_NONE:
     */
    FU_IFD_ACCESS_NONE = 0,
    /**
     * FU_IFD_ACCESS_READ:
     */
    FU_IFD_ACCESS_READ = 1 << 0,
    /**
     * FU_IFD_ACCESS_WRITE:
     */
    FU_IFD_ACCESS_WRITE = 1 << 1,
} G_GNUC_FLAG_ENUM FuIfdAccess;
gchar *fu_ifd_access_to_string(FuIfdAccess val) G_GNUC_CONST;
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructIfdFdbar;

FuStructIfdFdbar *fu_struct_ifd_fdbar_ref(FuStructIfdFdbar *st) G_GNUC_NON_NULL(1);
void fu_struct_ifd_fdbar_unref(FuStructIfdFdbar *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructIfdFdbar, fu_struct_ifd_fdbar_unref)
FuStructIfdFdbar *fu_struct_ifd_fdbar_new(void) G_GNUC_WARN_UNUSED_RESULT;
FuStructIfdFdbar *fu_struct_ifd_fdbar_parse_stream(GInputStream *stream, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
gboolean fu_struct_ifd_fdbar_validate_stream(GInputStream *stream, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_ifd_fdbar_get_descriptor_map0(const FuStructIfdFdbar *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_ifd_fdbar_get_descriptor_map1(const FuStructIfdFdbar *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_ifd_fdbar_get_descriptor_map2(const FuStructIfdFdbar *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_ifd_fdbar_set_descriptor_map0(FuStructIfdFdbar *st, guint32 value) G_GNUC_NON_NULL(1);
void fu_struct_ifd_fdbar_set_descriptor_map1(FuStructIfdFdbar *st, guint32 value) G_GNUC_NON_NULL(1);
void fu_struct_ifd_fdbar_set_descriptor_map2(FuStructIfdFdbar *st, guint32 value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_IFD_FDBAR_OFFSET_SIGNATURE 0x10
#define FU_STRUCT_IFD_FDBAR_OFFSET_DESCRIPTOR_MAP0 0x14
#define FU_STRUCT_IFD_FDBAR_OFFSET_DESCRIPTOR_MAP1 0x18
#define FU_STRUCT_IFD_FDBAR_OFFSET_DESCRIPTOR_MAP2 0x1C
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_IFD_FDBAR_SIZE 0x20
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_IFD_FDBAR_DEFAULT_SIGNATURE 0x0FF0A55A
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructIfdFcba;

FuStructIfdFcba *fu_struct_ifd_fcba_ref(FuStructIfdFcba *st) G_GNUC_NON_NULL(1);
void fu_struct_ifd_fcba_unref(FuStructIfdFcba *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructIfdFcba, fu_struct_ifd_fcba_unref)
FuStructIfdFcba *fu_struct_ifd_fcba_new(void) G_GNUC_WARN_UNUSED_RESULT;
FuStructIfdFcba *fu_struct_ifd_fcba_parse_stream(GInputStream *stream, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_ifd_fcba_get_flcomp(const FuStructIfdFcba *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_ifd_fcba_get_flill(const FuStructIfdFcba *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_ifd_fcba_get_flill1(const FuStructIfdFcba *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_ifd_fcba_set_flcomp(FuStructIfdFcba *st, guint32 value) G_GNUC_NON_NULL(1);
void fu_struct_ifd_fcba_set_flill(FuStructIfdFcba *st, guint32 value) G_GNUC_NON_NULL(1);
void fu_struct_ifd_fcba_set_flill1(FuStructIfdFcba *st, guint32 value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_IFD_FCBA_OFFSET_FLCOMP 0x0
#define FU_STRUCT_IFD_FCBA_OFFSET_FLILL 0x4
#define FU_STRUCT_IFD_FCBA_OFFSET_FLILL1 0x8
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_IFD_FCBA_SIZE 0xC
#endif

#ifndef __GI_SCANNER__
#endif
