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

#pragma once
#include <fu-input-stream.h>
/**
 * FuNordicHidCfgStatus:
 */
typedef enum {
    /**
     * FU_NORDIC_HID_CFG_STATUS_PENDING:
     */
    FU_NORDIC_HID_CFG_STATUS_PENDING,
    /**
     * FU_NORDIC_HID_CFG_STATUS_GET_MAX_MOD_ID:
     */
    FU_NORDIC_HID_CFG_STATUS_GET_MAX_MOD_ID,
    /**
     * FU_NORDIC_HID_CFG_STATUS_GET_HWID:
     */
    FU_NORDIC_HID_CFG_STATUS_GET_HWID,
    /**
     * FU_NORDIC_HID_CFG_STATUS_GET_BOARD_NAME:
     */
    FU_NORDIC_HID_CFG_STATUS_GET_BOARD_NAME,
    /**
     * FU_NORDIC_HID_CFG_STATUS_INDEX_PEERS:
     */
    FU_NORDIC_HID_CFG_STATUS_INDEX_PEERS,
    /**
     * FU_NORDIC_HID_CFG_STATUS_GET_PEER:
     */
    FU_NORDIC_HID_CFG_STATUS_GET_PEER,
    /**
     * FU_NORDIC_HID_CFG_STATUS_SET:
     */
    FU_NORDIC_HID_CFG_STATUS_SET,
    /**
     * FU_NORDIC_HID_CFG_STATUS_FETCH:
     */
    FU_NORDIC_HID_CFG_STATUS_FETCH,
    /**
     * FU_NORDIC_HID_CFG_STATUS_SUCCESS:
     */
    FU_NORDIC_HID_CFG_STATUS_SUCCESS,
    /**
     * FU_NORDIC_HID_CFG_STATUS_TIMEOUT:
     */
    FU_NORDIC_HID_CFG_STATUS_TIMEOUT,
    /**
     * FU_NORDIC_HID_CFG_STATUS_REJECT:
     */
    FU_NORDIC_HID_CFG_STATUS_REJECT,
    /**
     * FU_NORDIC_HID_CFG_STATUS_WRITE_FAIL:
     */
    FU_NORDIC_HID_CFG_STATUS_WRITE_FAIL,
    /**
     * FU_NORDIC_HID_CFG_STATUS_DISCONNECTED:
     */
    FU_NORDIC_HID_CFG_STATUS_DISCONNECTED,
    /**
     * FU_NORDIC_HID_CFG_STATUS_GET_PEERS_CACHE:
     */
    FU_NORDIC_HID_CFG_STATUS_GET_PEERS_CACHE,
    /**
     * FU_NORDIC_HID_CFG_STATUS_FAULT:
     */
    FU_NORDIC_HID_CFG_STATUS_FAULT = 99,
}  FuNordicHidCfgStatus;
/**
 * FuNordicHidCfgSyncState:
 */
typedef enum {
    /**
     * FU_NORDIC_HID_CFG_SYNC_STATE_INACTIVE:
     */
    FU_NORDIC_HID_CFG_SYNC_STATE_INACTIVE,
    /**
     * FU_NORDIC_HID_CFG_SYNC_STATE_ACTIVE:
     */
    FU_NORDIC_HID_CFG_SYNC_STATE_ACTIVE,
    /**
     * FU_NORDIC_HID_CFG_SYNC_STATE_STORING:
     */
    FU_NORDIC_HID_CFG_SYNC_STATE_STORING,
    /**
     * FU_NORDIC_HID_CFG_SYNC_STATE_CLEANING:
     */
    FU_NORDIC_HID_CFG_SYNC_STATE_CLEANING,
}  FuNordicHidCfgSyncState;
#define FU_NORDIC_HID_CFG_SYNC_STATE_LAST 4
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructNordicHidDfuFwinfo;

FuStructNordicHidDfuFwinfo *fu_struct_nordic_hid_dfu_fwinfo_ref(FuStructNordicHidDfuFwinfo *st) G_GNUC_NON_NULL(1);
void fu_struct_nordic_hid_dfu_fwinfo_unref(FuStructNordicHidDfuFwinfo *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructNordicHidDfuFwinfo, fu_struct_nordic_hid_dfu_fwinfo_unref)
FuStructNordicHidDfuFwinfo *fu_struct_nordic_hid_dfu_fwinfo_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_nordic_hid_dfu_fwinfo_get_flash_area_id(const FuStructNordicHidDfuFwinfo *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_nordic_hid_dfu_fwinfo_get_flashed_image_len(const FuStructNordicHidDfuFwinfo *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_nordic_hid_dfu_fwinfo_get_ver_major(const FuStructNordicHidDfuFwinfo *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_nordic_hid_dfu_fwinfo_get_ver_minor(const FuStructNordicHidDfuFwinfo *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_nordic_hid_dfu_fwinfo_get_ver_rev(const FuStructNordicHidDfuFwinfo *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_nordic_hid_dfu_fwinfo_get_ver_build_nr(const FuStructNordicHidDfuFwinfo *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_NORDIC_HID_DFU_FWINFO_OFFSET_FLASH_AREA_ID 0x0
#define FU_STRUCT_NORDIC_HID_DFU_FWINFO_OFFSET_FLASHED_IMAGE_LEN 0x1
#define FU_STRUCT_NORDIC_HID_DFU_FWINFO_OFFSET_VER_MAJOR 0x5
#define FU_STRUCT_NORDIC_HID_DFU_FWINFO_OFFSET_VER_MINOR 0x6
#define FU_STRUCT_NORDIC_HID_DFU_FWINFO_OFFSET_VER_REV 0x7
#define FU_STRUCT_NORDIC_HID_DFU_FWINFO_OFFSET_VER_BUILD_NR 0x9
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_NORDIC_HID_DFU_FWINFO_SIZE 0xD
#endif

#ifndef __GI_SCANNER__
#endif
