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

#pragma once
#include <fu-input-stream.h>
#include "fu-intel-me-struct.h"
#include "fu-smbios-struct.h"
/**
 * FuSmbiosDdHandle:
 */
typedef enum {
    /**
     * FU_SMBIOS_DD_HANDLE_FSP:
     */
    FU_SMBIOS_DD_HANDLE_FSP = 0x16,
    /**
     * FU_SMBIOS_DD_HANDLE_UCODE:
     */
    FU_SMBIOS_DD_HANDLE_UCODE = 0x17,
    /**
     * FU_SMBIOS_DD_HANDLE_ME:
     */
    FU_SMBIOS_DD_HANDLE_ME = 0x18,
    /**
     * FU_SMBIOS_DD_HANDLE_PCH:
     */
    FU_SMBIOS_DD_HANDLE_PCH = 0x19,
    /**
     * FU_SMBIOS_DD_HANDLE_ME2:
     */
    FU_SMBIOS_DD_HANDLE_ME2 = 0x30,
}  FuSmbiosDdHandle;
/**
 * FuSmbiosFwstsComponentName:
 */
typedef enum {
    /**
     * FU_SMBIOS_FWSTS_COMPONENT_NAME_MEI1:
     *
     * 0:22:0
     */
    FU_SMBIOS_FWSTS_COMPONENT_NAME_MEI1 = 1,
    /**
     * FU_SMBIOS_FWSTS_COMPONENT_NAME_MEI2:
     *
     * 0:22:1
     */
    FU_SMBIOS_FWSTS_COMPONENT_NAME_MEI2 = 2,
    /**
     * FU_SMBIOS_FWSTS_COMPONENT_NAME_MEI3:
     *
     * 0:22:4
     */
    FU_SMBIOS_FWSTS_COMPONENT_NAME_MEI3 = 3,
    /**
     * FU_SMBIOS_FWSTS_COMPONENT_NAME_MEI4:
     *
     * ?
     */
    FU_SMBIOS_FWSTS_COMPONENT_NAME_MEI4 = 4,
}  FuSmbiosFwstsComponentName;
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructMeVersion;

FuStructMeVersion *fu_struct_me_version_ref(FuStructMeVersion *st) G_GNUC_NON_NULL(1);
void fu_struct_me_version_unref(FuStructMeVersion *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructMeVersion, fu_struct_me_version_unref)
guint8 fu_struct_me_version_get_major(const FuStructMeVersion *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_me_version_get_minor(const FuStructMeVersion *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_me_version_get_patch(const FuStructMeVersion *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_me_version_get_build(const FuStructMeVersion *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_ME_VERSION_OFFSET_MAJOR 0x0
#define FU_STRUCT_ME_VERSION_OFFSET_MINOR 0x1
#define FU_STRUCT_ME_VERSION_OFFSET_PATCH 0x2
#define FU_STRUCT_ME_VERSION_OFFSET_BUILD 0x3
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ME_VERSION_SIZE 0x5
#endif

#ifndef __GI_SCANNER__
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructMeFviHeader;

FuStructMeFviHeader *fu_struct_me_fvi_header_ref(FuStructMeFviHeader *st) G_GNUC_NON_NULL(1);
void fu_struct_me_fvi_header_unref(FuStructMeFviHeader *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructMeFviHeader, fu_struct_me_fvi_header_unref)
FuStructMeFviHeader *fu_struct_me_fvi_header_parse_bytes(GBytes *blob, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_me_fvi_header_get_count(const FuStructMeFviHeader *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_ME_FVI_HEADER_OFFSET_COUNT 0x0
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ME_FVI_HEADER_SIZE 0x1
#endif

#ifndef __GI_SCANNER__
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructMeFviData;

FuStructMeFviData *fu_struct_me_fvi_data_ref(FuStructMeFviData *st) G_GNUC_NON_NULL(1);
void fu_struct_me_fvi_data_unref(FuStructMeFviData *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructMeFviData, fu_struct_me_fvi_data_unref)
FuStructMeFviData *fu_struct_me_fvi_data_parse_bytes(GBytes *blob, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_me_fvi_data_get_component_name(const FuStructMeFviData *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_me_fvi_data_get_component_string(const FuStructMeFviData *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
FuStructMeVersion *fu_struct_me_fvi_data_get_version(const FuStructMeFviData *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_ME_FVI_DATA_OFFSET_COMPONENT_NAME 0x0
#define FU_STRUCT_ME_FVI_DATA_OFFSET_COMPONENT_STRING 0x1
#define FU_STRUCT_ME_FVI_DATA_OFFSET_VERSION 0x2
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ME_FVI_DATA_SIZE 0x7
#endif

#ifndef __GI_SCANNER__
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructSmbiosFwsts;

FuStructSmbiosFwsts *fu_struct_smbios_fwsts_ref(FuStructSmbiosFwsts *st) G_GNUC_NON_NULL(1);
void fu_struct_smbios_fwsts_unref(FuStructSmbiosFwsts *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructSmbiosFwsts, fu_struct_smbios_fwsts_unref)
FuStructSmbiosFwsts *fu_struct_smbios_fwsts_parse_bytes(GBytes *blob, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_smbios_fwsts_get_length(const FuStructSmbiosFwsts *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_smbios_fwsts_get_handle(const FuStructSmbiosFwsts *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_smbios_fwsts_get_count(const FuStructSmbiosFwsts *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_SMBIOS_FWSTS_OFFSET_TYPE 0x0
#define FU_STRUCT_SMBIOS_FWSTS_OFFSET_LENGTH 0x1
#define FU_STRUCT_SMBIOS_FWSTS_OFFSET_HANDLE 0x2
#define FU_STRUCT_SMBIOS_FWSTS_OFFSET_VERSION 0x4
#define FU_STRUCT_SMBIOS_FWSTS_OFFSET_COUNT 0x5
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_SMBIOS_FWSTS_SIZE 0x6
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_SMBIOS_FWSTS_DEFAULT_TYPE 0xDB
#define FU_STRUCT_SMBIOS_FWSTS_DEFAULT_VERSION 0x01
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructSmbiosFwstsRecord;

FuStructSmbiosFwstsRecord *fu_struct_smbios_fwsts_record_ref(FuStructSmbiosFwstsRecord *st) G_GNUC_NON_NULL(1);
void fu_struct_smbios_fwsts_record_unref(FuStructSmbiosFwstsRecord *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructSmbiosFwstsRecord, fu_struct_smbios_fwsts_record_unref)
FuStructSmbiosFwstsRecord *fu_struct_smbios_fwsts_record_parse_bytes(GBytes *blob, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
FuSmbiosFwstsComponentName fu_struct_smbios_fwsts_record_get_component_name(const FuStructSmbiosFwstsRecord *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
FuStructIntelMeHfsts *fu_struct_smbios_fwsts_record_get_fwsts(const FuStructSmbiosFwstsRecord *st, guint idx) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_SMBIOS_FWSTS_RECORD_OFFSET_COMPONENT_NAME 0x0
#define FU_STRUCT_SMBIOS_FWSTS_RECORD_OFFSET_FWSTS 0x1
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_SMBIOS_FWSTS_RECORD_SIZE_FWSTS 0x18
#define FU_STRUCT_SMBIOS_FWSTS_RECORD_N_ELEMENTS_FWSTS 6
#define FU_STRUCT_SMBIOS_FWSTS_RECORD_SIZE 0x19
#endif

#ifndef __GI_SCANNER__
#endif
