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

#pragma once
#include <fu-input-stream.h>
/**
 * FuJabraFilePacketCmd:
 */
typedef enum {
    /**
     * FU_JABRA_FILE_PACKET_CMD_IDENTITY:
     */
    FU_JABRA_FILE_PACKET_CMD_IDENTITY = 0x02,
    /**
     * FU_JABRA_FILE_PACKET_CMD_FILE:
     */
    FU_JABRA_FILE_PACKET_CMD_FILE = 0x03,
    /**
     * FU_JABRA_FILE_PACKET_CMD_DFU:
     */
    FU_JABRA_FILE_PACKET_CMD_DFU = 0x07,
    /**
     * FU_JABRA_FILE_PACKET_CMD_VIDEO:
     */
    FU_JABRA_FILE_PACKET_CMD_VIDEO = 0x26,
    /**
     * FU_JABRA_FILE_PACKET_CMD_NACK:
     */
    FU_JABRA_FILE_PACKET_CMD_NACK = 0xFE,
    /**
     * FU_JABRA_FILE_PACKET_CMD_ACK:
     */
    FU_JABRA_FILE_PACKET_CMD_ACK = 0xFF,
}  FuJabraFilePacketCmd;
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuJabraFilePacket;

FuJabraFilePacket *fu_jabra_file_packet_ref(FuJabraFilePacket *st) G_GNUC_NON_NULL(1);
void fu_jabra_file_packet_unref(FuJabraFilePacket *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuJabraFilePacket, fu_jabra_file_packet_unref)
FuJabraFilePacket *fu_jabra_file_packet_new(void) G_GNUC_WARN_UNUSED_RESULT;
void fu_jabra_file_packet_set_dst(FuJabraFilePacket *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_jabra_file_packet_set_src(FuJabraFilePacket *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_jabra_file_packet_set_sequence_number(FuJabraFilePacket *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_jabra_file_packet_set_cmd_length(FuJabraFilePacket *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_jabra_file_packet_set_cmd(FuJabraFilePacket *st, FuJabraFilePacketCmd value) G_GNUC_NON_NULL(1);
void fu_jabra_file_packet_set_sub_cmd(FuJabraFilePacket *st, guint8 value) G_GNUC_NON_NULL(1);
gboolean fu_jabra_file_packet_set_payload(FuJabraFilePacket *st, const guint8 *buf, gsize bufsz, GError **error) G_GNUC_NON_NULL(1, 2) G_GNUC_WARN_UNUSED_RESULT;

#ifndef __GI_SCANNER__
#define FU_JABRA_FILE_PACKET_OFFSET_IFACE 0x0
#define FU_JABRA_FILE_PACKET_OFFSET_DST 0x1
#define FU_JABRA_FILE_PACKET_OFFSET_SRC 0x2
#define FU_JABRA_FILE_PACKET_OFFSET_SEQUENCE_NUMBER 0x3
#define FU_JABRA_FILE_PACKET_OFFSET_CMD_LENGTH 0x4
#define FU_JABRA_FILE_PACKET_OFFSET_CMD 0x5
#define FU_JABRA_FILE_PACKET_OFFSET_SUB_CMD 0x6
#define FU_JABRA_FILE_PACKET_OFFSET_PAYLOAD 0x7
#endif

#ifndef __GI_SCANNER__
#define FU_JABRA_FILE_PACKET_SIZE_PAYLOAD 0x39
#define FU_JABRA_FILE_PACKET_N_ELEMENTS_PAYLOAD 57
#define FU_JABRA_FILE_PACKET_SIZE 0x40
#endif

#ifndef __GI_SCANNER__
#define FU_JABRA_FILE_PACKET_DEFAULT_IFACE 0x05
#define FU_JABRA_FILE_PACKET_DEFAULT_CMD_LENGTH 0x46
#endif
