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

#pragma once
#include <fu-input-stream.h>
/**
 * FuDellKestrelHidCmd:
 */
typedef enum {
    /**
     * FU_DELL_KESTREL_HID_CMD_WRITE_DATA:
     */
    FU_DELL_KESTREL_HID_CMD_WRITE_DATA = 0x40,
    /**
     * FU_DELL_KESTREL_HID_CMD_EXT_I2C_WRITE:
     */
    FU_DELL_KESTREL_HID_CMD_EXT_I2C_WRITE = 0xc6,
    /**
     * FU_DELL_KESTREL_HID_CMD_EXT_I2C_READ:
     */
    FU_DELL_KESTREL_HID_CMD_EXT_I2C_READ = 0xd6,
}  FuDellKestrelHidCmd;
/**
 * FuDellKestrelHidEcChunkResponse:
 */
typedef enum {
    /**
     * FU_DELL_KESTREL_HID_EC_CHUNK_RESPONSE_UNKNOWN:
     */
    FU_DELL_KESTREL_HID_EC_CHUNK_RESPONSE_UNKNOWN = 0,
    /**
     * FU_DELL_KESTREL_HID_EC_CHUNK_RESPONSE_UPDATE_COMPLETE:
     */
    FU_DELL_KESTREL_HID_EC_CHUNK_RESPONSE_UPDATE_COMPLETE,
    /**
     * FU_DELL_KESTREL_HID_EC_CHUNK_RESPONSE_SEND_NEXT_CHUNK:
     */
    FU_DELL_KESTREL_HID_EC_CHUNK_RESPONSE_SEND_NEXT_CHUNK,
    /**
     * FU_DELL_KESTREL_HID_EC_CHUNK_RESPONSE_UPDATE_FAILED:
     */
    FU_DELL_KESTREL_HID_EC_CHUNK_RESPONSE_UPDATE_FAILED,
}  FuDellKestrelHidEcChunkResponse;
const gchar *fu_dell_kestrel_hid_ec_chunk_response_to_string(FuDellKestrelHidEcChunkResponse val) G_GNUC_CONST;
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructDellKestrelHidCmdBuffer;

