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

#pragma once
#include <fu-input-stream.h>
/**
 * FuIntelThunderboltNvmSection:
 */
typedef enum {
    /**
     * FU_INTEL_THUNDERBOLT_NVM_SECTION_DIGITAL:
     */
    FU_INTEL_THUNDERBOLT_NVM_SECTION_DIGITAL,
    /**
     * FU_INTEL_THUNDERBOLT_NVM_SECTION_DROM:
     */
    FU_INTEL_THUNDERBOLT_NVM_SECTION_DROM,
    /**
     * FU_INTEL_THUNDERBOLT_NVM_SECTION_ARC_PARAMS:
     */
    FU_INTEL_THUNDERBOLT_NVM_SECTION_ARC_PARAMS,
    /**
     * FU_INTEL_THUNDERBOLT_NVM_SECTION_DRAM_UCODE:
     */
    FU_INTEL_THUNDERBOLT_NVM_SECTION_DRAM_UCODE,
}  FuIntelThunderboltNvmSection;
#define FU_INTEL_THUNDERBOLT_NVM_SECTION_LAST 4
const gchar *fu_intel_thunderbolt_nvm_section_to_string(FuIntelThunderboltNvmSection val) G_GNUC_CONST;
/**
 * FuIntelThunderboltNvmSectionFlags:
 */
typedef enum {
    /**
     * FU_INTEL_THUNDERBOLT_NVM_SECTION_FLAG_DRAM:
     */
    FU_INTEL_THUNDERBOLT_NVM_SECTION_FLAG_DRAM = 1 << 6,
} G_GNUC_FLAG_ENUM FuIntelThunderboltNvmSectionFlags;
/**
 * FuIntelThunderboltNvmFamily:
 */
typedef enum {
    /**
     * FU_INTEL_THUNDERBOLT_NVM_FAMILY_UNKNOWN:
     */
    FU_INTEL_THUNDERBOLT_NVM_FAMILY_UNKNOWN,
    /**
     * FU_INTEL_THUNDERBOLT_NVM_FAMILY_FALCON_RIDGE:
     */
    FU_INTEL_THUNDERBOLT_NVM_FAMILY_FALCON_RIDGE,
    /**
     * FU_INTEL_THUNDERBOLT_NVM_FAMILY_WIN_RIDGE:
     */
    FU_INTEL_THUNDERBOLT_NVM_FAMILY_WIN_RIDGE,
    /**
     * FU_INTEL_THUNDERBOLT_NVM_FAMILY_ALPINE_RIDGE:
     */
    FU_INTEL_THUNDERBOLT_NVM_FAMILY_ALPINE_RIDGE,
    /**
     * FU_INTEL_THUNDERBOLT_NVM_FAMILY_ALPINE_RIDGE_C:
     */
    FU_INTEL_THUNDERBOLT_NVM_FAMILY_ALPINE_RIDGE_C,
    /**
     * FU_INTEL_THUNDERBOLT_NVM_FAMILY_TITAN_RIDGE:
     */
    FU_INTEL_THUNDERBOLT_NVM_FAMILY_TITAN_RIDGE,
    /**
     * FU_INTEL_THUNDERBOLT_NVM_FAMILY_BB:
     */
    FU_INTEL_THUNDERBOLT_NVM_FAMILY_BB,
    /**
     * FU_INTEL_THUNDERBOLT_NVM_FAMILY_MAPLE_RIDGE:
     */
    FU_INTEL_THUNDERBOLT_NVM_FAMILY_MAPLE_RIDGE,
    /**
     * FU_INTEL_THUNDERBOLT_NVM_FAMILY_GOSHEN_RIDGE:
     */
    FU_INTEL_THUNDERBOLT_NVM_FAMILY_GOSHEN_RIDGE,
    /**
     * FU_INTEL_THUNDERBOLT_NVM_FAMILY_BARLOW_RIDGE:
     */
    FU_INTEL_THUNDERBOLT_NVM_FAMILY_BARLOW_RIDGE,
}  FuIntelThunderboltNvmFamily;
#define FU_INTEL_THUNDERBOLT_NVM_FAMILY_LAST 10
const gchar *fu_intel_thunderbolt_nvm_family_to_string(FuIntelThunderboltNvmFamily val) G_GNUC_CONST;
FuIntelThunderboltNvmFamily fu_intel_thunderbolt_nvm_family_from_string(const gchar *val) G_GNUC_CONST G_GNUC_NON_NULL(1);
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuIntelThunderboltNvmDigital;

