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

#pragma once
#include <fu-input-stream.h>
/**
 * FuGoodixMocCmd:
 */
typedef enum {
    /**
     * FU_GOODIX_MOC_CMD_UPGRADE_INIT:
     */
    FU_GOODIX_MOC_CMD_UPGRADE_INIT = 0x00,
    /**
     * FU_GOODIX_MOC_CMD_UPGRADE_DATA:
     */
    FU_GOODIX_MOC_CMD_UPGRADE_DATA = 0x01,
    /**
     * FU_GOODIX_MOC_CMD_UPGRADE:
     */
    FU_GOODIX_MOC_CMD_UPGRADE = 0x80,
    /**
     * FU_GOODIX_MOC_CMD_ACK:
     */
    FU_GOODIX_MOC_CMD_ACK = 0xAA,
    /**
     * FU_GOODIX_MOC_CMD_RESET:
     */
    FU_GOODIX_MOC_CMD_RESET = 0xB4,
    /**
     * FU_GOODIX_MOC_CMD_VERSION:
     */
    FU_GOODIX_MOC_CMD_VERSION = 0xD0,
}  FuGoodixMocCmd;
/**
 * FuGoodixMocResult:
 */
typedef enum {
    /**
     * FU_GOODIX_MOC_RESULT_SUCCESS:
     */
    FU_GOODIX_MOC_RESULT_SUCCESS = 0x00,
}  FuGoodixMocResult;
/**
 * FuGoodixMocPkgType:
 */
typedef enum {
    /**
     * FU_GOODIX_MOC_PKG_TYPE_NORMAL:
     */
    FU_GOODIX_MOC_PKG_TYPE_NORMAL = 0x80,
    /**
     * FU_GOODIX_MOC_PKG_TYPE_EOP:
     */
    FU_GOODIX_MOC_PKG_TYPE_EOP = 0,
}  FuGoodixMocPkgType;
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructGoodixMocPkgHeader;

FuStructGoodixMocPkgHeader *fu_struct_goodix_moc_pkg_header_ref(FuStructGoodixMocPkgHeader *st) G_GNUC_NON_NULL(1);
void fu_struct_goodix_moc_pkg_header_unref(FuStructGoodixMocPkgHeader *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructGoodixMocPkgHeader, fu_struct_goodix_moc_pkg_header_unref)
FuStructGoodixMocPkgHeader *fu_struct_goodix_moc_pkg_header_new(void) G_GNUC_WARN_UNUSED_RESULT;
FuStructGoodixMocPkgHeader *fu_struct_goodix_moc_pkg_header_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
FuGoodixMocCmd fu_struct_goodix_moc_pkg_header_get_cmd0(const FuStructGoodixMocPkgHeader *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_goodix_moc_pkg_header_get_cmd1(const FuStructGoodixMocPkgHeader *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
FuGoodixMocPkgType fu_struct_goodix_moc_pkg_header_get_pkg_flag(const FuStructGoodixMocPkgHeader *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_goodix_moc_pkg_header_get_seq(const FuStructGoodixMocPkgHeader *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_goodix_moc_pkg_header_get_len(const FuStructGoodixMocPkgHeader *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_goodix_moc_pkg_header_get_crc8(const FuStructGoodixMocPkgHeader *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_goodix_moc_pkg_header_get_rev_crc8(const FuStructGoodixMocPkgHeader *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_goodix_moc_pkg_header_set_cmd0(FuStructGoodixMocPkgHeader *st, FuGoodixMocCmd value) G_GNUC_NON_NULL(1);
void fu_struct_goodix_moc_pkg_header_set_cmd1(FuStructGoodixMocPkgHeader *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_struct_goodix_moc_pkg_header_set_pkg_flag(FuStructGoodixMocPkgHeader *st, FuGoodixMocPkgType value) G_GNUC_NON_NULL(1);
void fu_struct_goodix_moc_pkg_header_set_seq(FuStructGoodixMocPkgHeader *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_struct_goodix_moc_pkg_header_set_len(FuStructGoodixMocPkgHeader *st, guint16 value) G_GNUC_NON_NULL(1);
void fu_struct_goodix_moc_pkg_header_set_crc8(FuStructGoodixMocPkgHeader *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_struct_goodix_moc_pkg_header_set_rev_crc8(FuStructGoodixMocPkgHeader *st, guint8 value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_GOODIX_MOC_PKG_HEADER_OFFSET_CMD0 0x0
#define FU_STRUCT_GOODIX_MOC_PKG_HEADER_OFFSET_CMD1 0x1
#define FU_STRUCT_GOODIX_MOC_PKG_HEADER_OFFSET_PKG_FLAG 0x2
#define FU_STRUCT_GOODIX_MOC_PKG_HEADER_OFFSET_SEQ 0x3
#define FU_STRUCT_GOODIX_MOC_PKG_HEADER_OFFSET_LEN 0x4
#define FU_STRUCT_GOODIX_MOC_PKG_HEADER_OFFSET_CRC8 0x6
#define FU_STRUCT_GOODIX_MOC_PKG_HEADER_OFFSET_REV_CRC8 0x7
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_GOODIX_MOC_PKG_HEADER_SIZE 0x8
#endif

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

FuStructGoodixMocPkgRsp *fu_struct_goodix_moc_pkg_rsp_ref(FuStructGoodixMocPkgRsp *st) G_GNUC_NON_NULL(1);
void fu_struct_goodix_moc_pkg_rsp_unref(FuStructGoodixMocPkgRsp *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructGoodixMocPkgRsp, fu_struct_goodix_moc_pkg_rsp_unref)
FuStructGoodixMocPkgRsp *fu_struct_goodix_moc_pkg_rsp_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
FuGoodixMocResult fu_struct_goodix_moc_pkg_rsp_get_result(const FuStructGoodixMocPkgRsp *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_GOODIX_MOC_PKG_RSP_OFFSET_RESULT 0x0
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_GOODIX_MOC_PKG_RSP_SIZE 0x1
#endif

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

FuStructGoodixMocPkgAckRsp *fu_struct_goodix_moc_pkg_ack_rsp_ref(FuStructGoodixMocPkgAckRsp *st) G_GNUC_NON_NULL(1);
void fu_struct_goodix_moc_pkg_ack_rsp_unref(FuStructGoodixMocPkgAckRsp *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructGoodixMocPkgAckRsp, fu_struct_goodix_moc_pkg_ack_rsp_unref)

#ifndef __GI_SCANNER__
#define FU_STRUCT_GOODIX_MOC_PKG_ACK_RSP_OFFSET_RESULT 0x0
#define FU_STRUCT_GOODIX_MOC_PKG_ACK_RSP_OFFSET_CMD 0x1
#define FU_STRUCT_GOODIX_MOC_PKG_ACK_RSP_OFFSET_CONFIGURED 0x2
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_GOODIX_MOC_PKG_ACK_RSP_SIZE 0x6
#endif

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

FuStructGoodixMocPkgVersionRsp *fu_struct_goodix_moc_pkg_version_rsp_ref(FuStructGoodixMocPkgVersionRsp *st) G_GNUC_NON_NULL(1);
void fu_struct_goodix_moc_pkg_version_rsp_unref(FuStructGoodixMocPkgVersionRsp *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructGoodixMocPkgVersionRsp, fu_struct_goodix_moc_pkg_version_rsp_unref)
FuStructGoodixMocPkgVersionRsp *fu_struct_goodix_moc_pkg_version_rsp_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
FuGoodixMocResult fu_struct_goodix_moc_pkg_version_rsp_get_result(const FuStructGoodixMocPkgVersionRsp *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
const guint8 *fu_struct_goodix_moc_pkg_version_rsp_get_format(const FuStructGoodixMocPkgVersionRsp *st, gsize *bufsz) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
const guint8 *fu_struct_goodix_moc_pkg_version_rsp_get_fwtype(const FuStructGoodixMocPkgVersionRsp *st, gsize *bufsz) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
gchar *fu_struct_goodix_moc_pkg_version_rsp_get_fwversion(const FuStructGoodixMocPkgVersionRsp *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
const guint8 *fu_struct_goodix_moc_pkg_version_rsp_get_customer(const FuStructGoodixMocPkgVersionRsp *st, gsize *bufsz) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
const guint8 *fu_struct_goodix_moc_pkg_version_rsp_get_mcu(const FuStructGoodixMocPkgVersionRsp *st, gsize *bufsz) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
const guint8 *fu_struct_goodix_moc_pkg_version_rsp_get_sensor(const FuStructGoodixMocPkgVersionRsp *st, gsize *bufsz) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
const guint8 *fu_struct_goodix_moc_pkg_version_rsp_get_algversion(const FuStructGoodixMocPkgVersionRsp *st, gsize *bufsz) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
const guint8 *fu_struct_goodix_moc_pkg_version_rsp_get_interface(const FuStructGoodixMocPkgVersionRsp *st, gsize *bufsz) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
const guint8 *fu_struct_goodix_moc_pkg_version_rsp_get_protocol(const FuStructGoodixMocPkgVersionRsp *st, gsize *bufsz) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
const guint8 *fu_struct_goodix_moc_pkg_version_rsp_get_flash_version(const FuStructGoodixMocPkgVersionRsp *st, gsize *bufsz) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_GOODIX_MOC_PKG_VERSION_RSP_OFFSET_RESULT 0x0
#define FU_STRUCT_GOODIX_MOC_PKG_VERSION_RSP_OFFSET_FORMAT 0x1
#define FU_STRUCT_GOODIX_MOC_PKG_VERSION_RSP_OFFSET_FWTYPE 0x3
#define FU_STRUCT_GOODIX_MOC_PKG_VERSION_RSP_OFFSET_FWVERSION 0xB
#define FU_STRUCT_GOODIX_MOC_PKG_VERSION_RSP_OFFSET_CUSTOMER 0x13
#define FU_STRUCT_GOODIX_MOC_PKG_VERSION_RSP_OFFSET_MCU 0x1B
#define FU_STRUCT_GOODIX_MOC_PKG_VERSION_RSP_OFFSET_SENSOR 0x23
#define FU_STRUCT_GOODIX_MOC_PKG_VERSION_RSP_OFFSET_ALGVERSION 0x2B
#define FU_STRUCT_GOODIX_MOC_PKG_VERSION_RSP_OFFSET_INTERFACE 0x33
#define FU_STRUCT_GOODIX_MOC_PKG_VERSION_RSP_OFFSET_PROTOCOL 0x3B
#define FU_STRUCT_GOODIX_MOC_PKG_VERSION_RSP_OFFSET_FLASH_VERSION 0x43
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_GOODIX_MOC_PKG_VERSION_RSP_SIZE_FORMAT 0x2
#define FU_STRUCT_GOODIX_MOC_PKG_VERSION_RSP_N_ELEMENTS_FORMAT 2
#define FU_STRUCT_GOODIX_MOC_PKG_VERSION_RSP_SIZE_FWTYPE 0x8
#define FU_STRUCT_GOODIX_MOC_PKG_VERSION_RSP_N_ELEMENTS_FWTYPE 8
#define FU_STRUCT_GOODIX_MOC_PKG_VERSION_RSP_SIZE_FWVERSION 0x8
#define FU_STRUCT_GOODIX_MOC_PKG_VERSION_RSP_N_ELEMENTS_FWVERSION 8
#define FU_STRUCT_GOODIX_MOC_PKG_VERSION_RSP_SIZE_CUSTOMER 0x8
#define FU_STRUCT_GOODIX_MOC_PKG_VERSION_RSP_N_ELEMENTS_CUSTOMER 8
#define FU_STRUCT_GOODIX_MOC_PKG_VERSION_RSP_SIZE_MCU 0x8
#define FU_STRUCT_GOODIX_MOC_PKG_VERSION_RSP_N_ELEMENTS_MCU 8
#define FU_STRUCT_GOODIX_MOC_PKG_VERSION_RSP_SIZE_SENSOR 0x8
#define FU_STRUCT_GOODIX_MOC_PKG_VERSION_RSP_N_ELEMENTS_SENSOR 8
#define FU_STRUCT_GOODIX_MOC_PKG_VERSION_RSP_SIZE_ALGVERSION 0x8
#define FU_STRUCT_GOODIX_MOC_PKG_VERSION_RSP_N_ELEMENTS_ALGVERSION 8
#define FU_STRUCT_GOODIX_MOC_PKG_VERSION_RSP_SIZE_INTERFACE 0x8
#define FU_STRUCT_GOODIX_MOC_PKG_VERSION_RSP_N_ELEMENTS_INTERFACE 8
#define FU_STRUCT_GOODIX_MOC_PKG_VERSION_RSP_SIZE_PROTOCOL 0x8
#define FU_STRUCT_GOODIX_MOC_PKG_VERSION_RSP_N_ELEMENTS_PROTOCOL 8
#define FU_STRUCT_GOODIX_MOC_PKG_VERSION_RSP_SIZE_FLASH_VERSION 0x8
#define FU_STRUCT_GOODIX_MOC_PKG_VERSION_RSP_N_ELEMENTS_FLASH_VERSION 8
#define FU_STRUCT_GOODIX_MOC_PKG_VERSION_RSP_SIZE 0x81
#endif

#ifndef __GI_SCANNER__
#endif
