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

#pragma once
#include <fu-input-stream.h>
/**
 * FuWistronDockStatusCode:
 */
typedef enum {
    /**
     * FU_WISTRON_DOCK_STATUS_CODE_ENTER:
     */
    FU_WISTRON_DOCK_STATUS_CODE_ENTER = 0x1,
    /**
     * FU_WISTRON_DOCK_STATUS_CODE_PREPARE:
     */
    FU_WISTRON_DOCK_STATUS_CODE_PREPARE = 0x2,
    /**
     * FU_WISTRON_DOCK_STATUS_CODE_UPDATING:
     */
    FU_WISTRON_DOCK_STATUS_CODE_UPDATING = 0x3,
    /**
     * FU_WISTRON_DOCK_STATUS_CODE_COMPLETE:
     *
     * unplug cable to trigger update
     */
    FU_WISTRON_DOCK_STATUS_CODE_COMPLETE = 0x4,
}  FuWistronDockStatusCode;
const gchar *fu_wistron_dock_status_code_to_string(FuWistronDockStatusCode val) G_GNUC_CONST;
/**
 * FuWistronDockComponentIdx:
 */
typedef enum {
    /**
     * FU_WISTRON_DOCK_COMPONENT_IDX_MCU:
     */
    FU_WISTRON_DOCK_COMPONENT_IDX_MCU = 0x0,
    /**
     * FU_WISTRON_DOCK_COMPONENT_IDX_PD:
     */
    FU_WISTRON_DOCK_COMPONENT_IDX_PD = 0x1,
    /**
     * FU_WISTRON_DOCK_COMPONENT_IDX_AUDIO:
     */
    FU_WISTRON_DOCK_COMPONENT_IDX_AUDIO = 0x2,
    /**
     * FU_WISTRON_DOCK_COMPONENT_IDX_USB:
     */
    FU_WISTRON_DOCK_COMPONENT_IDX_USB = 0x3,
    /**
     * FU_WISTRON_DOCK_COMPONENT_IDX_MST:
     */
    FU_WISTRON_DOCK_COMPONENT_IDX_MST = 0x4,
    /**
     * FU_WISTRON_DOCK_COMPONENT_IDX_SPI:
     */
    FU_WISTRON_DOCK_COMPONENT_IDX_SPI = 0xA,
    /**
     * FU_WISTRON_DOCK_COMPONENT_IDX_DOCK:
     */
    FU_WISTRON_DOCK_COMPONENT_IDX_DOCK = 0xF,
}  FuWistronDockComponentIdx;
const gchar *fu_wistron_dock_component_idx_to_string(FuWistronDockComponentIdx val) G_GNUC_CONST;
/**
 * FuWistronDockUpdatePhase:
 */
typedef enum {
    /**
     * FU_WISTRON_DOCK_UPDATE_PHASE_DOWNLOAD:
     */
    FU_WISTRON_DOCK_UPDATE_PHASE_DOWNLOAD = 0x1,
    /**
     * FU_WISTRON_DOCK_UPDATE_PHASE_DEPLOY:
     */
    FU_WISTRON_DOCK_UPDATE_PHASE_DEPLOY = 0x2,
}  FuWistronDockUpdatePhase;
const gchar *fu_wistron_dock_update_phase_to_string(FuWistronDockUpdatePhase val) G_GNUC_CONST;
/**
 * FuWistronDockCmdIcp:
 */
