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

#pragma once
#include <fu-input-stream.h>
/**
 * FuQcFirehoseFunctions:
 */
typedef enum {
    /**
     * FU_QC_FIREHOSE_FUNCTIONS_NONE:
     */
    FU_QC_FIREHOSE_FUNCTIONS_NONE = 0,
    /**
     * FU_QC_FIREHOSE_FUNCTIONS_PROGRAM:
     */
    FU_QC_FIREHOSE_FUNCTIONS_PROGRAM = 1 << 0,
    /**
     * FU_QC_FIREHOSE_FUNCTIONS_CONFIGURE:
     */
    FU_QC_FIREHOSE_FUNCTIONS_CONFIGURE = 1 << 1,
    /**
     * FU_QC_FIREHOSE_FUNCTIONS_POWER:
     */
    FU_QC_FIREHOSE_FUNCTIONS_POWER = 1 << 2,
    /**
     * FU_QC_FIREHOSE_FUNCTIONS_READ:
     */
    FU_QC_FIREHOSE_FUNCTIONS_READ = 1 << 3,
    /**
     * FU_QC_FIREHOSE_FUNCTIONS_GETSTORAGEINFO:
     */
    FU_QC_FIREHOSE_FUNCTIONS_GETSTORAGEINFO = 1 << 4,
    /**
     * FU_QC_FIREHOSE_FUNCTIONS_ERASE:
     */
    FU_QC_FIREHOSE_FUNCTIONS_ERASE = 1 << 5,
    /**
     * FU_QC_FIREHOSE_FUNCTIONS_NOP:
     */
    FU_QC_FIREHOSE_FUNCTIONS_NOP = 1 << 6,
    /**
     * FU_QC_FIREHOSE_FUNCTIONS_SETBOOTABLESTORAGEDRIVE:
     */
    FU_QC_FIREHOSE_FUNCTIONS_SETBOOTABLESTORAGEDRIVE = 1 << 7,
    /**
     * FU_QC_FIREHOSE_FUNCTIONS_PATCH:
     */
    FU_QC_FIREHOSE_FUNCTIONS_PATCH = 1 << 8,
    /**
     * FU_QC_FIREHOSE_FUNCTIONS_UFS:
     */
    FU_QC_FIREHOSE_FUNCTIONS_UFS = 1 << 9,
    /**
     * FU_QC_FIREHOSE_FUNCTIONS_EMMC:
     */
    FU_QC_FIREHOSE_FUNCTIONS_EMMC = 1 << 10,
    /**
     * FU_QC_FIREHOSE_FUNCTIONS_XML:
     */
    FU_QC_FIREHOSE_FUNCTIONS_XML = 1 << 11,
    /**
     * FU_QC_FIREHOSE_FUNCTIONS_PEEK:
     */
    FU_QC_FIREHOSE_FUNCTIONS_PEEK = 1 << 12,
    /**
     * FU_QC_FIREHOSE_FUNCTIONS_POKE:
     */
    FU_QC_FIREHOSE_FUNCTIONS_POKE = 1 << 13,
    /**
     * FU_QC_FIREHOSE_FUNCTIONS_FIRMWAREWRITE:
     */
    FU_QC_FIREHOSE_FUNCTIONS_FIRMWAREWRITE = 1 << 14,
    /**
     * FU_QC_FIREHOSE_FUNCTIONS_BENCHMARK:
     */
    FU_QC_FIREHOSE_FUNCTIONS_BENCHMARK = 1 << 15,
    /**
     * FU_QC_FIREHOSE_FUNCTIONS_GETCRC16DIGEST:
     */
    FU_QC_FIREHOSE_FUNCTIONS_GETCRC16DIGEST = 1 << 16,
    /**
     * FU_QC_FIREHOSE_FUNCTIONS_GETSHA256DIGEST:
     */
    FU_QC_FIREHOSE_FUNCTIONS_GETSHA256DIGEST = 1 << 17,
} G_GNUC_FLAG_ENUM FuQcFirehoseFunctions;
gchar *fu_qc_firehose_functions_to_string(FuQcFirehoseFunctions val) G_GNUC_CONST;
FuQcFirehoseFunctions fu_qc_firehose_functions_from_string(const gchar *val) G_GNUC_CONST G_GNUC_NON_NULL(1);
/**
 * FuQcFirehoseSaharaCommandId:
 */
