/* auto-generated, do not modify */
#include "config.h"

#include "fu-synaptics-cape-struct.h"
#include "fu-byte-array.h"
#include "fu-mem-private.h"
#include "fu-string.h"

#ifdef G_LOG_DOMAIN
  #undef G_LOG_DOMAIN
#endif
#define G_LOG_DOMAIN "FuStruct"


/* getters */
/**
 * fu_struct_synaptics_cape_hid_hdr_get_vid: (skip):
 **/
guint32
fu_struct_synaptics_cape_hid_hdr_get_vid(const GByteArray *st)
{
    g_return_val_if_fail(st != NULL, 0x0);
    return fu_memread_uint32(st->data + 0, G_LITTLE_ENDIAN);
}
/**
 * fu_struct_synaptics_cape_hid_hdr_get_pid: (skip):
 **/
guint32
fu_struct_synaptics_cape_hid_hdr_get_pid(const GByteArray *st)
{
    g_return_val_if_fail(st != NULL, 0x0);
    return fu_memread_uint32(st->data + 4, G_LITTLE_ENDIAN);
}
/**
 * fu_struct_synaptics_cape_hid_hdr_get_update_type: (skip):
 **/
guint32
fu_struct_synaptics_cape_hid_hdr_get_update_type(const GByteArray *st)
{
    g_return_val_if_fail(st != NULL, 0x0);
    return fu_memread_uint32(st->data + 8, G_LITTLE_ENDIAN);
}
/**
 * fu_struct_synaptics_cape_hid_hdr_get_signature: (skip):
 **/
static guint32
fu_struct_synaptics_cape_hid_hdr_get_signature(const GByteArray *st)
{
    g_return_val_if_fail(st != NULL, 0x0);
    return fu_memread_uint32(st->data + 12, G_LITTLE_ENDIAN);
}
/**
 * fu_struct_synaptics_cape_hid_hdr_get_crc: (skip):
 **/
guint32
fu_struct_synaptics_cape_hid_hdr_get_crc(const GByteArray *st)
{
    g_return_val_if_fail(st != NULL, 0x0);
    return fu_memread_uint32(st->data + 16, G_LITTLE_ENDIAN);
}
/**
 * fu_struct_synaptics_cape_hid_hdr_get_ver_w: (skip):
 **/
guint16
fu_struct_synaptics_cape_hid_hdr_get_ver_w(const GByteArray *st)
{
    g_return_val_if_fail(st != NULL, 0x0);
    return fu_memread_uint16(st->data + 20, G_LITTLE_ENDIAN);
}
/**
 * fu_struct_synaptics_cape_hid_hdr_get_ver_x: (skip):
 **/
guint16
fu_struct_synaptics_cape_hid_hdr_get_ver_x(const GByteArray *st)
{
    g_return_val_if_fail(st != NULL, 0x0);
    return fu_memread_uint16(st->data + 22, G_LITTLE_ENDIAN);
}
/**
 * fu_struct_synaptics_cape_hid_hdr_get_ver_y: (skip):
 **/
guint16
fu_struct_synaptics_cape_hid_hdr_get_ver_y(const GByteArray *st)
{
    g_return_val_if_fail(st != NULL, 0x0);
    return fu_memread_uint16(st->data + 24, G_LITTLE_ENDIAN);
}
/**
 * fu_struct_synaptics_cape_hid_hdr_get_ver_z: (skip):
 **/
guint16
fu_struct_synaptics_cape_hid_hdr_get_ver_z(const GByteArray *st)
{
    g_return_val_if_fail(st != NULL, 0x0);
    return fu_memread_uint16(st->data + 26, G_LITTLE_ENDIAN);
}

/* setters */
/**
 * fu_struct_synaptics_cape_hid_hdr_set_vid: (skip):
 **/
void
fu_struct_synaptics_cape_hid_hdr_set_vid(GByteArray *st, guint32 value)
{
    g_return_if_fail(st != NULL);
    fu_memwrite_uint32(st->data + 0, value, G_LITTLE_ENDIAN);
}
/**
 * fu_struct_synaptics_cape_hid_hdr_set_pid: (skip):
 **/
void
fu_struct_synaptics_cape_hid_hdr_set_pid(GByteArray *st, guint32 value)
{
    g_return_if_fail(st != NULL);
    fu_memwrite_uint32(st->data + 4, value, G_LITTLE_ENDIAN);
}
/**
 * fu_struct_synaptics_cape_hid_hdr_set_update_type: (skip):
 **/
