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

#pragma once
#include <fu-input-stream.h>
/**
 * FuAmdKriaBootImageId:
 */
typedef enum {
    /**
     * FU_AMD_KRIA_BOOT_IMAGE_ID_A:
     */
    FU_AMD_KRIA_BOOT_IMAGE_ID_A,
    /**
     * FU_AMD_KRIA_BOOT_IMAGE_ID_B:
     */
    FU_AMD_KRIA_BOOT_IMAGE_ID_B,
}  FuAmdKriaBootImageId;
#define FU_AMD_KRIA_BOOT_IMAGE_ID_LAST 2
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructAmdKriaPersistReg;

FuStructAmdKriaPersistReg *fu_struct_amd_kria_persist_reg_ref(FuStructAmdKriaPersistReg *st) G_GNUC_NON_NULL(1);
void fu_struct_amd_kria_persist_reg_unref(FuStructAmdKriaPersistReg *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructAmdKriaPersistReg, fu_struct_amd_kria_persist_reg_unref)
FuStructAmdKriaPersistReg *fu_struct_amd_kria_persist_reg_parse_stream(GInputStream *stream, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_amd_kria_persist_reg_get_ver(const FuStructAmdKriaPersistReg *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_amd_kria_persist_reg_get_len(const FuStructAmdKriaPersistReg *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_amd_kria_persist_reg_get_checksum(const FuStructAmdKriaPersistReg *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_amd_kria_persist_reg_get_last_booted_img(const FuStructAmdKriaPersistReg *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_amd_kria_persist_reg_get_requested_booted_img(const FuStructAmdKriaPersistReg *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_amd_kria_persist_reg_get_img_b_bootable(const FuStructAmdKriaPersistReg *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_amd_kria_persist_reg_get_img_a_bootable(const FuStructAmdKriaPersistReg *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_amd_kria_persist_reg_get_img_a_offset(const FuStructAmdKriaPersistReg *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_amd_kria_persist_reg_get_img_b_offset(const FuStructAmdKriaPersistReg *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_amd_kria_persist_reg_get_recovery_offset(const FuStructAmdKriaPersistReg *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_AMD_KRIA_PERSIST_REG_OFFSET_ID_SIG 0x0
#define FU_STRUCT_AMD_KRIA_PERSIST_REG_OFFSET_VER 0x4
#define FU_STRUCT_AMD_KRIA_PERSIST_REG_OFFSET_LEN 0x8
#define FU_STRUCT_AMD_KRIA_PERSIST_REG_OFFSET_CHECKSUM 0xC
#define FU_STRUCT_AMD_KRIA_PERSIST_REG_OFFSET_LAST_BOOTED_IMG 0x10
#define FU_STRUCT_AMD_KRIA_PERSIST_REG_OFFSET_REQUESTED_BOOTED_IMG 0x11
#define FU_STRUCT_AMD_KRIA_PERSIST_REG_OFFSET_IMG_B_BOOTABLE 0x12
#define FU_STRUCT_AMD_KRIA_PERSIST_REG_OFFSET_IMG_A_BOOTABLE 0x13
#define FU_STRUCT_AMD_KRIA_PERSIST_REG_OFFSET_IMG_A_OFFSET 0x14
#define FU_STRUCT_AMD_KRIA_PERSIST_REG_OFFSET_IMG_B_OFFSET 0x18
#define FU_STRUCT_AMD_KRIA_PERSIST_REG_OFFSET_RECOVERY_OFFSET 0x1C
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_AMD_KRIA_PERSIST_REG_SIZE_ID_SIG 0x4
#define FU_STRUCT_AMD_KRIA_PERSIST_REG_N_ELEMENTS_ID_SIG 4
#define FU_STRUCT_AMD_KRIA_PERSIST_REG_SIZE 0x20
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_AMD_KRIA_PERSIST_REG_DEFAULT_ID_SIG "ABUM"
#endif