FuStructDellKestrelHidCmdBuffer *fu_struct_dell_kestrel_hid_cmd_buffer_ref(FuStructDellKestrelHidCmdBuffer *st) G_GNUC_NON_NULL(1);
void fu_struct_dell_kestrel_hid_cmd_buffer_unref(FuStructDellKestrelHidCmdBuffer *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructDellKestrelHidCmdBuffer, fu_struct_dell_kestrel_hid_cmd_buffer_unref)
FuStructDellKestrelHidCmdBuffer *fu_struct_dell_kestrel_hid_cmd_buffer_new(void) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_dell_kestrel_hid_cmd_buffer_get_cmd(const FuStructDellKestrelHidCmdBuffer *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_dell_kestrel_hid_cmd_buffer_get_ext(const FuStructDellKestrelHidCmdBuffer *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_dell_kestrel_hid_cmd_buffer_get_dwregaddr(const FuStructDellKestrelHidCmdBuffer *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_dell_kestrel_hid_cmd_buffer_get_bufferlen(const FuStructDellKestrelHidCmdBuffer *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
const guint8 *fu_struct_dell_kestrel_hid_cmd_buffer_get_parameters(const FuStructDellKestrelHidCmdBuffer *st, gsize *bufsz) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
const guint8 *fu_struct_dell_kestrel_hid_cmd_buffer_get_extended_cmdarea(const FuStructDellKestrelHidCmdBuffer *st, gsize *bufsz) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
const guint8 *fu_struct_dell_kestrel_hid_cmd_buffer_get_databytes(const FuStructDellKestrelHidCmdBuffer *st, gsize *bufsz) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_dell_kestrel_hid_cmd_buffer_set_cmd(FuStructDellKestrelHidCmdBuffer *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_struct_dell_kestrel_hid_cmd_buffer_set_ext(FuStructDellKestrelHidCmdBuffer *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_struct_dell_kestrel_hid_cmd_buffer_set_dwregaddr(FuStructDellKestrelHidCmdBuffer *st, guint32 value) G_GNUC_NON_NULL(1);
void fu_struct_dell_kestrel_hid_cmd_buffer_set_bufferlen(FuStructDellKestrelHidCmdBuffer *st, guint16 value) G_GNUC_NON_NULL(1);
gboolean fu_struct_dell_kestrel_hid_cmd_buffer_set_parameters(FuStructDellKestrelHidCmdBuffer *st, const guint8 *buf, gsize bufsz, GError **error) G_GNUC_NON_NULL(1, 2) G_GNUC_WARN_UNUSED_RESULT;
gboolean fu_struct_dell_kestrel_hid_cmd_buffer_set_extended_cmdarea(FuStructDellKestrelHidCmdBuffer *st, const guint8 *buf, gsize bufsz, GError **error) G_GNUC_NON_NULL(1, 2) G_GNUC_WARN_UNUSED_RESULT;
gboolean fu_struct_dell_kestrel_hid_cmd_buffer_set_databytes(FuStructDellKestrelHidCmdBuffer *st, const guint8 *buf, gsize bufsz, GError **error) G_GNUC_NON_NULL(1, 2) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_DELL_KESTREL_HID_CMD_BUFFER_OFFSET_CMD 0x0
#define FU_STRUCT_DELL_KESTREL_HID_CMD_BUFFER_OFFSET_EXT 0x1
#define FU_STRUCT_DELL_KESTREL_HID_CMD_BUFFER_OFFSET_DWREGADDR 0x2
#define FU_STRUCT_DELL_KESTREL_HID_CMD_BUFFER_OFFSET_BUFFERLEN 0x6
#define FU_STRUCT_DELL_KESTREL_HID_CMD_BUFFER_OFFSET_PARAMETERS 0x8
#define FU_STRUCT_DELL_KESTREL_HID_CMD_BUFFER_OFFSET_EXTENDED_CMDAREA 0xB
#define FU_STRUCT_DELL_KESTREL_HID_CMD_BUFFER_OFFSET_DATABYTES 0x40
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_DELL_KESTREL_HID_CMD_BUFFER_SIZE_PARAMETERS 0x3
#define FU_STRUCT_DELL_KESTREL_HID_CMD_BUFFER_N_ELEMENTS_PARAMETERS 3
#define FU_STRUCT_DELL_KESTREL_HID_CMD_BUFFER_SIZE_EXTENDED_CMDAREA 0x35
#define FU_STRUCT_DELL_KESTREL_HID_CMD_BUFFER_N_ELEMENTS_EXTENDED_CMDAREA 53
#define FU_STRUCT_DELL_KESTREL_HID_CMD_BUFFER_SIZE_DATABYTES 0x80
#define FU_STRUCT_DELL_KESTREL_HID_CMD_BUFFER_N_ELEMENTS_DATABYTES 128
#define FU_STRUCT_DELL_KESTREL_HID_CMD_BUFFER_SIZE 0xC0
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_DELL_KESTREL_HID_CMD_BUFFER_DEFAULT_PARAMETERS "\xEC\x01\x80"
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructDellKestrelHidFwUpdatePkg;

FuStructDellKestrelHidFwUpdatePkg *fu_struct_dell_kestrel_hid_fw_update_pkg_ref(FuStructDellKestrelHidFwUpdatePkg *st) G_GNUC_NON_NULL(1);
void fu_struct_dell_kestrel_hid_fw_update_pkg_unref(FuStructDellKestrelHidFwUpdatePkg *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructDellKestrelHidFwUpdatePkg, fu_struct_dell_kestrel_hid_fw_update_pkg_unref)
FuStructDellKestrelHidFwUpdatePkg *fu_struct_dell_kestrel_hid_fw_update_pkg_new(void) G_GNUC_WARN_UNUSED_RESULT;
GBytes *fu_struct_dell_kestrel_hid_fw_update_pkg_to_bytes(const FuStructDellKestrelHidFwUpdatePkg *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_dell_kestrel_hid_fw_update_pkg_set_cmd(FuStructDellKestrelHidFwUpdatePkg *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_struct_dell_kestrel_hid_fw_update_pkg_set_ext(FuStructDellKestrelHidFwUpdatePkg *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_struct_dell_kestrel_hid_fw_update_pkg_set_chunk_sz(FuStructDellKestrelHidFwUpdatePkg *st, guint32 value) G_GNUC_NON_NULL(1);
void fu_struct_dell_kestrel_hid_fw_update_pkg_set_sub_cmd(FuStructDellKestrelHidFwUpdatePkg *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_struct_dell_kestrel_hid_fw_update_pkg_set_dev_type(FuStructDellKestrelHidFwUpdatePkg *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_struct_dell_kestrel_hid_fw_update_pkg_set_dev_identifier(FuStructDellKestrelHidFwUpdatePkg *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_struct_dell_kestrel_hid_fw_update_pkg_set_fw_sz(FuStructDellKestrelHidFwUpdatePkg *st, guint32 value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_DELL_KESTREL_HID_FW_UPDATE_PKG_OFFSET_CMD 0x0
#define FU_STRUCT_DELL_KESTREL_HID_FW_UPDATE_PKG_OFFSET_EXT 0x1
#define FU_STRUCT_DELL_KESTREL_HID_FW_UPDATE_PKG_OFFSET_CHUNK_SZ 0x2
#define FU_STRUCT_DELL_KESTREL_HID_FW_UPDATE_PKG_OFFSET_SUB_CMD 0x6
#define FU_STRUCT_DELL_KESTREL_HID_FW_UPDATE_PKG_OFFSET_DEV_TYPE 0x7
#define FU_STRUCT_DELL_KESTREL_HID_FW_UPDATE_PKG_OFFSET_DEV_IDENTIFIER 0x8
#define FU_STRUCT_DELL_KESTREL_HID_FW_UPDATE_PKG_OFFSET_FW_SZ 0x9
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_DELL_KESTREL_HID_FW_UPDATE_PKG_SIZE 0xD
#endif

#ifndef __GI_SCANNER__
#endif
