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

#pragma once
#include <fu-input-stream.h>
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructQcFwUpdateHdr;

FuStructQcFwUpdateHdr *fu_struct_qc_fw_update_hdr_ref(FuStructQcFwUpdateHdr *st) G_GNUC_NON_NULL(1);
void fu_struct_qc_fw_update_hdr_unref(FuStructQcFwUpdateHdr *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructQcFwUpdateHdr, fu_struct_qc_fw_update_hdr_unref)
FuStructQcFwUpdateHdr *fu_struct_qc_fw_update_hdr_parse_stream(GInputStream *stream, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
gboolean fu_struct_qc_fw_update_hdr_validate_stream(GInputStream *stream, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_qc_fw_update_hdr_get_protocol(const FuStructQcFwUpdateHdr *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_qc_fw_update_hdr_get_length(const FuStructQcFwUpdateHdr *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
const guint8 *fu_struct_qc_fw_update_hdr_get_dev_variant(const FuStructQcFwUpdateHdr *st, gsize *bufsz) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_qc_fw_update_hdr_get_major(const FuStructQcFwUpdateHdr *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_qc_fw_update_hdr_get_minor(const FuStructQcFwUpdateHdr *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_qc_fw_update_hdr_get_upgrades(const FuStructQcFwUpdateHdr *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_FW_UPDATE_HDR_OFFSET_MAGIC1 0x0
#define FU_STRUCT_QC_FW_UPDATE_HDR_OFFSET_MAGIC2 0x4
#define FU_STRUCT_QC_FW_UPDATE_HDR_OFFSET_MAGIC3 0x6
#define FU_STRUCT_QC_FW_UPDATE_HDR_OFFSET_PROTOCOL 0x7
#define FU_STRUCT_QC_FW_UPDATE_HDR_OFFSET_LENGTH 0x8
#define FU_STRUCT_QC_FW_UPDATE_HDR_OFFSET_DEV_VARIANT 0xC
#define FU_STRUCT_QC_FW_UPDATE_HDR_OFFSET_MAJOR 0x14
#define FU_STRUCT_QC_FW_UPDATE_HDR_OFFSET_MINOR 0x16
#define FU_STRUCT_QC_FW_UPDATE_HDR_OFFSET_UPGRADES 0x18
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_FW_UPDATE_HDR_SIZE_DEV_VARIANT 0x8
#define FU_STRUCT_QC_FW_UPDATE_HDR_N_ELEMENTS_DEV_VARIANT 8
#define FU_STRUCT_QC_FW_UPDATE_HDR_SIZE 0x1A
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_QC_FW_UPDATE_HDR_DEFAULT_MAGIC1 0x41505055
#define FU_STRUCT_QC_FW_UPDATE_HDR_DEFAULT_MAGIC2 0x4844
#define FU_STRUCT_QC_FW_UPDATE_HDR_DEFAULT_MAGIC3 0x52
#endif
