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

#pragma once
#include <fu-input-stream.h>
/**
 * FuEgisMocStatus:
 */
typedef enum {
    /**
     * FU_EGIS_MOC_STATUS_SUCCESS:
     */
    FU_EGIS_MOC_STATUS_SUCCESS = 0x9000,
}  FuEgisMocStatus;
/**
 * FuEgisMocOpMode:
 */
typedef enum {
    /**
     * FU_EGIS_MOC_OP_MODE_BOOTLOADER:
     */
    FU_EGIS_MOC_OP_MODE_BOOTLOADER = 0x0B,
}  FuEgisMocOpMode;
/**
 * FuEgisMocCla:
 */
typedef enum {
    /**
     * FU_EGIS_MOC_CLA_APDU_GENERAL:
     */
    FU_EGIS_MOC_CLA_APDU_GENERAL = 0x50,
}  FuEgisMocCla;
/**
 * FuEgisMocCmd:
 */
typedef enum {
    /**
     * FU_EGIS_MOC_CMD_OP_MODE_GET:
     */
    FU_EGIS_MOC_CMD_OP_MODE_GET = 0x52,
    /**
     * FU_EGIS_MOC_CMD_CHALLENGE_GET:
     */
    FU_EGIS_MOC_CMD_CHALLENGE_GET = 0x54,
    /**
     * FU_EGIS_MOC_CMD_ENTER_OTA_MODE:
     */
    FU_EGIS_MOC_CMD_ENTER_OTA_MODE = 0x58,
    /**
     * FU_EGIS_MOC_CMD_OTA_WRITE:
     */
    FU_EGIS_MOC_CMD_OTA_WRITE = 0x5A,
    /**
     * FU_EGIS_MOC_CMD_OTA_FINAL:
     */
    FU_EGIS_MOC_CMD_OTA_FINAL = 0x5C,
    /**
     * FU_EGIS_MOC_CMD_APDU_VERSION:
     */
    FU_EGIS_MOC_CMD_APDU_VERSION = 0x7F,
}  FuEgisMocCmd;
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructEgisMocCmdReq;

FuStructEgisMocCmdReq *fu_struct_egis_moc_cmd_req_ref(FuStructEgisMocCmdReq *st) G_GNUC_NON_NULL(1);
void fu_struct_egis_moc_cmd_req_unref(FuStructEgisMocCmdReq *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructEgisMocCmdReq, fu_struct_egis_moc_cmd_req_unref)
FuStructEgisMocCmdReq *fu_struct_egis_moc_cmd_req_new(void) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_egis_moc_cmd_req_set_ins(FuStructEgisMocCmdReq *st, FuEgisMocCmd value) G_GNUC_NON_NULL(1);
void fu_struct_egis_moc_cmd_req_set_lc3(FuStructEgisMocCmdReq *st, guint8 value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_EGIS_MOC_CMD_REQ_OFFSET_CLA 0x0
#define FU_STRUCT_EGIS_MOC_CMD_REQ_OFFSET_INS 0x1
#define FU_STRUCT_EGIS_MOC_CMD_REQ_OFFSET_LC3 0x6
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_EGIS_MOC_CMD_REQ_SIZE 0x7
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_EGIS_MOC_CMD_REQ_DEFAULT_CLA FU_EGIS_MOC_CLA_APDU_GENERAL
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructEgisMocVersionInfo;

FuStructEgisMocVersionInfo *fu_struct_egis_moc_version_info_ref(FuStructEgisMocVersionInfo *st) G_GNUC_NON_NULL(1);
void fu_struct_egis_moc_version_info_unref(FuStructEgisMocVersionInfo *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructEgisMocVersionInfo, fu_struct_egis_moc_version_info_unref)

#ifndef __GI_SCANNER__
#define FU_STRUCT_EGIS_MOC_VERSION_INFO_OFFSET_PLATFORM 0x0
#define FU_STRUCT_EGIS_MOC_VERSION_INFO_OFFSET_MAJOR_VERSION 0x5
#define FU_STRUCT_EGIS_MOC_VERSION_INFO_OFFSET_MINOR_VERSION 0x7
#define FU_STRUCT_EGIS_MOC_VERSION_INFO_OFFSET_REVISION 0x9
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_EGIS_MOC_VERSION_INFO_SIZE_PLATFORM 0x4
#define FU_STRUCT_EGIS_MOC_VERSION_INFO_N_ELEMENTS_PLATFORM 4
#define FU_STRUCT_EGIS_MOC_VERSION_INFO_SIZE_REVISION 0x2
#define FU_STRUCT_EGIS_MOC_VERSION_INFO_N_ELEMENTS_REVISION 2
#define FU_STRUCT_EGIS_MOC_VERSION_INFO_SIZE 0xB
#endif

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

FuStructEgisMocPkgHeader *fu_struct_egis_moc_pkg_header_ref(FuStructEgisMocPkgHeader *st) G_GNUC_NON_NULL(1);
void fu_struct_egis_moc_pkg_header_unref(FuStructEgisMocPkgHeader *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructEgisMocPkgHeader, fu_struct_egis_moc_pkg_header_unref)
FuStructEgisMocPkgHeader *fu_struct_egis_moc_pkg_header_new(void) G_GNUC_WARN_UNUSED_RESULT;
FuStructEgisMocPkgHeader *fu_struct_egis_moc_pkg_header_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_egis_moc_pkg_header_get_sync(const FuStructEgisMocPkgHeader *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_egis_moc_pkg_header_get_id(const FuStructEgisMocPkgHeader *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_egis_moc_pkg_header_get_chksum(const FuStructEgisMocPkgHeader *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_egis_moc_pkg_header_get_len(const FuStructEgisMocPkgHeader *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_egis_moc_pkg_header_set_sync(FuStructEgisMocPkgHeader *st, guint32 value) G_GNUC_NON_NULL(1);
void fu_struct_egis_moc_pkg_header_set_id(FuStructEgisMocPkgHeader *st, guint32 value) G_GNUC_NON_NULL(1);
void fu_struct_egis_moc_pkg_header_set_chksum(FuStructEgisMocPkgHeader *st, guint16 value) G_GNUC_NON_NULL(1);
void fu_struct_egis_moc_pkg_header_set_len(FuStructEgisMocPkgHeader *st, guint32 value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_EGIS_MOC_PKG_HEADER_OFFSET_SYNC 0x0
#define FU_STRUCT_EGIS_MOC_PKG_HEADER_OFFSET_ID 0x4
#define FU_STRUCT_EGIS_MOC_PKG_HEADER_OFFSET_CHKSUM 0x8
#define FU_STRUCT_EGIS_MOC_PKG_HEADER_OFFSET_LEN 0xA
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_EGIS_MOC_PKG_HEADER_SIZE 0xE
#endif

#ifndef __GI_SCANNER__
#endif
