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

#pragma once
#include <fu-input-stream.h>
/**
 * FuFpcDfuState:
 */
typedef enum {
    /**
     * FU_FPC_DFU_STATE_DNBUSY:
     */
    FU_FPC_DFU_STATE_DNBUSY = 0x04,
}  FuFpcDfuState;
/**
 * FuFpcFf2BlockDir:
 */
typedef enum {
    /**
     * FU_FPC_FF2_BLOCK_DIR_OUT:
     */
    FU_FPC_FF2_BLOCK_DIR_OUT = 0x0,
    /**
     * FU_FPC_FF2_BLOCK_DIR_IN:
     */
    FU_FPC_FF2_BLOCK_DIR_IN = 0x1,
}  FuFpcFf2BlockDir;
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructFpcDfu;

FuStructFpcDfu *fu_struct_fpc_dfu_ref(FuStructFpcDfu *st) G_GNUC_NON_NULL(1);
void fu_struct_fpc_dfu_unref(FuStructFpcDfu *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructFpcDfu, fu_struct_fpc_dfu_unref)
FuStructFpcDfu *fu_struct_fpc_dfu_new(void) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_fpc_dfu_get_status(const FuStructFpcDfu *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_fpc_dfu_get_max_payload_size(const FuStructFpcDfu *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
FuFpcDfuState fu_struct_fpc_dfu_get_state(const FuStructFpcDfu *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_fpc_dfu_set_status(FuStructFpcDfu *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_struct_fpc_dfu_set_max_payload_size(FuStructFpcDfu *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_struct_fpc_dfu_set_state(FuStructFpcDfu *st, FuFpcDfuState value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_FPC_DFU_OFFSET_STATUS 0x0
#define FU_STRUCT_FPC_DFU_OFFSET_MAX_PAYLOAD_SIZE 0x1
#define FU_STRUCT_FPC_DFU_OFFSET_STATE 0x4
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_FPC_DFU_SIZE 0x6
#endif

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

FuStructFpcFf2Hdr *fu_struct_fpc_ff2_hdr_ref(FuStructFpcFf2Hdr *st) G_GNUC_NON_NULL(1);
void fu_struct_fpc_ff2_hdr_unref(FuStructFpcFf2Hdr *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructFpcFf2Hdr, fu_struct_fpc_ff2_hdr_unref)
FuStructFpcFf2Hdr *fu_struct_fpc_ff2_hdr_parse_stream(GInputStream *stream, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
gboolean fu_struct_fpc_ff2_hdr_validate_stream(GInputStream *stream, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_fpc_ff2_hdr_get_blocks_num(const FuStructFpcFf2Hdr *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_FPC_FF2_HDR_OFFSET_COMPAT_SIG 0x0
#define FU_STRUCT_FPC_FF2_HDR_OFFSET_BLOCKS_NUM 0x1B
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_FPC_FF2_HDR_SIZE_COMPAT_SIG 0x7
#define FU_STRUCT_FPC_FF2_HDR_N_ELEMENTS_COMPAT_SIG 7
#define FU_STRUCT_FPC_FF2_HDR_SIZE 0x25
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_FPC_FF2_HDR_DEFAULT_COMPAT_SIG "FPC0001"
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructFpcFf2BlockHdr;

FuStructFpcFf2BlockHdr *fu_struct_fpc_ff2_block_hdr_ref(FuStructFpcFf2BlockHdr *st) G_GNUC_NON_NULL(1);
void fu_struct_fpc_ff2_block_hdr_unref(FuStructFpcFf2BlockHdr *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructFpcFf2BlockHdr, fu_struct_fpc_ff2_block_hdr_unref)
FuStructFpcFf2BlockHdr *fu_struct_fpc_ff2_block_hdr_parse_stream(GInputStream *stream, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_fpc_ff2_block_hdr_get_meta_id(const FuStructFpcFf2BlockHdr *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
FuFpcFf2BlockDir fu_struct_fpc_ff2_block_hdr_get_dir(const FuStructFpcFf2BlockHdr *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_FPC_FF2_BLOCK_HDR_OFFSET_META_TYPE 0x0
#define FU_STRUCT_FPC_FF2_BLOCK_HDR_OFFSET_META_ID 0x1
#define FU_STRUCT_FPC_FF2_BLOCK_HDR_OFFSET_DIR 0x2
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_FPC_FF2_BLOCK_HDR_SIZE 0x3
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_FPC_FF2_BLOCK_HDR_DEFAULT_META_TYPE 0xCD
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructFpcFf2BlockSec;

FuStructFpcFf2BlockSec *fu_struct_fpc_ff2_block_sec_ref(FuStructFpcFf2BlockSec *st) G_GNUC_NON_NULL(1);
void fu_struct_fpc_ff2_block_sec_unref(FuStructFpcFf2BlockSec *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructFpcFf2BlockSec, fu_struct_fpc_ff2_block_sec_unref)
FuStructFpcFf2BlockSec *fu_struct_fpc_ff2_block_sec_parse_stream(GInputStream *stream, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_fpc_ff2_block_sec_get_type(const FuStructFpcFf2BlockSec *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_fpc_ff2_block_sec_get_payload_len(const FuStructFpcFf2BlockSec *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_FPC_FF2_BLOCK_SEC_OFFSET_HEADER 0x0
#define FU_STRUCT_FPC_FF2_BLOCK_SEC_OFFSET_TYPE 0x1
#define FU_STRUCT_FPC_FF2_BLOCK_SEC_OFFSET_PAYLOAD_LEN 0x2
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_FPC_FF2_BLOCK_SEC_SIZE 0x4
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_FPC_FF2_BLOCK_SEC_DEFAULT_HEADER 0xEE
#endif
