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

#pragma once
#include <fu-input-stream.h>
/**
 * FuCfuOfferComponentId:
 */
typedef enum {
    /**
     * FU_CFU_OFFER_COMPONENT_ID_NOT_USED:
     */
    FU_CFU_OFFER_COMPONENT_ID_NOT_USED = 0,
    /**
     * FU_CFU_OFFER_COMPONENT_ID_OFFER_INFORMATION:
     *
     * values in between are either valid or reserved
     */
    FU_CFU_OFFER_COMPONENT_ID_OFFER_INFORMATION = 0xFF,
    /**
     * FU_CFU_OFFER_COMPONENT_ID_OFFER_INFORMATION2:
     */
    FU_CFU_OFFER_COMPONENT_ID_OFFER_INFORMATION2 = 0xFE,
}  FuCfuOfferComponentId;
typedef struct {
  GByteArray *buf;
  guint refcount;
} FuStructCfuPayload;

FuStructCfuPayload *fu_struct_cfu_payload_ref(FuStructCfuPayload *st) G_GNUC_NON_NULL(1);
void fu_struct_cfu_payload_unref(FuStructCfuPayload *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructCfuPayload, fu_struct_cfu_payload_unref)
FuStructCfuPayload *fu_struct_cfu_payload_new(void) G_GNUC_WARN_UNUSED_RESULT;
FuStructCfuPayload *fu_struct_cfu_payload_parse_stream(GInputStream *stream, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_cfu_payload_get_addr(const FuStructCfuPayload *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_cfu_payload_get_size(const FuStructCfuPayload *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_cfu_payload_set_addr(FuStructCfuPayload *st, guint32 value) G_GNUC_NON_NULL(1);
void fu_struct_cfu_payload_set_size(FuStructCfuPayload *st, guint8 value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_CFU_PAYLOAD_OFFSET_ADDR 0x0
#define FU_STRUCT_CFU_PAYLOAD_OFFSET_SIZE 0x4
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_CFU_PAYLOAD_SIZE 0x5
#endif

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

FuStructCfuOffer *fu_struct_cfu_offer_ref(FuStructCfuOffer *st) G_GNUC_NON_NULL(1);
void fu_struct_cfu_offer_unref(FuStructCfuOffer *st) G_GNUC_NON_NULL(1);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FuStructCfuOffer, fu_struct_cfu_offer_unref)
FuStructCfuOffer *fu_struct_cfu_offer_new(void) G_GNUC_WARN_UNUSED_RESULT;
FuStructCfuOffer *fu_struct_cfu_offer_parse_stream(GInputStream *stream, gsize offset, GError **error) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_cfu_offer_get_segment_number(const FuStructCfuOffer *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_cfu_offer_get_flags1(const FuStructCfuOffer *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
FuCfuOfferComponentId fu_struct_cfu_offer_get_component_id(const FuStructCfuOffer *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_cfu_offer_get_token(const FuStructCfuOffer *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_cfu_offer_get_version(const FuStructCfuOffer *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint32 fu_struct_cfu_offer_get_compat_variant_mask(const FuStructCfuOffer *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_cfu_offer_get_flags2(const FuStructCfuOffer *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint8 fu_struct_cfu_offer_get_flags3(const FuStructCfuOffer *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
guint16 fu_struct_cfu_offer_get_product_id(const FuStructCfuOffer *st) G_GNUC_NON_NULL(1) G_GNUC_WARN_UNUSED_RESULT;
void fu_struct_cfu_offer_set_segment_number(FuStructCfuOffer *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_struct_cfu_offer_set_flags1(FuStructCfuOffer *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_struct_cfu_offer_set_component_id(FuStructCfuOffer *st, FuCfuOfferComponentId value) G_GNUC_NON_NULL(1);
void fu_struct_cfu_offer_set_token(FuStructCfuOffer *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_struct_cfu_offer_set_version(FuStructCfuOffer *st, guint32 value) G_GNUC_NON_NULL(1);
void fu_struct_cfu_offer_set_compat_variant_mask(FuStructCfuOffer *st, guint32 value) G_GNUC_NON_NULL(1);
void fu_struct_cfu_offer_set_flags2(FuStructCfuOffer *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_struct_cfu_offer_set_flags3(FuStructCfuOffer *st, guint8 value) G_GNUC_NON_NULL(1);
void fu_struct_cfu_offer_set_product_id(FuStructCfuOffer *st, guint16 value) G_GNUC_NON_NULL(1);

#ifndef __GI_SCANNER__
#define FU_STRUCT_CFU_OFFER_OFFSET_SEGMENT_NUMBER 0x0
#define FU_STRUCT_CFU_OFFER_OFFSET_FLAGS1 0x1
#define FU_STRUCT_CFU_OFFER_OFFSET_COMPONENT_ID 0x2
#define FU_STRUCT_CFU_OFFER_OFFSET_TOKEN 0x3
#define FU_STRUCT_CFU_OFFER_OFFSET_VERSION 0x4
#define FU_STRUCT_CFU_OFFER_OFFSET_COMPAT_VARIANT_MASK 0x8
#define FU_STRUCT_CFU_OFFER_OFFSET_FLAGS2 0xC
#define FU_STRUCT_CFU_OFFER_OFFSET_FLAGS3 0xD
#define FU_STRUCT_CFU_OFFER_OFFSET_PRODUCT_ID 0xE
#endif

#ifndef __GI_SCANNER__
#define FU_STRUCT_CFU_OFFER_SIZE 0x10
#endif

#ifndef __GI_SCANNER__
#endif