void
fu_struct_synaptics_cape_hid_hdr_set_update_type(GByteArray *st, guint32 value)
{
    g_return_if_fail(st != NULL);
    fu_memwrite_uint32(st->data + 8, value, G_LITTLE_ENDIAN);
}
/**
 * fu_struct_synaptics_cape_hid_hdr_set_signature: (skip):
 **/
static void
fu_struct_synaptics_cape_hid_hdr_set_signature(GByteArray *st, guint32 value)
{
    g_return_if_fail(st != NULL);
    fu_memwrite_uint32(st->data + 12, value, G_LITTLE_ENDIAN);
}
/**
 * fu_struct_synaptics_cape_hid_hdr_set_crc: (skip):
 **/
void
fu_struct_synaptics_cape_hid_hdr_set_crc(GByteArray *st, guint32 value)
{
    g_return_if_fail(st != NULL);
    fu_memwrite_uint32(st->data + 16, value, G_LITTLE_ENDIAN);
}
/**
 * fu_struct_synaptics_cape_hid_hdr_set_ver_w: (skip):
 **/
void
fu_struct_synaptics_cape_hid_hdr_set_ver_w(GByteArray *st, guint16 value)
{
    g_return_if_fail(st != NULL);
    fu_memwrite_uint16(st->data + 20, value, G_LITTLE_ENDIAN);
}
/**
 * fu_struct_synaptics_cape_hid_hdr_set_ver_x: (skip):
 **/
void
fu_struct_synaptics_cape_hid_hdr_set_ver_x(GByteArray *st, guint16 value)
{
    g_return_if_fail(st != NULL);
    fu_memwrite_uint16(st->data + 22, value, G_LITTLE_ENDIAN);
}
/**
 * fu_struct_synaptics_cape_hid_hdr_set_ver_y: (skip):
 **/
void
fu_struct_synaptics_cape_hid_hdr_set_ver_y(GByteArray *st, guint16 value)
{
    g_return_if_fail(st != NULL);
    fu_memwrite_uint16(st->data + 24, value, G_LITTLE_ENDIAN);
}
/**
 * fu_struct_synaptics_cape_hid_hdr_set_ver_z: (skip):
 **/
void
fu_struct_synaptics_cape_hid_hdr_set_ver_z(GByteArray *st, guint16 value)
{
    g_return_if_fail(st != NULL);
    fu_memwrite_uint16(st->data + 26, value, G_LITTLE_ENDIAN);
}
/**
 * fu_struct_synaptics_cape_hid_hdr_new: (skip):
 **/
GByteArray *
fu_struct_synaptics_cape_hid_hdr_new(void)
{
    GByteArray *st = g_byte_array_sized_new(32);
    fu_byte_array_set_size(st, 32, 0x0);
    fu_struct_synaptics_cape_hid_hdr_set_signature(st, 0x43534645);
    return st;
}
/**
 * fu_struct_synaptics_cape_hid_hdr_to_string: (skip):
 **/
static gchar *
fu_struct_synaptics_cape_hid_hdr_to_string(const GByteArray *st)
{
    g_autoptr(GString) str = g_string_new("SynapticsCapeHidHdr:\n");
    g_return_val_if_fail(st != NULL, NULL);
    g_string_append_printf(str, "  vid: 0x%x\n",
                           (guint) fu_struct_synaptics_cape_hid_hdr_get_vid(st));
    g_string_append_printf(str, "  pid: 0x%x\n",
                           (guint) fu_struct_synaptics_cape_hid_hdr_get_pid(st));
    g_string_append_printf(str, "  update_type: 0x%x\n",
                           (guint) fu_struct_synaptics_cape_hid_hdr_get_update_type(st));
    g_string_append_printf(str, "  crc: 0x%x\n",
                           (guint) fu_struct_synaptics_cape_hid_hdr_get_crc(st));
    g_string_append_printf(str, "  ver_w: 0x%x\n",
                           (guint) fu_struct_synaptics_cape_hid_hdr_get_ver_w(st));
    g_string_append_printf(str, "  ver_x: 0x%x\n",
                           (guint) fu_struct_synaptics_cape_hid_hdr_get_ver_x(st));
    g_string_append_printf(str, "  ver_y: 0x%x\n",
                           (guint) fu_struct_synaptics_cape_hid_hdr_get_ver_y(st));
    g_string_append_printf(str, "  ver_z: 0x%x\n",
                           (guint) fu_struct_synaptics_cape_hid_hdr_get_ver_z(st));
    if (str->len > 0)
        g_string_set_size(str, str->len - 1);
    return g_string_free(g_steal_pointer(&str), FALSE);
}
/**
 * fu_struct_synaptics_cape_hid_hdr_parse: (skip):
 **/
