mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-05 00:38:35 +00:00

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.
26 lines
600 B
C
26 lines
600 B
C
/*
|
|
* Copyright (C) 2021 Richard Hughes <richard@hughsie.com>
|
|
*
|
|
* SPDX-License-Identifier: LGPL-2.1+
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "fu-firmware.h"
|
|
#include "fu-ifd-common.h"
|
|
|
|
#define FU_TYPE_IFD_IMAGE (fu_ifd_image_get_type ())
|
|
G_DECLARE_DERIVABLE_TYPE (FuIfdImage, fu_ifd_image, FU, IFD_IMAGE, FuFirmware)
|
|
|
|
struct _FuIfdImageClass
|
|
{
|
|
FuFirmwareClass parent_class;
|
|
};
|
|
|
|
FuFirmware *fu_ifd_image_new (void);
|
|
void fu_ifd_image_set_access (FuIfdImage *self,
|
|
FuIfdRegion region,
|
|
FuIfdAccess access);
|
|
FuIfdAccess fu_ifd_image_get_access (FuIfdImage *self,
|
|
FuIfdRegion region);
|