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

#pragma once
#include <fu-input-stream.h>
/**
 * FuAlgoltekCmd:
 */
typedef enum {
    /**
     * FU_ALGOLTEK_CMD_RDR:
     */
    FU_ALGOLTEK_CMD_RDR = 0x06,
    /**
     * FU_ALGOLTEK_CMD_WRR:
     */
    FU_ALGOLTEK_CMD_WRR,
    /**
     * FU_ALGOLTEK_CMD_RDV:
     */
    FU_ALGOLTEK_CMD_RDV,
    /**
     * FU_ALGOLTEK_CMD_EN:
     */
    FU_ALGOLTEK_CMD_EN,
    /**
     * FU_ALGOLTEK_CMD_WRF:
     */
    FU_ALGOLTEK_CMD_WRF = 0x10,
    /**
     * FU_ALGOLTEK_CMD_ISP:
     */
    FU_ALGOLTEK_CMD_ISP = 0x13,
    /**
     * FU_ALGOLTEK_CMD_ERS:
     */
    FU_ALGOLTEK_CMD_ERS = 0x19,
    /**
     * FU_ALGOLTEK_CMD_BOT:
     */
    FU_ALGOLTEK_CMD_BOT = 0x1D,
    /**
     * FU_ALGOLTEK_CMD_RST:
     */
    FU_ALGOLTEK_CMD_RST = 0x20,
}  FuAlgoltekCmd;
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructAlgoltekProductIdentity;

