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

#pragma once
#include <fu-input-stream.h>
/**
 * FuSynapticsCxaudioOperation:
 */
typedef enum {
    /**
     * FU_SYNAPTICS_CXAUDIO_OPERATION_READ:
     */
    FU_SYNAPTICS_CXAUDIO_OPERATION_READ,
    /**
     * FU_SYNAPTICS_CXAUDIO_OPERATION_WRITE:
     */
    FU_SYNAPTICS_CXAUDIO_OPERATION_WRITE,
}  FuSynapticsCxaudioOperation;
#define FU_SYNAPTICS_CXAUDIO_OPERATION_LAST 2
/**
 * FuSynapticsCxaudioOperationFlags:
 */
typedef enum {
    /**
     * FU_SYNAPTICS_CXAUDIO_OPERATION_FLAG_NONE:
     */
    FU_SYNAPTICS_CXAUDIO_OPERATION_FLAG_NONE = 0,
    /**
     * FU_SYNAPTICS_CXAUDIO_OPERATION_FLAG_VERIFY:
     */
    FU_SYNAPTICS_CXAUDIO_OPERATION_FLAG_VERIFY = 1 << 4,
} G_GNUC_FLAG_ENUM FuSynapticsCxaudioOperationFlags;
/**
 * FuSynapticsCxaudioDeviceKind:
 */
typedef enum {
    /**
     * FU_SYNAPTICS_CXAUDIO_DEVICE_KIND_UNKNOWN:
     */
    FU_SYNAPTICS_CXAUDIO_DEVICE_KIND_UNKNOWN,
    /**
     * FU_SYNAPTICS_CXAUDIO_DEVICE_KIND_CX20562:
     */
    FU_SYNAPTICS_CXAUDIO_DEVICE_KIND_CX20562 = 20562,
    /**
     * FU_SYNAPTICS_CXAUDIO_DEVICE_KIND_CX2070X:
     */
    FU_SYNAPTICS_CXAUDIO_DEVICE_KIND_CX2070X = 20700,
    /**
     * FU_SYNAPTICS_CXAUDIO_DEVICE_KIND_CX2077X:
     */
    FU_SYNAPTICS_CXAUDIO_DEVICE_KIND_CX2077X = 20770,
    /**
     * FU_SYNAPTICS_CXAUDIO_DEVICE_KIND_CX2076X:
     */
    FU_SYNAPTICS_CXAUDIO_DEVICE_KIND_CX2076X = 20760,
    /**
     * FU_SYNAPTICS_CXAUDIO_DEVICE_KIND_CX2085X:
     */
    FU_SYNAPTICS_CXAUDIO_DEVICE_KIND_CX2085X = 20850,
    /**
     * FU_SYNAPTICS_CXAUDIO_DEVICE_KIND_CX2089X:
     */
    FU_SYNAPTICS_CXAUDIO_DEVICE_KIND_CX2089X = 20890,
    /**
     * FU_SYNAPTICS_CXAUDIO_DEVICE_KIND_CX2098X:
     */
    FU_SYNAPTICS_CXAUDIO_DEVICE_KIND_CX2098X = 20980,
    /**
     * FU_SYNAPTICS_CXAUDIO_DEVICE_KIND_CX2198X:
     */
    FU_SYNAPTICS_CXAUDIO_DEVICE_KIND_CX2198X = 21980,
}  FuSynapticsCxaudioDeviceKind;
const gchar *fu_synaptics_cxaudio_device_kind_to_string(FuSynapticsCxaudioDeviceKind val) G_GNUC_CONST;
/**
 * FuSynapticsCxaudioMemKind:
 */