typedef enum {
    /**
     * FU_WISTRON_DOCK_CMD_ICP_ENTER:
     */
    FU_WISTRON_DOCK_CMD_ICP_ENTER = 0x81,
    /**
     * FU_WISTRON_DOCK_CMD_ICP_EXIT:
     */
    FU_WISTRON_DOCK_CMD_ICP_EXIT = 0x82,
    /**
     * FU_WISTRON_DOCK_CMD_ICP_ADDRESS:
     */
    FU_WISTRON_DOCK_CMD_ICP_ADDRESS = 0x84,
    /**
     * FU_WISTRON_DOCK_CMD_ICP_READBLOCK:
     */
    FU_WISTRON_DOCK_CMD_ICP_READBLOCK = 0x85,
    /**
     * FU_WISTRON_DOCK_CMD_ICP_WRITEBLOCK:
     */
    FU_WISTRON_DOCK_CMD_ICP_WRITEBLOCK = 0x86,
    /**
     * FU_WISTRON_DOCK_CMD_ICP_MCUID:
     */
    FU_WISTRON_DOCK_CMD_ICP_MCUID = 0x87,
    /**
     * FU_WISTRON_DOCK_CMD_ICP_BBINFO:
     *
     * bb code information
     */
    FU_WISTRON_DOCK_CMD_ICP_BBINFO = 0x88,
    /**
     * FU_WISTRON_DOCK_CMD_ICP_USERINFO:
     *
     * user code information
     */
    FU_WISTRON_DOCK_CMD_ICP_USERINFO = 0x89,
    /**
     * FU_WISTRON_DOCK_CMD_ICP_DONE:
     */
    FU_WISTRON_DOCK_CMD_ICP_DONE = 0x5A,
    /**
     * FU_WISTRON_DOCK_CMD_ICP_ERROR:
     */
    FU_WISTRON_DOCK_CMD_ICP_ERROR = 0xFF,
    /**
     * FU_WISTRON_DOCK_CMD_ICP_EXIT_WDRESET:
     *
     * exit ICP with watch dog reset
     */
    FU_WISTRON_DOCK_CMD_ICP_EXIT_WDRESET = 0x01,
}  FuWistronDockCmdIcp;
/**
 * FuWistronDockCmdDfu:
 */
typedef enum {
    /**
     * FU_WISTRON_DOCK_CMD_DFU_ENTER:
     */
    FU_WISTRON_DOCK_CMD_DFU_ENTER = 0x91,
    /**
     * FU_WISTRON_DOCK_CMD_DFU_EXIT:
     */
    FU_WISTRON_DOCK_CMD_DFU_EXIT = 0x92,
    /**
     * FU_WISTRON_DOCK_CMD_DFU_ADDRESS:
     */
    FU_WISTRON_DOCK_CMD_DFU_ADDRESS = 0x93,
    /**
     * FU_WISTRON_DOCK_CMD_DFU_READIMG_BLOCK:
     */
    FU_WISTRON_DOCK_CMD_DFU_READIMG_BLOCK = 0x94,
    /**
     * FU_WISTRON_DOCK_CMD_DFU_WRITEIMG_BLOCK:
     */
    FU_WISTRON_DOCK_CMD_DFU_WRITEIMG_BLOCK = 0x95,
    /**
     * FU_WISTRON_DOCK_CMD_DFU_VERIFY:
     */
    FU_WISTRON_DOCK_CMD_DFU_VERIFY = 0x96,
    /**
     * FU_WISTRON_DOCK_CMD_DFU_COMPOSITE_VER:
     */
    FU_WISTRON_DOCK_CMD_DFU_COMPOSITE_VER = 0x97,
    /**
     * FU_WISTRON_DOCK_CMD_DFU_WRITE_WDFL_SIG:
     */
    FU_WISTRON_DOCK_CMD_DFU_WRITE_WDFL_SIG = 0x98,
    /**
     * FU_WISTRON_DOCK_CMD_DFU_WRITE_WDFL_DATA:
     */
    FU_WISTRON_DOCK_CMD_DFU_WRITE_WDFL_DATA = 0x99,
    /**
     * FU_WISTRON_DOCK_CMD_DFU_VERIFY_WDFL:
     */
    FU_WISTRON_DOCK_CMD_DFU_VERIFY_WDFL = 0x9A,
    /**
     * FU_WISTRON_DOCK_CMD_DFU_SERINAL_NUMBER:
     */
    FU_WISTRON_DOCK_CMD_DFU_SERINAL_NUMBER = 0x9B,
    /**
     * FU_WISTRON_DOCK_CMD_DFU_DONE:
     */
    FU_WISTRON_DOCK_CMD_DFU_DONE = 0x5A,
    /**
     * FU_WISTRON_DOCK_CMD_DFU_ERROR:
     */
    FU_WISTRON_DOCK_CMD_DFU_ERROR = 0xFF,
}  FuWistronDockCmdDfu;
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructWistronDockWdit;