static GByteArray *
fu_struct_synaptics_cape_hid_hdr_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error)
{
    g_autoptr(GByteArray) st = g_byte_array_new();
    g_autofree gchar *str = NULL;
    g_return_val_if_fail(buf != NULL, NULL);
    g_return_val_if_fail(error == NULL || *error == NULL, NULL);
    if (!fu_memchk_read(bufsz, offset, 32, error)) {
        g_prefix_error(error, "invalid struct SynapticsCapeHidHdr: ");
        return NULL;
    }
    g_byte_array_append(st, buf + offset, 32);
    if (fu_struct_synaptics_cape_hid_hdr_get_signature(st) != 0x43534645) {
        g_set_error_literal(error,
                            G_IO_ERROR,
                            G_IO_ERROR_INVALID_DATA,
                            "constant SynapticsCapeHidHdr.signature was not valid, expected 0x43534645");
        return NULL;
    }
    str = fu_struct_synaptics_cape_hid_hdr_to_string(st);
    g_debug("%s", str);
    return g_steal_pointer(&st);
}
/**
 * fu_struct_synaptics_cape_hid_hdr_parse_bytes: (skip):
 **/
GByteArray *
fu_struct_synaptics_cape_hid_hdr_parse_bytes(GBytes *blob, gsize offset, GError **error)
{
    gsize bufsz = 0;
    const guint8 *buf = g_bytes_get_data(blob, &bufsz);
    return fu_struct_synaptics_cape_hid_hdr_parse(buf, bufsz, offset, error);
}
/* getters */
/**
 * fu_struct_synaptics_cape_sngl_hdr_get_magic: (skip):
 **/
static guint32
fu_struct_synaptics_cape_sngl_hdr_get_magic(const GByteArray *st)
{
    g_return_val_if_fail(st != NULL, 0x0);
    return fu_memread_uint32(st->data + 0, G_LITTLE_ENDIAN);
}
/**
 * fu_struct_synaptics_cape_sngl_hdr_get_file_crc: (skip):
 **/
guint32
fu_struct_synaptics_cape_sngl_hdr_get_file_crc(const GByteArray *st)
{
    g_return_val_if_fail(st != NULL, 0x0);
    return fu_memread_uint32(st->data + 4, G_LITTLE_ENDIAN);
}
/**
 * fu_struct_synaptics_cape_sngl_hdr_get_file_size: (skip):
 **/
guint32
fu_struct_synaptics_cape_sngl_hdr_get_file_size(const GByteArray *st)
{
    g_return_val_if_fail(st != NULL, 0x0);
    return fu_memread_uint32(st->data + 8, G_LITTLE_ENDIAN);
}
/**
 * fu_struct_synaptics_cape_sngl_hdr_get_magic2: (skip):
 **/
guint32
fu_struct_synaptics_cape_sngl_hdr_get_magic2(const GByteArray *st)
{
    g_return_val_if_fail(st != NULL, 0x0);
    return fu_memread_uint32(st->data + 12, G_LITTLE_ENDIAN);
}
/**
 * fu_struct_synaptics_cape_sngl_hdr_get_img_type: (skip):
 **/
guint32
fu_struct_synaptics_cape_sngl_hdr_get_img_type(const GByteArray *st)
{
    g_return_val_if_fail(st != NULL, 0x0);
    return fu_memread_uint32(st->data + 16, G_LITTLE_ENDIAN);
}
/**
 * fu_struct_synaptics_cape_sngl_hdr_get_fw_version: (skip):
 **/
guint32
fu_struct_synaptics_cape_sngl_hdr_get_fw_version(const GByteArray *st)
{
    g_return_val_if_fail(st != NULL, 0x0);
    return fu_memread_uint32(st->data + 20, G_LITTLE_ENDIAN);
}
/**
 * fu_struct_synaptics_cape_sngl_hdr_get_vid: (skip):
 **/
