fwupd/plugins/bcm57xx/fu-bcm57xx-dict-image.h
Richard Hughes 1981c63d58 Remove FuFirmwareImage and just use FuFirmware instead
This allows us to 'nest' firmware formats, and removes a ton of duplication.

The aim here is to deprecate FuFirmwareImage -- it's almost always acting
as a 'child' FuFirmware instance, and even copies most of the vfuncs to allow
custom types. If I'm struggling to work out what should be a FuFirmware and
what should be a FuFirmwareImage then a plugin author has no hope.

For simple payloads we were adding bytes into an image and then the image into
a firmware. This gets really messy when most plugins are treating the FuFirmware
*as* the binary firmware file.

The GBytes saved in the FuFirmware would be considered the payload with the
aim of not using FuFirmwareImage in the single-image case.
2021-03-09 21:14:12 +00:00

21 lines
692 B
C

/*
* Copyright (C) 2020 Richard Hughes <richard@hughsie.com>
*
* SPDX-License-Identifier: LGPL-2.1+
*/
#pragma once
#include "fu-firmware.h"
#define FU_TYPE_BCM57XX_DICT_IMAGE (fu_bcm57xx_dict_image_get_type ())
G_DECLARE_FINAL_TYPE (FuBcm57xxDictImage, fu_bcm57xx_dict_image, FU, BCM57XX_DICT_IMAGE, FuFirmware)
FuFirmware *fu_bcm57xx_dict_image_new (void);
void fu_bcm57xx_dict_image_set_kind (FuBcm57xxDictImage *self,
guint8 kind);
guint8 fu_bcm57xx_dict_image_get_kind (FuBcm57xxDictImage *self);
void fu_bcm57xx_dict_image_set_target (FuBcm57xxDictImage *self,
guint8 target);
guint8 fu_bcm57xx_dict_image_get_target (FuBcm57xxDictImage *self);