/*
 * 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;
} FuStructRtshubHidCmdBuf;

FuStructRtshubHidCmdBuf *fu_struct_rtshub_hid_cmd_buf_ref(FuStructRtshubHidCmdBuf *st) G_GNUC_NON_NULL(1);
void fu_struct_rtshub_hid_cmd_buf_unref(FuStructRtshubHidCmdBuf *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructRtshubHidCmdBuf, fu_struct_rtshub_hid_cmd_buf_unref)
FuStructRtshubHidCmdBuf *fu_struct_rtshub_hid_cmd_buf_new(void) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_rtshub_hid_cmd_buf_get_cmd(const FuStructRtshubHidCmdBuf *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_rtshub_hid_cmd_buf_get_ext(const FuStructRtshubHidCmdBuf *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_rtshub_hid_cmd_buf_get_regaddr(const FuStructRtshubHidCmdBuf *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_rtshub_hid_cmd_buf_get_bufferlen(const FuStructRtshubHidCmdBuf *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
const guint8 *fu_struct_rtshub_hid_cmd_buf_get_data(const FuStructRtshubHidCmdBuf *st, gsize *bufsz) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_rtshub_hid_cmd_buf_set_cmd(FuStructRtshubHidCmdBuf *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_struct_rtshub_hid_cmd_buf_set_ext(FuStructRtshubHidCmdBuf *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_struct_rtshub_hid_cmd_buf_set_regaddr(FuStructRtshubHidCmdBuf *st, guint32 value) G_GNUC_NON_NULL(1);
void fu_struct_rtshub_hid_cmd_buf_set_bufferlen(FuStructRtshubHidCmdBuf *st, guint16 value) G_GNUC_NON_NULL(1);
gboolean fu_struct_rtshub_hid_cmd_buf_set_data(FuStructRtshubHidCmdBuf *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_RTSHUB_HID_CMD_BUF_OFFSET_CMD 0x0
#define FU_STRUCT_RTSHUB_HID_CMD_BUF_OFFSET_EXT 0x1
#define FU_STRUCT_RTSHUB_HID_CMD_BUF_OFFSET_REGADDR 0x2
#define FU_STRUCT_RTSHUB_HID_CMD_BUF_OFFSET_BUFFERLEN 0x6
#define FU_STRUCT_RTSHUB_HID_CMD_BUF_OFFSET_DATA 0x40
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_RTSHUB_HID_CMD_BUF_SIZE_DATA 0x80
#define FU_STRUCT_RTSHUB_HID_CMD_BUF_N_ELEMENTS_DATA 128
#define FU_STRUCT_RTSHUB_HID_CMD_BUF_SIZE 0xC0
#endif

#ifndef __GI_SCANNER__
#endif