guint16
fu_struct_synaptics_cape_sngl_hdr_get_vid(const GByteArray *st)
{
    g_return_val_if_fail(st != NULL, 0x0);
    return fu_memread_uint16(st->data + 24, G_LITTLE_ENDIAN);
}
/**
 * fu_struct_synaptics_cape_sngl_hdr_get_pid: (skip):
 **/
guint16
fu_struct_synaptics_cape_sngl_hdr_get_pid(const GByteArray *st)
{
    g_return_val_if_fail(st != NULL, 0x0);
    return fu_memread_uint16(st->data + 26, G_LITTLE_ENDIAN);
}
/**
 * fu_struct_synaptics_cape_sngl_hdr_get_fw_file_num: (skip):
 **/
guint32
fu_struct_synaptics_cape_sngl_hdr_get_fw_file_num(const GByteArray *st)
{
    g_return_val_if_fail(st != NULL, 0x0);
    return fu_memread_uint32(st->data + 28, G_LITTLE_ENDIAN);
}
/**
 * fu_struct_synaptics_cape_sngl_hdr_get_version: (skip):
 **/
guint32
fu_struct_synaptics_cape_sngl_hdr_get_version(const GByteArray *st)
{
    g_return_val_if_fail(st != NULL, 0x0);
    return fu_memread_uint32(st->data + 32, G_LITTLE_ENDIAN);
}
/**
 * fu_struct_synaptics_cape_sngl_hdr_get_fw_crc: (skip):
 **/
guint32
fu_struct_synaptics_cape_sngl_hdr_get_fw_crc(const GByteArray *st)
{
    g_return_val_if_fail(st != NULL, 0x0);
    return fu_memread_uint32(st->data + 36, G_LITTLE_ENDIAN);
}
/**
 * fu_struct_synaptics_cape_sngl_hdr_get_machine_name: (skip):
 **/
gchar *
fu_struct_synaptics_cape_sngl_hdr_get_machine_name(const GByteArray *st)
{
    g_return_val_if_fail(st != NULL, NULL);
    return fu_memstrsafe(st->data, st->len, 48, 16, NULL);
}
/**
 * fu_struct_synaptics_cape_sngl_hdr_get_time_stamp: (skip):
 **/
gchar *
fu_struct_synaptics_cape_sngl_hdr_get_time_stamp(const GByteArray *st)
{
    g_return_val_if_fail(st != NULL, NULL);
    return fu_memstrsafe(st->data, st->len, 64, 16, NULL);
}

/* setters */
/**
 * fu_struct_synaptics_cape_sngl_hdr_set_magic: (skip):
 **/
static void
fu_struct_synaptics_cape_sngl_hdr_set_magic(GByteArray *st, guint32 value)
{
    g_return_if_fail(st != NULL);
    fu_memwrite_uint32(st->data + 0, value, G_LITTLE_ENDIAN);
}
/**
 * fu_struct_synaptics_cape_sngl_hdr_set_file_crc: (skip):
 **/
void
fu_struct_synaptics_cape_sngl_hdr_set_file_crc(GByteArray *st, guint32 value)
{
    g_return_if_fail(st != NULL);
    fu_memwrite_uint32(st->data + 4, value, G_LITTLE_ENDIAN);
}
/**
 * fu_struct_synaptics_cape_sngl_hdr_set_file_size: (skip):
 **/
void
fu_struct_synaptics_cape_sngl_hdr_set_file_size(GByteArray *st, guint32 value)
{
    g_return_if_fail(st != NULL);
    fu_memwrite_uint32(st->data + 8, value, G_LITTLE_ENDIAN);
}
/**
 * fu_struct_synaptics_cape_sngl_hdr_set_magic2: (skip):
 **/
void
fu_struct_synaptics_cape_sngl_hdr_set_magic2(GByteArray *st, guint32 value)
{
    g_return_if_fail(st != NULL);
    fu_memwrite_uint32(st->data + 12, value, G_LITTLE_ENDIAN);
}
/**
 * fu_struct_synaptics_cape_sngl_hdr_set_img_type: (skip):
 **/
void
fu_struct_synaptics_cape_sngl_hdr_set_img_type(GByteArray *st, guint32 value)
{
    g_return_if_fail(st != NULL);
    fu_memwrite_uint32(st->data + 16, value, G_LITTLE_ENDIAN);
}
/**
 * fu_struct_synaptics_cape_sngl_hdr_set_fw_version: (skip):
 **/