FuIntelThunderboltNvmDigital *fu_intel_thunderbolt_nvm_digital_ref(FuIntelThunderboltNvmDigital *st) G_GNUC_NON_NULL(1);
void fu_intel_thunderbolt_nvm_digital_unref(FuIntelThunderboltNvmDigital *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuIntelThunderboltNvmDigital, fu_intel_thunderbolt_nvm_digital_unref)
FuIntelThunderboltNvmDigital *fu_intel_thunderbolt_nvm_digital_new(void) G_GNUC_WARN_UNUSED_RESULT;
void fu_intel_thunderbolt_nvm_digital_set_available_sections(FuIntelThunderboltNvmDigital *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_intel_thunderbolt_nvm_digital_set_ucode(FuIntelThunderboltNvmDigital *st, guint16 value) G_GNUC_NON_NULL(1);
void fu_intel_thunderbolt_nvm_digital_set_device_id(FuIntelThunderboltNvmDigital *st, guint32 value) G_GNUC_NON_NULL(1);
void fu_intel_thunderbolt_nvm_digital_set_version(FuIntelThunderboltNvmDigital *st, guint16 value) G_GNUC_NON_NULL(1);
void fu_intel_thunderbolt_nvm_digital_set_flags_host(FuIntelThunderboltNvmDigital *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_intel_thunderbolt_nvm_digital_set_flash_size(FuIntelThunderboltNvmDigital *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_intel_thunderbolt_nvm_digital_set_arc_params(FuIntelThunderboltNvmDigital *st, guint32 value) G_GNUC_NON_NULL(1);
void fu_intel_thunderbolt_nvm_digital_set_flags_is_native(FuIntelThunderboltNvmDigital *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_intel_thunderbolt_nvm_digital_set_drom(FuIntelThunderboltNvmDigital *st, guint32 value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_INTEL_THUNDERBOLT_NVM_DIGITAL_OFFSET_AVAILABLE_SECTIONS 0x2
#define FU_INTEL_THUNDERBOLT_NVM_DIGITAL_OFFSET_UCODE 0x3
#define FU_INTEL_THUNDERBOLT_NVM_DIGITAL_OFFSET_DEVICE_ID 0x5
#define FU_INTEL_THUNDERBOLT_NVM_DIGITAL_OFFSET_VERSION 0x9
#define FU_INTEL_THUNDERBOLT_NVM_DIGITAL_OFFSET_FLAGS_HOST 0x10
#define FU_INTEL_THUNDERBOLT_NVM_DIGITAL_OFFSET_FLASH_SIZE 0x45
#define FU_INTEL_THUNDERBOLT_NVM_DIGITAL_OFFSET_ARC_PARAMS 0x75
#define FU_INTEL_THUNDERBOLT_NVM_DIGITAL_OFFSET_FLAGS_IS_NATIVE 0x7B
#define FU_INTEL_THUNDERBOLT_NVM_DIGITAL_OFFSET_DROM 0x10E
#endif

#ifndef __GI_SCANNER__
#define FU_INTEL_THUNDERBOLT_NVM_DIGITAL_SIZE 0x120
#endif

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

FuIntelThunderboltNvmDrom *fu_intel_thunderbolt_nvm_drom_ref(FuIntelThunderboltNvmDrom *st) G_GNUC_NON_NULL(1);
void fu_intel_thunderbolt_nvm_drom_unref(FuIntelThunderboltNvmDrom *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuIntelThunderboltNvmDrom, fu_intel_thunderbolt_nvm_drom_unref)
FuIntelThunderboltNvmDrom *fu_intel_thunderbolt_nvm_drom_new(void) G_GNUC_WARN_UNUSED_RESULT;
void fu_intel_thunderbolt_nvm_drom_set_vendor_id(FuIntelThunderboltNvmDrom *st, guint16 value) G_GNUC_NON_NULL(1);
void fu_intel_thunderbolt_nvm_drom_set_model_id(FuIntelThunderboltNvmDrom *st, guint16 value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_INTEL_THUNDERBOLT_NVM_DROM_OFFSET_VENDOR_ID 0x10
#define FU_INTEL_THUNDERBOLT_NVM_DROM_OFFSET_MODEL_ID 0x12
#endif

#ifndef __GI_SCANNER__
#define FU_INTEL_THUNDERBOLT_NVM_DROM_SIZE 0x20
#endif

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

FuIntelThunderboltNvmArcParams *fu_intel_thunderbolt_nvm_arc_params_ref(FuIntelThunderboltNvmArcParams *st) G_GNUC_NON_NULL(1);
void fu_intel_thunderbolt_nvm_arc_params_unref(FuIntelThunderboltNvmArcParams *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuIntelThunderboltNvmArcParams, fu_intel_thunderbolt_nvm_arc_params_unref)
FuIntelThunderboltNvmArcParams *fu_intel_thunderbolt_nvm_arc_params_new(void) G_GNUC_WARN_UNUSED_RESULT;
void fu_intel_thunderbolt_nvm_arc_params_set_pd_pointer(FuIntelThunderboltNvmArcParams *st, guint32 value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_INTEL_THUNDERBOLT_NVM_ARC_PARAMS_OFFSET_PD_POINTER 0x10C
#endif

#ifndef __GI_SCANNER__
#define FU_INTEL_THUNDERBOLT_NVM_ARC_PARAMS_SIZE 0x120
#endif

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

FuIntelThunderboltNvmDram *fu_intel_thunderbolt_nvm_dram_ref(FuIntelThunderboltNvmDram *st) G_GNUC_NON_NULL(1);
void fu_intel_thunderbolt_nvm_dram_unref(FuIntelThunderboltNvmDram *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuIntelThunderboltNvmDram, fu_intel_thunderbolt_nvm_dram_unref)
FuIntelThunderboltNvmDram *fu_intel_thunderbolt_nvm_dram_new(void) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#endif

#ifndef __GI_SCANNER__
#define FU_INTEL_THUNDERBOLT_NVM_DRAM_SIZE 0x10
#endif

#ifndef __GI_SCANNER__
#endif
