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

#pragma once
#include <fu-input-stream.h>
/**
 * FuIntelUsb4Opcode:
 *
 * hub operation
 */
typedef enum {
    /**
     * FU_INTEL_USB4_OPCODE_NVM_WRITE:
     */
    FU_INTEL_USB4_OPCODE_NVM_WRITE = 0x20,
    /**
     * FU_INTEL_USB4_OPCODE_NVM_AUTH_WRITE:
     */
    FU_INTEL_USB4_OPCODE_NVM_AUTH_WRITE = 0x21,
    /**
     * FU_INTEL_USB4_OPCODE_NVM_READ:
     */
    FU_INTEL_USB4_OPCODE_NVM_READ = 0x22,
    /**
     * FU_INTEL_USB4_OPCODE_NVM_SET_OFFSET:
     */
    FU_INTEL_USB4_OPCODE_NVM_SET_OFFSET = 0x23,
    /**
     * FU_INTEL_USB4_OPCODE_DROM_READ:
     */
    FU_INTEL_USB4_OPCODE_DROM_READ = 0x24,
}  FuIntelUsb4Opcode;
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructIntelUsb4Mbox;

FuStructIntelUsb4Mbox *fu_struct_intel_usb4_mbox_ref(FuStructIntelUsb4Mbox *st) G_GNUC_NON_NULL(1);
void fu_struct_intel_usb4_mbox_unref(FuStructIntelUsb4Mbox *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructIntelUsb4Mbox, fu_struct_intel_usb4_mbox_unref)
FuStructIntelUsb4Mbox *fu_struct_intel_usb4_mbox_new(void) G_GNUC_WARN_UNUSED_RESULT;
FuStructIntelUsb4Mbox *fu_struct_intel_usb4_mbox_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
FuIntelUsb4Opcode fu_struct_intel_usb4_mbox_get_opcode(const FuStructIntelUsb4Mbox *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_intel_usb4_mbox_get_status(const FuStructIntelUsb4Mbox *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_intel_usb4_mbox_set_opcode(FuStructIntelUsb4Mbox *st, FuIntelUsb4Opcode value) G_GNUC_NON_NULL(1);
void fu_struct_intel_usb4_mbox_set_status(FuStructIntelUsb4Mbox *st, guint8 value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_INTEL_USB4_MBOX_OFFSET_OPCODE 0x0
#define FU_STRUCT_INTEL_USB4_MBOX_OFFSET_STATUS 0x3
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_INTEL_USB4_MBOX_SIZE 0x4
#endif

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

FuStructIntelUsb4MetadataNvmRead *fu_struct_intel_usb4_metadata_nvm_read_ref(FuStructIntelUsb4MetadataNvmRead *st) G_GNUC_NON_NULL(1);
void fu_struct_intel_usb4_metadata_nvm_read_unref(FuStructIntelUsb4MetadataNvmRead *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructIntelUsb4MetadataNvmRead, fu_struct_intel_usb4_metadata_nvm_read_unref)
FuStructIntelUsb4MetadataNvmRead *fu_struct_intel_usb4_metadata_nvm_read_new(void) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_intel_usb4_metadata_nvm_read_set_address(FuStructIntelUsb4MetadataNvmRead *st, guint32 value) G_GNUC_NON_NULL(1);
void fu_struct_intel_usb4_metadata_nvm_read_set_length(FuStructIntelUsb4MetadataNvmRead *st, guint8 value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_INTEL_USB4_METADATA_NVM_READ_OFFSET_ADDRESS 0x0
#define FU_STRUCT_INTEL_USB4_METADATA_NVM_READ_OFFSET_LENGTH 0x3
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_INTEL_USB4_METADATA_NVM_READ_SIZE 0x4
#endif

#ifndef __GI_SCANNER__
#endif