void
fu_struct_synaptics_cape_sngl_hdr_set_fw_version(GByteArray *st, guint32 value)
{
    g_return_if_fail(st != NULL);
    fu_memwrite_uint32(st->data + 20, value, G_LITTLE_ENDIAN);
}
/**
 * fu_struct_synaptics_cape_sngl_hdr_set_vid: (skip):
 **/
void
fu_struct_synaptics_cape_sngl_hdr_set_vid(GByteArray *st, guint16 value)
{
    g_return_if_fail(st != NULL);
    fu_memwrite_uint16(st->data + 24, value, G_LITTLE_ENDIAN);
}
/**
 * fu_struct_synaptics_cape_sngl_hdr_set_pid: (skip):
 **/
void
fu_struct_synaptics_cape_sngl_hdr_set_pid(GByteArray *st, guint16 value)
{
    g_return_if_fail(st != NULL);
    fu_memwrite_uint16(st->data + 26, value, G_LITTLE_ENDIAN);
}
/**
 * fu_struct_synaptics_cape_sngl_hdr_set_fw_file_num: (skip):
 **/
void
fu_struct_synaptics_cape_sngl_hdr_set_fw_file_num(GByteArray *st, guint32 value)
{
    g_return_if_fail(st != NULL);
    fu_memwrite_uint32(st->data + 28, value, G_LITTLE_ENDIAN);
}
/**
 * fu_struct_synaptics_cape_sngl_hdr_set_version: (skip):
 **/
void
fu_struct_synaptics_cape_sngl_hdr_set_version(GByteArray *st, guint32 value)
{
    g_return_if_fail(st != NULL);
    fu_memwrite_uint32(st->data + 32, value, G_LITTLE_ENDIAN);
}
/**
 * fu_struct_synaptics_cape_sngl_hdr_set_fw_crc: (skip):
 **/
void
fu_struct_synaptics_cape_sngl_hdr_set_fw_crc(GByteArray *st, guint32 value)
{
    g_return_if_fail(st != NULL);
    fu_memwrite_uint32(st->data + 36, value, G_LITTLE_ENDIAN);
}
/**
 * fu_struct_synaptics_cape_sngl_hdr_set_machine_name: (skip):
 **/
gboolean
fu_struct_synaptics_cape_sngl_hdr_set_machine_name(GByteArray *st, const gchar *value, GError **error)
{
    gsize len;
    g_return_val_if_fail(st != NULL, FALSE);
    g_return_val_if_fail(error == NULL || *error == NULL, FALSE);
    if (value == NULL) {
        memset(st->data + 48, 0x0, 16);
        return TRUE;
    }
    len = strlen(value);
    if (len > 16) {
        g_set_error(error,
                    G_IO_ERROR,
                    G_IO_ERROR_INVALID_DATA,
                    "string '%s' (0x%x bytes) does not fit in SynapticsCapeSnglHdr.machine_name (0x%x bytes)",
                    value, (guint) len, (guint) 16);
        return FALSE;
    }
    return fu_memcpy_safe(st->data, st->len, 48, (const guint8 *)value, len, 0x0, len, error);
}
/**
 * fu_struct_synaptics_cape_sngl_hdr_set_time_stamp: (skip):
 **/
gboolean
fu_struct_synaptics_cape_sngl_hdr_set_time_stamp(GByteArray *st, const gchar *value, GError **error)
{
    gsize len;
    g_return_val_if_fail(st != NULL, FALSE);
    g_return_val_if_fail(error == NULL || *error == NULL, FALSE);
    if (value == NULL) {
        memset(st->data + 64, 0x0, 16);
        return TRUE;
    }
    len = strlen(value);
    if (len > 16) {
        g_set_error(error,
                    G_IO_ERROR,
                    G_IO_ERROR_INVALID_DATA,
                    "string '%s' (0x%x bytes) does not fit in SynapticsCapeSnglHdr.time_stamp (0x%x bytes)",
                    value, (guint) len, (guint) 16);
        return FALSE;
    }
    return fu_memcpy_safe(st->data, st->len, 64, (const guint8 *)value, len, 0x0, len, error);
}
/**
 * fu_struct_synaptics_cape_sngl_hdr_new: (skip):
 **/
GByteArray *
fu_struct_synaptics_cape_sngl_hdr_new(void)
{
    GByteArray *st = g_byte_array_sized_new(80);
    fu_byte_array_set_size(st, 80, 0x0);
    fu_struct_synaptics_cape_sngl_hdr_set_magic(st, 0x4C474E53);
    return st;
}
/**
 * fu_struct_synaptics_cape_sngl_hdr_to_string: (skip):
 **/