typedef enum {
    /**
     * FU_QC_FIREHOSE_SAHARA_COMMAND_ID_NO_CMD:
     */
    FU_QC_FIREHOSE_SAHARA_COMMAND_ID_NO_CMD,
    /**
     * FU_QC_FIREHOSE_SAHARA_COMMAND_ID_HELLO:
     */
    FU_QC_FIREHOSE_SAHARA_COMMAND_ID_HELLO,
    /**
     * FU_QC_FIREHOSE_SAHARA_COMMAND_ID_HELLO_RESPONSE:
     */
    FU_QC_FIREHOSE_SAHARA_COMMAND_ID_HELLO_RESPONSE,
    /**
     * FU_QC_FIREHOSE_SAHARA_COMMAND_ID_READ:
     */
    FU_QC_FIREHOSE_SAHARA_COMMAND_ID_READ,
    /**
     * FU_QC_FIREHOSE_SAHARA_COMMAND_ID_END_OF_IMAGE:
     */
    FU_QC_FIREHOSE_SAHARA_COMMAND_ID_END_OF_IMAGE,
    /**
     * FU_QC_FIREHOSE_SAHARA_COMMAND_ID_DONE:
     */
    FU_QC_FIREHOSE_SAHARA_COMMAND_ID_DONE,
    /**
     * FU_QC_FIREHOSE_SAHARA_COMMAND_ID_DONE_RESPONSE:
     */
    FU_QC_FIREHOSE_SAHARA_COMMAND_ID_DONE_RESPONSE,
    /**
     * FU_QC_FIREHOSE_SAHARA_COMMAND_ID_RESET:
     */
    FU_QC_FIREHOSE_SAHARA_COMMAND_ID_RESET,
    /**
     * FU_QC_FIREHOSE_SAHARA_COMMAND_ID_RESET_RESPONSE:
     */
    FU_QC_FIREHOSE_SAHARA_COMMAND_ID_RESET_RESPONSE,
    /**
     * FU_QC_FIREHOSE_SAHARA_COMMAND_ID_READ64:
     */
    FU_QC_FIREHOSE_SAHARA_COMMAND_ID_READ64 = 0x12,
}  FuQcFirehoseSaharaCommandId;
const gchar *fu_qc_firehose_sahara_command_id_to_string(FuQcFirehoseSaharaCommandId val) G_GNUC_CONST;
/**
 * FuQcFirehoseSaharaStatus:
 */
typedef enum {
    /**
     * FU_QC_FIREHOSE_SAHARA_STATUS_SUCCESS:
     */
    FU_QC_FIREHOSE_SAHARA_STATUS_SUCCESS,
    /**
     * FU_QC_FIREHOSE_SAHARA_STATUS_FAILED:
     */
    FU_QC_FIREHOSE_SAHARA_STATUS_FAILED,
}  FuQcFirehoseSaharaStatus;
#define FU_QC_FIREHOSE_SAHARA_STATUS_LAST 2
const gchar *fu_qc_firehose_sahara_status_to_string(FuQcFirehoseSaharaStatus val) G_GNUC_CONST;
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuQcFirehoseSaharaPkt;

FuQcFirehoseSaharaPkt *fu_qc_firehose_sahara_pkt_ref(FuQcFirehoseSaharaPkt *st) G_GNUC_NON_NULL(1);
void fu_qc_firehose_sahara_pkt_unref(FuQcFirehoseSaharaPkt *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuQcFirehoseSaharaPkt, fu_qc_firehose_sahara_pkt_unref)
FuQcFirehoseSaharaPkt *fu_qc_firehose_sahara_pkt_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
FuQcFirehoseSaharaCommandId fu_qc_firehose_sahara_pkt_get_command_id(const FuQcFirehoseSaharaPkt *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_qc_firehose_sahara_pkt_get_hdr_length(const FuQcFirehoseSaharaPkt *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_QC_FIREHOSE_SAHARA_PKT_OFFSET_COMMAND_ID 0x0
#define FU_QC_FIREHOSE_SAHARA_PKT_OFFSET_HDR_LENGTH 0x4
#endif

#ifndef __GI_SCANNER__
#define FU_QC_FIREHOSE_SAHARA_PKT_SIZE 0x8
#endif

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

FuQcFirehoseSaharaPktHello *fu_qc_firehose_sahara_pkt_hello_ref(FuQcFirehoseSaharaPktHello *st) G_GNUC_NON_NULL(1);
void fu_qc_firehose_sahara_pkt_hello_unref(FuQcFirehoseSaharaPktHello *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuQcFirehoseSaharaPktHello, fu_qc_firehose_sahara_pkt_hello_unref)
FuQcFirehoseSaharaPktHello *fu_qc_firehose_sahara_pkt_hello_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_qc_firehose_sahara_pkt_hello_get_mode(const FuQcFirehoseSaharaPktHello *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_QC_FIREHOSE_SAHARA_PKT_HELLO_OFFSET_COMMAND_ID 0x0
#define FU_QC_FIREHOSE_SAHARA_PKT_HELLO_OFFSET_MODE 0x14
#endif

#ifndef __GI_SCANNER__
#define FU_QC_FIREHOSE_SAHARA_PKT_HELLO_SIZE 0x18
#endif

#ifndef __GI_SCANNER__
#define FU_QC_FIREHOSE_SAHARA_PKT_HELLO_DEFAULT_COMMAND_ID FU_QC_FIREHOSE_SAHARA_COMMAND_ID_HELLO
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuQcFirehoseSaharaPktHelloResp;

FuQcFirehoseSaharaPktHelloResp *fu_qc_firehose_sahara_pkt_hello_resp_ref(FuQcFirehoseSaharaPktHelloResp *st) G_GNUC_NON_NULL(1);
void fu_qc_firehose_sahara_pkt_hello_resp_unref(FuQcFirehoseSaharaPktHelloResp *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuQcFirehoseSaharaPktHelloResp, fu_qc_firehose_sahara_pkt_hello_resp_unref)
FuQcFirehoseSaharaPktHelloResp *fu_qc_firehose_sahara_pkt_hello_resp_new(void) G_GNUC_WARN_UNUSED_RESULT;
void fu_qc_firehose_sahara_pkt_hello_resp_set_mode(FuQcFirehoseSaharaPktHelloResp *st, guint32 value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_QC_FIREHOSE_SAHARA_PKT_HELLO_RESP_OFFSET_COMMAND_ID 0x0
#define FU_QC_FIREHOSE_SAHARA_PKT_HELLO_RESP_OFFSET_HDR_LENGTH 0x4
#define FU_QC_FIREHOSE_SAHARA_PKT_HELLO_RESP_OFFSET_VERSION 0x8
#define FU_QC_FIREHOSE_SAHARA_PKT_HELLO_RESP_OFFSET_COMPATIBLE 0xC
#define FU_QC_FIREHOSE_SAHARA_PKT_HELLO_RESP_OFFSET_STATUS 0x10
#define FU_QC_FIREHOSE_SAHARA_PKT_HELLO_RESP_OFFSET_MODE 0x14
#endif

#ifndef __GI_SCANNER__
#define FU_QC_FIREHOSE_SAHARA_PKT_HELLO_RESP_SIZE 0x30
#endif

#ifndef __GI_SCANNER__
#define FU_QC_FIREHOSE_SAHARA_PKT_HELLO_RESP_DEFAULT_COMMAND_ID FU_QC_FIREHOSE_SAHARA_COMMAND_ID_HELLO_RESPONSE
#define FU_QC_FIREHOSE_SAHARA_PKT_HELLO_RESP_DEFAULT_HDR_LENGTH 48
#define FU_QC_FIREHOSE_SAHARA_PKT_HELLO_RESP_DEFAULT_VERSION 2
#define FU_QC_FIREHOSE_SAHARA_PKT_HELLO_RESP_DEFAULT_COMPATIBLE 1
#define FU_QC_FIREHOSE_SAHARA_PKT_HELLO_RESP_DEFAULT_STATUS FU_QC_FIREHOSE_SAHARA_STATUS_SUCCESS
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuQcFirehoseSaharaPktRead;

FuQcFirehoseSaharaPktRead *fu_qc_firehose_sahara_pkt_read_ref(FuQcFirehoseSaharaPktRead *st) G_GNUC_NON_NULL(1);
void fu_qc_firehose_sahara_pkt_read_unref(FuQcFirehoseSaharaPktRead *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuQcFirehoseSaharaPktRead, fu_qc_firehose_sahara_pkt_read_unref)
FuQcFirehoseSaharaPktRead *fu_qc_firehose_sahara_pkt_read_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_qc_firehose_sahara_pkt_read_get_offset(const FuQcFirehoseSaharaPktRead *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_qc_firehose_sahara_pkt_read_get_length(const FuQcFirehoseSaharaPktRead *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_QC_FIREHOSE_SAHARA_PKT_READ_OFFSET_COMMAND_ID 0x0
#define FU_QC_FIREHOSE_SAHARA_PKT_READ_OFFSET_HDR_LENGTH 0x4
#define FU_QC_FIREHOSE_SAHARA_PKT_READ_OFFSET_OFFSET 0xC
#define FU_QC_FIREHOSE_SAHARA_PKT_READ_OFFSET_LENGTH 0x10
#endif

#ifndef __GI_SCANNER__
#define FU_QC_FIREHOSE_SAHARA_PKT_READ_SIZE 0x14
#endif

#ifndef __GI_SCANNER__
#define FU_QC_FIREHOSE_SAHARA_PKT_READ_DEFAULT_COMMAND_ID FU_QC_FIREHOSE_SAHARA_COMMAND_ID_READ
#define FU_QC_FIREHOSE_SAHARA_PKT_READ_DEFAULT_HDR_LENGTH 20
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuQcFirehoseSaharaPktRead64;

FuQcFirehoseSaharaPktRead64 *fu_qc_firehose_sahara_pkt_read64_ref(FuQcFirehoseSaharaPktRead64 *st) G_GNUC_NON_NULL(1);
void fu_qc_firehose_sahara_pkt_read64_unref(FuQcFirehoseSaharaPktRead64 *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuQcFirehoseSaharaPktRead64, fu_qc_firehose_sahara_pkt_read64_unref)
FuQcFirehoseSaharaPktRead64 *fu_qc_firehose_sahara_pkt_read64_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint64 fu_qc_firehose_sahara_pkt_read64_get_offset(const FuQcFirehoseSaharaPktRead64 *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint64 fu_qc_firehose_sahara_pkt_read64_get_length(const FuQcFirehoseSaharaPktRead64 *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_QC_FIREHOSE_SAHARA_PKT_READ64_OFFSET_COMMAND_ID 0x0
#define FU_QC_FIREHOSE_SAHARA_PKT_READ64_OFFSET_HDR_LENGTH 0x4
#define FU_QC_FIREHOSE_SAHARA_PKT_READ64_OFFSET_OFFSET 0x10
#define FU_QC_FIREHOSE_SAHARA_PKT_READ64_OFFSET_LENGTH 0x18
#endif

#ifndef __GI_SCANNER__
#define FU_QC_FIREHOSE_SAHARA_PKT_READ64_SIZE 0x20
#endif

#ifndef __GI_SCANNER__
#define FU_QC_FIREHOSE_SAHARA_PKT_READ64_DEFAULT_COMMAND_ID FU_QC_FIREHOSE_SAHARA_COMMAND_ID_READ64
#define FU_QC_FIREHOSE_SAHARA_PKT_READ64_DEFAULT_HDR_LENGTH 32
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuQcFirehoseSaharaPktEndOfImage;

FuQcFirehoseSaharaPktEndOfImage *fu_qc_firehose_sahara_pkt_end_of_image_ref(FuQcFirehoseSaharaPktEndOfImage *st) G_GNUC_NON_NULL(1);
void fu_qc_firehose_sahara_pkt_end_of_image_unref(FuQcFirehoseSaharaPktEndOfImage *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuQcFirehoseSaharaPktEndOfImage, fu_qc_firehose_sahara_pkt_end_of_image_unref)
FuQcFirehoseSaharaPktEndOfImage *fu_qc_firehose_sahara_pkt_end_of_image_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
FuQcFirehoseSaharaStatus fu_qc_firehose_sahara_pkt_end_of_image_get_status(const FuQcFirehoseSaharaPktEndOfImage *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_QC_FIREHOSE_SAHARA_PKT_END_OF_IMAGE_OFFSET_COMMAND_ID 0x0
#define FU_QC_FIREHOSE_SAHARA_PKT_END_OF_IMAGE_OFFSET_HDR_LENGTH 0x4
#define FU_QC_FIREHOSE_SAHARA_PKT_END_OF_IMAGE_OFFSET_STATUS 0xC
#endif

#ifndef __GI_SCANNER__
#define FU_QC_FIREHOSE_SAHARA_PKT_END_OF_IMAGE_SIZE 0x10
#endif

#ifndef __GI_SCANNER__
#define FU_QC_FIREHOSE_SAHARA_PKT_END_OF_IMAGE_DEFAULT_COMMAND_ID FU_QC_FIREHOSE_SAHARA_COMMAND_ID_END_OF_IMAGE
#define FU_QC_FIREHOSE_SAHARA_PKT_END_OF_IMAGE_DEFAULT_HDR_LENGTH 16
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuQcFirehoseSaharaPktDone;

FuQcFirehoseSaharaPktDone *fu_qc_firehose_sahara_pkt_done_ref(FuQcFirehoseSaharaPktDone *st) G_GNUC_NON_NULL(1);
void fu_qc_firehose_sahara_pkt_done_unref(FuQcFirehoseSaharaPktDone *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuQcFirehoseSaharaPktDone, fu_qc_firehose_sahara_pkt_done_unref)
FuQcFirehoseSaharaPktDone *fu_qc_firehose_sahara_pkt_done_new(void) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_QC_FIREHOSE_SAHARA_PKT_DONE_OFFSET_COMMAND_ID 0x0
#define FU_QC_FIREHOSE_SAHARA_PKT_DONE_OFFSET_HDR_LENGTH 0x4
#endif

#ifndef __GI_SCANNER__
#define FU_QC_FIREHOSE_SAHARA_PKT_DONE_SIZE 0x8
#endif

#ifndef __GI_SCANNER__
#define FU_QC_FIREHOSE_SAHARA_PKT_DONE_DEFAULT_COMMAND_ID FU_QC_FIREHOSE_SAHARA_COMMAND_ID_DONE
#define FU_QC_FIREHOSE_SAHARA_PKT_DONE_DEFAULT_HDR_LENGTH 8
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuQcFirehoseSaharaPktDoneResp;

FuQcFirehoseSaharaPktDoneResp *fu_qc_firehose_sahara_pkt_done_resp_ref(FuQcFirehoseSaharaPktDoneResp *st) G_GNUC_NON_NULL(1);
void fu_qc_firehose_sahara_pkt_done_resp_unref(FuQcFirehoseSaharaPktDoneResp *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuQcFirehoseSaharaPktDoneResp, fu_qc_firehose_sahara_pkt_done_resp_unref)
FuQcFirehoseSaharaPktDoneResp *fu_qc_firehose_sahara_pkt_done_resp_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
FuQcFirehoseSaharaStatus fu_qc_firehose_sahara_pkt_done_resp_get_status(const FuQcFirehoseSaharaPktDoneResp *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_QC_FIREHOSE_SAHARA_PKT_DONE_RESP_OFFSET_COMMAND_ID 0x0
#define FU_QC_FIREHOSE_SAHARA_PKT_DONE_RESP_OFFSET_HDR_LENGTH 0x4
#define FU_QC_FIREHOSE_SAHARA_PKT_DONE_RESP_OFFSET_STATUS 0x8
#endif

#ifndef __GI_SCANNER__
#define FU_QC_FIREHOSE_SAHARA_PKT_DONE_RESP_SIZE 0xC
#endif

#ifndef __GI_SCANNER__
#define FU_QC_FIREHOSE_SAHARA_PKT_DONE_RESP_DEFAULT_COMMAND_ID FU_QC_FIREHOSE_SAHARA_COMMAND_ID_DONE_RESPONSE
#define FU_QC_FIREHOSE_SAHARA_PKT_DONE_RESP_DEFAULT_HDR_LENGTH 12
#endif