typedef enum {
    /**
     * FU_SYNAPTICS_CXAUDIO_MEM_KIND_EEPROM:
     */
    FU_SYNAPTICS_CXAUDIO_MEM_KIND_EEPROM,
    /**
     * FU_SYNAPTICS_CXAUDIO_MEM_KIND_CPX_RAM:
     */
    FU_SYNAPTICS_CXAUDIO_MEM_KIND_CPX_RAM,
    /**
     * FU_SYNAPTICS_CXAUDIO_MEM_KIND_CPX_ROM:
     */
    FU_SYNAPTICS_CXAUDIO_MEM_KIND_CPX_ROM,
}  FuSynapticsCxaudioMemKind;
#define FU_SYNAPTICS_CXAUDIO_MEM_KIND_LAST 3
/**
 * FuSynapticsCxaudioFileKind:
 */
typedef enum {
    /**
     * FU_SYNAPTICS_CXAUDIO_FILE_KIND_UNKNOWN:
     */
    FU_SYNAPTICS_CXAUDIO_FILE_KIND_UNKNOWN,
    /**
     * FU_SYNAPTICS_CXAUDIO_FILE_KIND_CX2070X_FW:
     */
    FU_SYNAPTICS_CXAUDIO_FILE_KIND_CX2070X_FW,
    /**
     * FU_SYNAPTICS_CXAUDIO_FILE_KIND_CX2070X_PATCH:
     */
    FU_SYNAPTICS_CXAUDIO_FILE_KIND_CX2070X_PATCH,
    /**
     * FU_SYNAPTICS_CXAUDIO_FILE_KIND_CX2077X_PATCH:
     */
    FU_SYNAPTICS_CXAUDIO_FILE_KIND_CX2077X_PATCH,
    /**
     * FU_SYNAPTICS_CXAUDIO_FILE_KIND_CX2076X_PATCH:
     */
    FU_SYNAPTICS_CXAUDIO_FILE_KIND_CX2076X_PATCH,
    /**
     * FU_SYNAPTICS_CXAUDIO_FILE_KIND_CX2085X_PATCH:
     */
    FU_SYNAPTICS_CXAUDIO_FILE_KIND_CX2085X_PATCH,
    /**
     * FU_SYNAPTICS_CXAUDIO_FILE_KIND_CX2089X_PATCH:
     */
    FU_SYNAPTICS_CXAUDIO_FILE_KIND_CX2089X_PATCH,
    /**
     * FU_SYNAPTICS_CXAUDIO_FILE_KIND_CX2098X_PATCH:
     */
    FU_SYNAPTICS_CXAUDIO_FILE_KIND_CX2098X_PATCH,
    /**
     * FU_SYNAPTICS_CXAUDIO_FILE_KIND_CX2198X_PATCH:
     */
    FU_SYNAPTICS_CXAUDIO_FILE_KIND_CX2198X_PATCH,
}  FuSynapticsCxaudioFileKind;
#define FU_SYNAPTICS_CXAUDIO_FILE_KIND_LAST 9
const gchar *fu_synaptics_cxaudio_file_kind_to_string(FuSynapticsCxaudioFileKind val) G_GNUC_CONST;
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructSynapticsCxaudioCustomInfo;

FuStructSynapticsCxaudioCustomInfo *fu_struct_synaptics_cxaudio_custom_info_ref(FuStructSynapticsCxaudioCustomInfo *st) G_GNUC_NON_NULL(1);
void fu_struct_synaptics_cxaudio_custom_info_unref(FuStructSynapticsCxaudioCustomInfo *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructSynapticsCxaudioCustomInfo, fu_struct_synaptics_cxaudio_custom_info_unref)
FuStructSynapticsCxaudioCustomInfo *fu_struct_synaptics_cxaudio_custom_info_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_synaptics_cxaudio_custom_info_get_patch_version_string_address(const FuStructSynapticsCxaudioCustomInfo *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
const guint8 *fu_struct_synaptics_cxaudio_custom_info_get_cpx_patch_version(const FuStructSynapticsCxaudioCustomInfo *st, gsize *bufsz) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
const guint8 *fu_struct_synaptics_cxaudio_custom_info_get_spx_patch_version(const FuStructSynapticsCxaudioCustomInfo *st, gsize *bufsz) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_synaptics_cxaudio_custom_info_get_layout_signature(const FuStructSynapticsCxaudioCustomInfo *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_synaptics_cxaudio_custom_info_get_layout_version(const FuStructSynapticsCxaudioCustomInfo *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_synaptics_cxaudio_custom_info_get_application_status(const FuStructSynapticsCxaudioCustomInfo *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_synaptics_cxaudio_custom_info_get_vendor_id(const FuStructSynapticsCxaudioCustomInfo *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_synaptics_cxaudio_custom_info_get_product_id(const FuStructSynapticsCxaudioCustomInfo *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_synaptics_cxaudio_custom_info_get_revision_id(const FuStructSynapticsCxaudioCustomInfo *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_synaptics_cxaudio_custom_info_get_language_string_address(const FuStructSynapticsCxaudioCustomInfo *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_synaptics_cxaudio_custom_info_get_manufacturer_string_address(const FuStructSynapticsCxaudioCustomInfo *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_synaptics_cxaudio_custom_info_get_product_string_address(const FuStructSynapticsCxaudioCustomInfo *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_synaptics_cxaudio_custom_info_get_serial_number_string_address(const FuStructSynapticsCxaudioCustomInfo *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_SYNAPTICS_CXAUDIO_CUSTOM_INFO_OFFSET_PATCH_VERSION_STRING_ADDRESS 0x0
#define FU_STRUCT_SYNAPTICS_CXAUDIO_CUSTOM_INFO_OFFSET_CPX_PATCH_VERSION 0x2
#define FU_STRUCT_SYNAPTICS_CXAUDIO_CUSTOM_INFO_OFFSET_SPX_PATCH_VERSION 0x5
#define FU_STRUCT_SYNAPTICS_CXAUDIO_CUSTOM_INFO_OFFSET_LAYOUT_SIGNATURE 0x9
#define FU_STRUCT_SYNAPTICS_CXAUDIO_CUSTOM_INFO_OFFSET_LAYOUT_VERSION 0xA
#define FU_STRUCT_SYNAPTICS_CXAUDIO_CUSTOM_INFO_OFFSET_APPLICATION_STATUS 0xB
#define FU_STRUCT_SYNAPTICS_CXAUDIO_CUSTOM_INFO_OFFSET_VENDOR_ID 0xC
#define FU_STRUCT_SYNAPTICS_CXAUDIO_CUSTOM_INFO_OFFSET_PRODUCT_ID 0xE
#define FU_STRUCT_SYNAPTICS_CXAUDIO_CUSTOM_INFO_OFFSET_REVISION_ID 0x10
#define FU_STRUCT_SYNAPTICS_CXAUDIO_CUSTOM_INFO_OFFSET_LANGUAGE_STRING_ADDRESS 0x12
#define FU_STRUCT_SYNAPTICS_CXAUDIO_CUSTOM_INFO_OFFSET_MANUFACTURER_STRING_ADDRESS 0x14
#define FU_STRUCT_SYNAPTICS_CXAUDIO_CUSTOM_INFO_OFFSET_PRODUCT_STRING_ADDRESS 0x16
#define FU_STRUCT_SYNAPTICS_CXAUDIO_CUSTOM_INFO_OFFSET_SERIAL_NUMBER_STRING_ADDRESS 0x18
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_SYNAPTICS_CXAUDIO_CUSTOM_INFO_SIZE_CPX_PATCH_VERSION 0x3
#define FU_STRUCT_SYNAPTICS_CXAUDIO_CUSTOM_INFO_N_ELEMENTS_CPX_PATCH_VERSION 3
#define FU_STRUCT_SYNAPTICS_CXAUDIO_CUSTOM_INFO_SIZE_SPX_PATCH_VERSION 0x4
#define FU_STRUCT_SYNAPTICS_CXAUDIO_CUSTOM_INFO_N_ELEMENTS_SPX_PATCH_VERSION 4
#define FU_STRUCT_SYNAPTICS_CXAUDIO_CUSTOM_INFO_SIZE 0x1A
#endif

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

FuStructSynapticsCxaudioStringHeader *fu_struct_synaptics_cxaudio_string_header_ref(FuStructSynapticsCxaudioStringHeader *st) G_GNUC_NON_NULL(1);
void fu_struct_synaptics_cxaudio_string_header_unref(FuStructSynapticsCxaudioStringHeader *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructSynapticsCxaudioStringHeader, fu_struct_synaptics_cxaudio_string_header_unref)
FuStructSynapticsCxaudioStringHeader *fu_struct_synaptics_cxaudio_string_header_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_synaptics_cxaudio_string_header_get_length(const FuStructSynapticsCxaudioStringHeader *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_SYNAPTICS_CXAUDIO_STRING_HEADER_OFFSET_LENGTH 0x0
#define FU_STRUCT_SYNAPTICS_CXAUDIO_STRING_HEADER_OFFSET_TYPE 0x1
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_SYNAPTICS_CXAUDIO_STRING_HEADER_SIZE 0x2
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_SYNAPTICS_CXAUDIO_STRING_HEADER_DEFAULT_TYPE 0x03
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructSynapticsCxaudioValiditySignature;

FuStructSynapticsCxaudioValiditySignature *fu_struct_synaptics_cxaudio_validity_signature_ref(FuStructSynapticsCxaudioValiditySignature *st) G_GNUC_NON_NULL(1);
void fu_struct_synaptics_cxaudio_validity_signature_unref(FuStructSynapticsCxaudioValiditySignature *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructSynapticsCxaudioValiditySignature, fu_struct_synaptics_cxaudio_validity_signature_unref)
FuStructSynapticsCxaudioValiditySignature *fu_struct_synaptics_cxaudio_validity_signature_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_synaptics_cxaudio_validity_signature_get_magic_byte(const FuStructSynapticsCxaudioValiditySignature *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_synaptics_cxaudio_validity_signature_get_eeprom_size_code(const FuStructSynapticsCxaudioValiditySignature *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_SYNAPTICS_CXAUDIO_VALIDITY_SIGNATURE_OFFSET_MAGIC_BYTE 0x0
#define FU_STRUCT_SYNAPTICS_CXAUDIO_VALIDITY_SIGNATURE_OFFSET_EEPROM_SIZE_CODE 0x1
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_SYNAPTICS_CXAUDIO_VALIDITY_SIGNATURE_SIZE 0x2
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_SYNAPTICS_CXAUDIO_VALIDITY_SIGNATURE_DEFAULT_MAGIC_BYTE 0x4C
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructSynapticsCxaudioPatchInfo;

FuStructSynapticsCxaudioPatchInfo *fu_struct_synaptics_cxaudio_patch_info_ref(FuStructSynapticsCxaudioPatchInfo *st) G_GNUC_NON_NULL(1);
void fu_struct_synaptics_cxaudio_patch_info_unref(FuStructSynapticsCxaudioPatchInfo *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructSynapticsCxaudioPatchInfo, fu_struct_synaptics_cxaudio_patch_info_unref)
FuStructSynapticsCxaudioPatchInfo *fu_struct_synaptics_cxaudio_patch_info_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_synaptics_cxaudio_patch_info_get_patch_signature(const FuStructSynapticsCxaudioPatchInfo *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_synaptics_cxaudio_patch_info_get_patch_address(const FuStructSynapticsCxaudioPatchInfo *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_synaptics_cxaudio_patch_info_set_patch_signature(FuStructSynapticsCxaudioPatchInfo *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_struct_synaptics_cxaudio_patch_info_set_patch_address(FuStructSynapticsCxaudioPatchInfo *st, guint16 value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_SYNAPTICS_CXAUDIO_PATCH_INFO_OFFSET_PATCH_SIGNATURE 0x0
#define FU_STRUCT_SYNAPTICS_CXAUDIO_PATCH_INFO_OFFSET_PATCH_ADDRESS 0x1
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_SYNAPTICS_CXAUDIO_PATCH_INFO_SIZE 0x3
#endif

#ifndef __GI_SCANNER__
#endif