FuStructAlgoltekProductIdentity *fu_struct_algoltek_product_identity_ref(FuStructAlgoltekProductIdentity *st) G_GNUC_NON_NULL(1);
void fu_struct_algoltek_product_identity_unref(FuStructAlgoltekProductIdentity *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructAlgoltekProductIdentity, fu_struct_algoltek_product_identity_unref)
FuStructAlgoltekProductIdentity *fu_struct_algoltek_product_identity_parse_stream(GInputStream *stream, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
gboolean fu_struct_algoltek_product_identity_validate_stream(GInputStream *stream, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_algoltek_product_identity_get_header_len(const FuStructAlgoltekProductIdentity *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_algoltek_product_identity_get_product_name_len(const FuStructAlgoltekProductIdentity *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
gchar *fu_struct_algoltek_product_identity_get_product_name(const FuStructAlgoltekProductIdentity *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_algoltek_product_identity_get_version_len(const FuStructAlgoltekProductIdentity *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
gchar *fu_struct_algoltek_product_identity_get_version(const FuStructAlgoltekProductIdentity *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_ALGOLTEK_PRODUCT_IDENTITY_OFFSET_HEADER_LEN 0x0
#define FU_STRUCT_ALGOLTEK_PRODUCT_IDENTITY_OFFSET_HEADER 0x1
#define FU_STRUCT_ALGOLTEK_PRODUCT_IDENTITY_OFFSET_PRODUCT_NAME_LEN 0x9
#define FU_STRUCT_ALGOLTEK_PRODUCT_IDENTITY_OFFSET_PRODUCT_NAME 0xA
#define FU_STRUCT_ALGOLTEK_PRODUCT_IDENTITY_OFFSET_VERSION_LEN 0x1A
#define FU_STRUCT_ALGOLTEK_PRODUCT_IDENTITY_OFFSET_VERSION 0x1B
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ALGOLTEK_PRODUCT_IDENTITY_SIZE_PRODUCT_NAME 0x10
#define FU_STRUCT_ALGOLTEK_PRODUCT_IDENTITY_N_ELEMENTS_PRODUCT_NAME 16
#define FU_STRUCT_ALGOLTEK_PRODUCT_IDENTITY_SIZE_VERSION 0x30
#define FU_STRUCT_ALGOLTEK_PRODUCT_IDENTITY_N_ELEMENTS_VERSION 48
#define FU_STRUCT_ALGOLTEK_PRODUCT_IDENTITY_SIZE 0x4B
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ALGOLTEK_PRODUCT_IDENTITY_DEFAULT_HEADER 0x4B45544C4F474C41
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructAlgoltekCmdAddressPkt;

FuStructAlgoltekCmdAddressPkt *fu_struct_algoltek_cmd_address_pkt_ref(FuStructAlgoltekCmdAddressPkt *st) G_GNUC_NON_NULL(1);
void fu_struct_algoltek_cmd_address_pkt_unref(FuStructAlgoltekCmdAddressPkt *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructAlgoltekCmdAddressPkt, fu_struct_algoltek_cmd_address_pkt_unref)
FuStructAlgoltekCmdAddressPkt *fu_struct_algoltek_cmd_address_pkt_new(void) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_algoltek_cmd_address_pkt_set_len(FuStructAlgoltekCmdAddressPkt *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_struct_algoltek_cmd_address_pkt_set_cmd(FuStructAlgoltekCmdAddressPkt *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_struct_algoltek_cmd_address_pkt_set_address(FuStructAlgoltekCmdAddressPkt *st, guint16 value) G_GNUC_NON_NULL(1);
void fu_struct_algoltek_cmd_address_pkt_set_value(FuStructAlgoltekCmdAddressPkt *st, guint16 value) G_GNUC_NON_NULL(1);
void fu_struct_algoltek_cmd_address_pkt_set_checksum(FuStructAlgoltekCmdAddressPkt *st, guint8 value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_ALGOLTEK_CMD_ADDRESS_PKT_OFFSET_LEN 0x0
#define FU_STRUCT_ALGOLTEK_CMD_ADDRESS_PKT_OFFSET_CMD 0x1
#define FU_STRUCT_ALGOLTEK_CMD_ADDRESS_PKT_OFFSET_ADDRESS 0x2
#define FU_STRUCT_ALGOLTEK_CMD_ADDRESS_PKT_OFFSET_VALUE 0x4
#define FU_STRUCT_ALGOLTEK_CMD_ADDRESS_PKT_OFFSET_CHECKSUM 0xA
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ALGOLTEK_CMD_ADDRESS_PKT_SIZE 0xB
#endif

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

FuStructAlgoltekCmdTransferPkt *fu_struct_algoltek_cmd_transfer_pkt_ref(FuStructAlgoltekCmdTransferPkt *st) G_GNUC_NON_NULL(1);
void fu_struct_algoltek_cmd_transfer_pkt_unref(FuStructAlgoltekCmdTransferPkt *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructAlgoltekCmdTransferPkt, fu_struct_algoltek_cmd_transfer_pkt_unref)
FuStructAlgoltekCmdTransferPkt *fu_struct_algoltek_cmd_transfer_pkt_new(void) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_algoltek_cmd_transfer_pkt_set_len(FuStructAlgoltekCmdTransferPkt *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_struct_algoltek_cmd_transfer_pkt_set_cmd(FuStructAlgoltekCmdTransferPkt *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_struct_algoltek_cmd_transfer_pkt_set_address(FuStructAlgoltekCmdTransferPkt *st, guint16 value) G_GNUC_NON_NULL(1);
gboolean fu_struct_algoltek_cmd_transfer_pkt_set_data(FuStructAlgoltekCmdTransferPkt *st, const guint8 *buf, gsize bufsz, GError **error) G_GNUC_NON_NULL(1, 2) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_algoltek_cmd_transfer_pkt_set_checksum(FuStructAlgoltekCmdTransferPkt *st, guint8 value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_ALGOLTEK_CMD_TRANSFER_PKT_OFFSET_LEN 0x0
#define FU_STRUCT_ALGOLTEK_CMD_TRANSFER_PKT_OFFSET_CMD 0x1
#define FU_STRUCT_ALGOLTEK_CMD_TRANSFER_PKT_OFFSET_ADDRESS 0x2
#define FU_STRUCT_ALGOLTEK_CMD_TRANSFER_PKT_OFFSET_DATA 0x4
#define FU_STRUCT_ALGOLTEK_CMD_TRANSFER_PKT_OFFSET_CHECKSUM 0x41
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_ALGOLTEK_CMD_TRANSFER_PKT_SIZE_DATA 0x3D
#define FU_STRUCT_ALGOLTEK_CMD_TRANSFER_PKT_N_ELEMENTS_DATA 61
#define FU_STRUCT_ALGOLTEK_CMD_TRANSFER_PKT_SIZE 0x42
#endif

#ifndef __GI_SCANNER__
#endif