static gchar *
fu_struct_synaptics_cape_sngl_hdr_to_string(const GByteArray *st)
{
    g_autoptr(GString) str = g_string_new("SynapticsCapeSnglHdr:\n");
    g_return_val_if_fail(st != NULL, NULL);
    g_string_append_printf(str, "  file_crc: 0x%x\n",
                           (guint) fu_struct_synaptics_cape_sngl_hdr_get_file_crc(st));
    g_string_append_printf(str, "  file_size: 0x%x\n",
                           (guint) fu_struct_synaptics_cape_sngl_hdr_get_file_size(st));
    g_string_append_printf(str, "  magic2: 0x%x\n",
                           (guint) fu_struct_synaptics_cape_sngl_hdr_get_magic2(st));
    g_string_append_printf(str, "  img_type: 0x%x\n",
                           (guint) fu_struct_synaptics_cape_sngl_hdr_get_img_type(st));
    g_string_append_printf(str, "  fw_version: 0x%x\n",
                           (guint) fu_struct_synaptics_cape_sngl_hdr_get_fw_version(st));
    g_string_append_printf(str, "  vid: 0x%x\n",
                           (guint) fu_struct_synaptics_cape_sngl_hdr_get_vid(st));
    g_string_append_printf(str, "  pid: 0x%x\n",
                           (guint) fu_struct_synaptics_cape_sngl_hdr_get_pid(st));
    g_string_append_printf(str, "  fw_file_num: 0x%x\n",
                           (guint) fu_struct_synaptics_cape_sngl_hdr_get_fw_file_num(st));
    g_string_append_printf(str, "  version: 0x%x\n",
                           (guint) fu_struct_synaptics_cape_sngl_hdr_get_version(st));
    g_string_append_printf(str, "  fw_crc: 0x%x\n",
                           (guint) fu_struct_synaptics_cape_sngl_hdr_get_fw_crc(st));
    {
        g_autofree gchar *tmp = fu_struct_synaptics_cape_sngl_hdr_get_machine_name(st);
        if (tmp != NULL)
            g_string_append_printf(str, "  machine_name: %s\n", tmp);
    }
    {
        g_autofree gchar *tmp = fu_struct_synaptics_cape_sngl_hdr_get_time_stamp(st);
        if (tmp != NULL)
            g_string_append_printf(str, "  time_stamp: %s\n", tmp);
    }
    if (str->len > 0)
        g_string_set_size(str, str->len - 1);
    return g_string_free(g_steal_pointer(&str), FALSE);
}
/**
 * fu_struct_synaptics_cape_sngl_hdr_parse: (skip):
 **/
static GByteArray *
fu_struct_synaptics_cape_sngl_hdr_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error)
{
    g_autoptr(GByteArray) st = g_byte_array_new();
    g_autofree gchar *str = NULL;
    g_return_val_if_fail(buf != NULL, NULL);
    g_return_val_if_fail(error == NULL || *error == NULL, NULL);
    if (!fu_memchk_read(bufsz, offset, 80, error)) {
        g_prefix_error(error, "invalid struct SynapticsCapeSnglHdr: ");
        return NULL;
    }
    g_byte_array_append(st, buf + offset, 80);
    if (fu_struct_synaptics_cape_sngl_hdr_get_magic(st) != 0x4C474E53) {
        g_set_error_literal(error,
                            G_IO_ERROR,
                            G_IO_ERROR_INVALID_DATA,
                            "constant SynapticsCapeSnglHdr.magic was not valid, expected 0x4C474E53");
        return NULL;
    }
    str = fu_struct_synaptics_cape_sngl_hdr_to_string(st);
    g_debug("%s", str);
    return g_steal_pointer(&st);
}
/**
 * fu_struct_synaptics_cape_sngl_hdr_parse_bytes: (skip):
 **/
GByteArray *
fu_struct_synaptics_cape_sngl_hdr_parse_bytes(GBytes *blob, gsize offset, GError **error)
{
    gsize bufsz = 0;
    const guint8 *buf = g_bytes_get_data(blob, &bufsz);
    return fu_struct_synaptics_cape_sngl_hdr_parse(buf, bufsz, offset, error);
}
/* getters */

/* setters */