FuStructWistronDockWdit *fu_struct_wistron_dock_wdit_ref(FuStructWistronDockWdit *st) G_GNUC_NON_NULL(1);
void fu_struct_wistron_dock_wdit_unref(FuStructWistronDockWdit *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructWistronDockWdit, fu_struct_wistron_dock_wdit_unref)
FuStructWistronDockWdit *fu_struct_wistron_dock_wdit_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_wistron_dock_wdit_get_hid_id(const FuStructWistronDockWdit *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_wistron_dock_wdit_get_tag_id(const FuStructWistronDockWdit *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_wistron_dock_wdit_get_vid(const FuStructWistronDockWdit *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_wistron_dock_wdit_get_pid(const FuStructWistronDockWdit *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_wistron_dock_wdit_get_imgmode(const FuStructWistronDockWdit *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_wistron_dock_wdit_get_update_state(const FuStructWistronDockWdit *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
FuWistronDockStatusCode fu_struct_wistron_dock_wdit_get_status_code(const FuStructWistronDockWdit *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_wistron_dock_wdit_get_composite_version(const FuStructWistronDockWdit *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_wistron_dock_wdit_get_device_cnt(const FuStructWistronDockWdit *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_WISTRON_DOCK_WDIT_OFFSET_HID_ID 0x0
#define FU_STRUCT_WISTRON_DOCK_WDIT_OFFSET_TAG_ID 0x1
#define FU_STRUCT_WISTRON_DOCK_WDIT_OFFSET_VID 0x3
#define FU_STRUCT_WISTRON_DOCK_WDIT_OFFSET_PID 0x5
#define FU_STRUCT_WISTRON_DOCK_WDIT_OFFSET_IMGMODE 0x7
#define FU_STRUCT_WISTRON_DOCK_WDIT_OFFSET_UPDATE_STATE 0x8
#define FU_STRUCT_WISTRON_DOCK_WDIT_OFFSET_STATUS_CODE 0x9
#define FU_STRUCT_WISTRON_DOCK_WDIT_OFFSET_COMPOSITE_VERSION 0xA
#define FU_STRUCT_WISTRON_DOCK_WDIT_OFFSET_DEVICE_CNT 0xE
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_WISTRON_DOCK_WDIT_SIZE 0x10
#endif

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

FuStructWistronDockWditImg *fu_struct_wistron_dock_wdit_img_ref(FuStructWistronDockWditImg *st) G_GNUC_NON_NULL(1);
void fu_struct_wistron_dock_wdit_img_unref(FuStructWistronDockWditImg *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructWistronDockWditImg, fu_struct_wistron_dock_wdit_img_unref)
FuStructWistronDockWditImg *fu_struct_wistron_dock_wdit_img_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
FuWistronDockComponentIdx fu_struct_wistron_dock_wdit_img_get_comp_id(const FuStructWistronDockWditImg *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_wistron_dock_wdit_img_get_mode(const FuStructWistronDockWditImg *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_wistron_dock_wdit_img_get_status(const FuStructWistronDockWditImg *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_wistron_dock_wdit_img_get_version_build(const FuStructWistronDockWditImg *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_wistron_dock_wdit_img_get_version1(const FuStructWistronDockWditImg *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_wistron_dock_wdit_img_get_version2(const FuStructWistronDockWditImg *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
gchar *fu_struct_wistron_dock_wdit_img_get_name(const FuStructWistronDockWditImg *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_WISTRON_DOCK_WDIT_IMG_OFFSET_COMP_ID 0x0
#define FU_STRUCT_WISTRON_DOCK_WDIT_IMG_OFFSET_MODE 0x1
#define FU_STRUCT_WISTRON_DOCK_WDIT_IMG_OFFSET_STATUS 0x2
#define FU_STRUCT_WISTRON_DOCK_WDIT_IMG_OFFSET_VERSION_BUILD 0x4
#define FU_STRUCT_WISTRON_DOCK_WDIT_IMG_OFFSET_VERSION1 0x8
#define FU_STRUCT_WISTRON_DOCK_WDIT_IMG_OFFSET_VERSION2 0xC
#define FU_STRUCT_WISTRON_DOCK_WDIT_IMG_OFFSET_NAME 0x10
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_WISTRON_DOCK_WDIT_IMG_SIZE_NAME 0x20
#define FU_STRUCT_WISTRON_DOCK_WDIT_IMG_N_ELEMENTS_NAME 32
#define FU_STRUCT_WISTRON_DOCK_WDIT_IMG_SIZE 0x30
#endif

#ifndef __GI_SCANNER__
#endif
