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

#pragma once
#include <fu-input-stream.h>
/**
 * FuSteelseriesSonicChip:
 */
typedef enum {
    /**
     * FU_STEELSERIES_SONIC_CHIP_NORDIC:
     */
    FU_STEELSERIES_SONIC_CHIP_NORDIC,
    /**
     * FU_STEELSERIES_SONIC_CHIP_HOLTEK:
     */
    FU_STEELSERIES_SONIC_CHIP_HOLTEK,
    /**
     * FU_STEELSERIES_SONIC_CHIP_MOUSE:
     */
    FU_STEELSERIES_SONIC_CHIP_MOUSE,
}  FuSteelseriesSonicChip;
#define FU_STEELSERIES_SONIC_CHIP_LAST 3
/**
 * FuSteelseriesSonicWirelessStatus:
 */
typedef enum {
    /**
     * FU_STEELSERIES_SONIC_WIRELESS_STATUS_OFF:
     *
     * WDS not initiated, radio is off
     */
    FU_STEELSERIES_SONIC_WIRELESS_STATUS_OFF,
    /**
     * FU_STEELSERIES_SONIC_WIRELESS_STATUS_IDLE:
     *
     * WDS initiated, USB receiver is transmitting beacon (mouse will not have this state)
     */
    FU_STEELSERIES_SONIC_WIRELESS_STATUS_IDLE,
    /**
     * FU_STEELSERIES_SONIC_WIRELESS_STATUS_SEARCH:
     *
     * WDS initiated, mouse is trying to synchronize to receiver (receiver will not have this state)
     */
    FU_STEELSERIES_SONIC_WIRELESS_STATUS_SEARCH,
    /**
     * FU_STEELSERIES_SONIC_WIRELESS_STATUS_LOCKED:
     *
     * USB receiver and mouse are synchronized, but not necessarily connected
     */
    FU_STEELSERIES_SONIC_WIRELESS_STATUS_LOCKED,
    /**
     * FU_STEELSERIES_SONIC_WIRELESS_STATUS_CONNECTED:
     *
     * USB receiver and mouse are connected
     */
    FU_STEELSERIES_SONIC_WIRELESS_STATUS_CONNECTED,
    /**
     * FU_STEELSERIES_SONIC_WIRELESS_STATUS_TERMINATED:
     *
     * Mouse has been disconnected from the USB receiver
     */
    FU_STEELSERIES_SONIC_WIRELESS_STATUS_TERMINATED,
}  FuSteelseriesSonicWirelessStatus;
#define FU_STEELSERIES_SONIC_WIRELESS_STATUS_LAST 6
const gchar *fu_steelseries_sonic_wireless_status_to_string(FuSteelseriesSonicWirelessStatus val) G_GNUC_CONST;
/**
 * FuSteelseriesSonicOpcode8:
 */
typedef enum {
    /**
     * FU_STEELSERIES_SONIC_OPCODE8_BATTERY:
     */
    FU_STEELSERIES_SONIC_OPCODE8_BATTERY = 0xAA,
    /**
     * FU_STEELSERIES_SONIC_OPCODE8_WIRELESS_STATUS:
     */
    FU_STEELSERIES_SONIC_OPCODE8_WIRELESS_STATUS = 0xE8,
}  FuSteelseriesSonicOpcode8;
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructSteelseriesSonicWirelessStatusReq;

FuStructSteelseriesSonicWirelessStatusReq *fu_struct_steelseries_sonic_wireless_status_req_ref(FuStructSteelseriesSonicWirelessStatusReq *st) G_GNUC_NON_NULL(1);
void fu_struct_steelseries_sonic_wireless_status_req_unref(FuStructSteelseriesSonicWirelessStatusReq *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructSteelseriesSonicWirelessStatusReq, fu_struct_steelseries_sonic_wireless_status_req_unref)
FuStructSteelseriesSonicWirelessStatusReq *fu_struct_steelseries_sonic_wireless_status_req_new(void) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_STEELSERIES_SONIC_WIRELESS_STATUS_REQ_OFFSET_OPCODE 0x0
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_STEELSERIES_SONIC_WIRELESS_STATUS_REQ_SIZE 0x1
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_STEELSERIES_SONIC_WIRELESS_STATUS_REQ_DEFAULT_OPCODE FU_STEELSERIES_SONIC_OPCODE8_WIRELESS_STATUS
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructSteelseriesSonicWirelessStatusRes;

FuStructSteelseriesSonicWirelessStatusRes *fu_struct_steelseries_sonic_wireless_status_res_ref(FuStructSteelseriesSonicWirelessStatusRes *st) G_GNUC_NON_NULL(1);
void fu_struct_steelseries_sonic_wireless_status_res_unref(FuStructSteelseriesSonicWirelessStatusRes *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructSteelseriesSonicWirelessStatusRes, fu_struct_steelseries_sonic_wireless_status_res_unref)
FuStructSteelseriesSonicWirelessStatusRes *fu_struct_steelseries_sonic_wireless_status_res_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
FuSteelseriesSonicWirelessStatus fu_struct_steelseries_sonic_wireless_status_res_get_status(const FuStructSteelseriesSonicWirelessStatusRes *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_STEELSERIES_SONIC_WIRELESS_STATUS_RES_OFFSET_STATUS 0x0
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_STEELSERIES_SONIC_WIRELESS_STATUS_RES_SIZE 0x1
#endif

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

FuStructSteelseriesSonicBatteryReq *fu_struct_steelseries_sonic_battery_req_ref(FuStructSteelseriesSonicBatteryReq *st) G_GNUC_NON_NULL(1);
void fu_struct_steelseries_sonic_battery_req_unref(FuStructSteelseriesSonicBatteryReq *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructSteelseriesSonicBatteryReq, fu_struct_steelseries_sonic_battery_req_unref)
FuStructSteelseriesSonicBatteryReq *fu_struct_steelseries_sonic_battery_req_new(void) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_STEELSERIES_SONIC_BATTERY_REQ_OFFSET_OPCODE 0x0
#define FU_STRUCT_STEELSERIES_SONIC_BATTERY_REQ_OFFSET_BAT_MODE 0x1
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_STEELSERIES_SONIC_BATTERY_REQ_SIZE 0x2
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_STEELSERIES_SONIC_BATTERY_REQ_DEFAULT_OPCODE FU_STEELSERIES_SONIC_OPCODE8_BATTERY
#define FU_STRUCT_STEELSERIES_SONIC_BATTERY_REQ_DEFAULT_BAT_MODE 0x01
#endif
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructSteelseriesSonicBatteryRes;

FuStructSteelseriesSonicBatteryRes *fu_struct_steelseries_sonic_battery_res_ref(FuStructSteelseriesSonicBatteryRes *st) G_GNUC_NON_NULL(1);
void fu_struct_steelseries_sonic_battery_res_unref(FuStructSteelseriesSonicBatteryRes *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructSteelseriesSonicBatteryRes, fu_struct_steelseries_sonic_battery_res_unref)
FuStructSteelseriesSonicBatteryRes *fu_struct_steelseries_sonic_battery_res_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_steelseries_sonic_battery_res_get_value(const FuStructSteelseriesSonicBatteryRes *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_STEELSERIES_SONIC_BATTERY_RES_OFFSET_VALUE 0x0
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_STEELSERIES_SONIC_BATTERY_RES_SIZE 0x2
#endif

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

FuStructSteelseriesSonicRestartReq *fu_struct_steelseries_sonic_restart_req_ref(FuStructSteelseriesSonicRestartReq *st) G_GNUC_NON_NULL(1);
void fu_struct_steelseries_sonic_restart_req_unref(FuStructSteelseriesSonicRestartReq *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructSteelseriesSonicRestartReq, fu_struct_steelseries_sonic_restart_req_unref)
FuStructSteelseriesSonicRestartReq *fu_struct_steelseries_sonic_restart_req_new(void) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_steelseries_sonic_restart_req_set_opcode(FuStructSteelseriesSonicRestartReq *st, guint16 value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_STEELSERIES_SONIC_RESTART_REQ_OFFSET_OPCODE 0x0
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_STEELSERIES_SONIC_RESTART_REQ_SIZE 0x2
#endif

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

FuStructSteelseriesSonicEraseReq *fu_struct_steelseries_sonic_erase_req_ref(FuStructSteelseriesSonicEraseReq *st) G_GNUC_NON_NULL(1);
void fu_struct_steelseries_sonic_erase_req_unref(FuStructSteelseriesSonicEraseReq *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructSteelseriesSonicEraseReq, fu_struct_steelseries_sonic_erase_req_unref)
FuStructSteelseriesSonicEraseReq *fu_struct_steelseries_sonic_erase_req_new(void) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_steelseries_sonic_erase_req_set_opcode(FuStructSteelseriesSonicEraseReq *st, guint16 value) G_GNUC_NON_NULL(1);
void fu_struct_steelseries_sonic_erase_req_set_chipid(FuStructSteelseriesSonicEraseReq *st, guint16 value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_STEELSERIES_SONIC_ERASE_REQ_OFFSET_OPCODE 0x0
#define FU_STRUCT_STEELSERIES_SONIC_ERASE_REQ_OFFSET_CHIPID 0x2
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_STEELSERIES_SONIC_ERASE_REQ_SIZE 0x4
#endif

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

FuStructSteelseriesSonicReadFromRamReq *fu_struct_steelseries_sonic_read_from_ram_req_ref(FuStructSteelseriesSonicReadFromRamReq *st) G_GNUC_NON_NULL(1);
void fu_struct_steelseries_sonic_read_from_ram_req_unref(FuStructSteelseriesSonicReadFromRamReq *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructSteelseriesSonicReadFromRamReq, fu_struct_steelseries_sonic_read_from_ram_req_unref)
FuStructSteelseriesSonicReadFromRamReq *fu_struct_steelseries_sonic_read_from_ram_req_new(void) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_steelseries_sonic_read_from_ram_req_set_opcode(FuStructSteelseriesSonicReadFromRamReq *st, guint16 value) G_GNUC_NON_NULL(1);
void fu_struct_steelseries_sonic_read_from_ram_req_set_offset(FuStructSteelseriesSonicReadFromRamReq *st, guint16 value) G_GNUC_NON_NULL(1);
void fu_struct_steelseries_sonic_read_from_ram_req_set_size(FuStructSteelseriesSonicReadFromRamReq *st, guint16 value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_STEELSERIES_SONIC_READ_FROM_RAM_REQ_OFFSET_OPCODE 0x0
#define FU_STRUCT_STEELSERIES_SONIC_READ_FROM_RAM_REQ_OFFSET_OFFSET 0x2
#define FU_STRUCT_STEELSERIES_SONIC_READ_FROM_RAM_REQ_OFFSET_SIZE 0x4
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_STEELSERIES_SONIC_READ_FROM_RAM_REQ_SIZE 0x6
#endif

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

FuStructSteelseriesSonicReadFromRamRes *fu_struct_steelseries_sonic_read_from_ram_res_ref(FuStructSteelseriesSonicReadFromRamRes *st) G_GNUC_NON_NULL(1);
void fu_struct_steelseries_sonic_read_from_ram_res_unref(FuStructSteelseriesSonicReadFromRamRes *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructSteelseriesSonicReadFromRamRes, fu_struct_steelseries_sonic_read_from_ram_res_unref)
FuStructSteelseriesSonicReadFromRamRes *fu_struct_steelseries_sonic_read_from_ram_res_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
const guint8 *fu_struct_steelseries_sonic_read_from_ram_res_get_data(const FuStructSteelseriesSonicReadFromRamRes *st, gsize *bufsz) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_STEELSERIES_SONIC_READ_FROM_RAM_RES_OFFSET_DATA 0x0
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_STEELSERIES_SONIC_READ_FROM_RAM_RES_SIZE_DATA 0x30
#define FU_STRUCT_STEELSERIES_SONIC_READ_FROM_RAM_RES_N_ELEMENTS_DATA 48
#define FU_STRUCT_STEELSERIES_SONIC_READ_FROM_RAM_RES_SIZE 0x30
#endif

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

FuStructSteelseriesSonicReadFromFlashReq *fu_struct_steelseries_sonic_read_from_flash_req_ref(FuStructSteelseriesSonicReadFromFlashReq *st) G_GNUC_NON_NULL(1);
void fu_struct_steelseries_sonic_read_from_flash_req_unref(FuStructSteelseriesSonicReadFromFlashReq *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructSteelseriesSonicReadFromFlashReq, fu_struct_steelseries_sonic_read_from_flash_req_unref)
FuStructSteelseriesSonicReadFromFlashReq *fu_struct_steelseries_sonic_read_from_flash_req_new(void) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_steelseries_sonic_read_from_flash_req_set_opcode(FuStructSteelseriesSonicReadFromFlashReq *st, guint16 value) G_GNUC_NON_NULL(1);
void fu_struct_steelseries_sonic_read_from_flash_req_set_chipid(FuStructSteelseriesSonicReadFromFlashReq *st, guint16 value) G_GNUC_NON_NULL(1);
void fu_struct_steelseries_sonic_read_from_flash_req_set_offset(FuStructSteelseriesSonicReadFromFlashReq *st, guint32 value) G_GNUC_NON_NULL(1);
void fu_struct_steelseries_sonic_read_from_flash_req_set_size(FuStructSteelseriesSonicReadFromFlashReq *st, guint16 value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_STEELSERIES_SONIC_READ_FROM_FLASH_REQ_OFFSET_OPCODE 0x0
#define FU_STRUCT_STEELSERIES_SONIC_READ_FROM_FLASH_REQ_OFFSET_CHIPID 0x2
#define FU_STRUCT_STEELSERIES_SONIC_READ_FROM_FLASH_REQ_OFFSET_OFFSET 0x4
#define FU_STRUCT_STEELSERIES_SONIC_READ_FROM_FLASH_REQ_OFFSET_SIZE 0x8
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_STEELSERIES_SONIC_READ_FROM_FLASH_REQ_SIZE 0xA
#endif

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

FuStructSteelseriesSonicWriteToRamReq *fu_struct_steelseries_sonic_write_to_ram_req_ref(FuStructSteelseriesSonicWriteToRamReq *st) G_GNUC_NON_NULL(1);
void fu_struct_steelseries_sonic_write_to_ram_req_unref(FuStructSteelseriesSonicWriteToRamReq *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructSteelseriesSonicWriteToRamReq, fu_struct_steelseries_sonic_write_to_ram_req_unref)
FuStructSteelseriesSonicWriteToRamReq *fu_struct_steelseries_sonic_write_to_ram_req_new(void) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_steelseries_sonic_write_to_ram_req_set_opcode(FuStructSteelseriesSonicWriteToRamReq *st, guint16 value) G_GNUC_NON_NULL(1);
void fu_struct_steelseries_sonic_write_to_ram_req_set_offset(FuStructSteelseriesSonicWriteToRamReq *st, guint16 value) G_GNUC_NON_NULL(1);
void fu_struct_steelseries_sonic_write_to_ram_req_set_size(FuStructSteelseriesSonicWriteToRamReq *st, guint16 value) G_GNUC_NON_NULL(1);
gboolean fu_struct_steelseries_sonic_write_to_ram_req_set_data(FuStructSteelseriesSonicWriteToRamReq *st, const guint8 *buf, gsize bufsz, GError **error) G_GNUC_NON_NULL(1, 2) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_STRUCT_STEELSERIES_SONIC_WRITE_TO_RAM_REQ_OFFSET_OPCODE 0x0
#define FU_STRUCT_STEELSERIES_SONIC_WRITE_TO_RAM_REQ_OFFSET_OFFSET 0x2
#define FU_STRUCT_STEELSERIES_SONIC_WRITE_TO_RAM_REQ_OFFSET_SIZE 0x4
#define FU_STRUCT_STEELSERIES_SONIC_WRITE_TO_RAM_REQ_OFFSET_DATA 0x6
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_STEELSERIES_SONIC_WRITE_TO_RAM_REQ_SIZE_DATA 0x30
#define FU_STRUCT_STEELSERIES_SONIC_WRITE_TO_RAM_REQ_N_ELEMENTS_DATA 48
#define FU_STRUCT_STEELSERIES_SONIC_WRITE_TO_RAM_REQ_SIZE 0x36
#endif

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

FuStructSteelseriesSonicWriteToFlashReq *fu_struct_steelseries_sonic_write_to_flash_req_ref(FuStructSteelseriesSonicWriteToFlashReq *st) G_GNUC_NON_NULL(1);
void fu_struct_steelseries_sonic_write_to_flash_req_unref(FuStructSteelseriesSonicWriteToFlashReq *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructSteelseriesSonicWriteToFlashReq, fu_struct_steelseries_sonic_write_to_flash_req_unref)
FuStructSteelseriesSonicWriteToFlashReq *fu_struct_steelseries_sonic_write_to_flash_req_new(void) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_steelseries_sonic_write_to_flash_req_set_opcode(FuStructSteelseriesSonicWriteToFlashReq *st, guint16 value) G_GNUC_NON_NULL(1);
void fu_struct_steelseries_sonic_write_to_flash_req_set_chipid(FuStructSteelseriesSonicWriteToFlashReq *st, guint16 value) G_GNUC_NON_NULL(1);
void fu_struct_steelseries_sonic_write_to_flash_req_set_offset(FuStructSteelseriesSonicWriteToFlashReq *st, guint32 value) G_GNUC_NON_NULL(1);
void fu_struct_steelseries_sonic_write_to_flash_req_set_size(FuStructSteelseriesSonicWriteToFlashReq *st, guint16 value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_STEELSERIES_SONIC_WRITE_TO_FLASH_REQ_OFFSET_OPCODE 0x0
#define FU_STRUCT_STEELSERIES_SONIC_WRITE_TO_FLASH_REQ_OFFSET_CHIPID 0x2
#define FU_STRUCT_STEELSERIES_SONIC_WRITE_TO_FLASH_REQ_OFFSET_OFFSET 0x4
#define FU_STRUCT_STEELSERIES_SONIC_WRITE_TO_FLASH_REQ_OFFSET_SIZE 0x8
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_STEELSERIES_SONIC_WRITE_TO_FLASH_REQ_SIZE 0xA
#endif

#ifndef __GI_SCANNER__
#endif
