FuCfuOffer

FuCfuOffer

Functions

Types and Values

Description

Functions

fu_cfu_offer_new ()

FuFirmware *
fu_cfu_offer_new (void);

Creates a new FuFirmware for a CFU offer

Since: 1.7.0


fu_cfu_offer_get_segment_number ()

guint8
fu_cfu_offer_get_segment_number (FuCfuOffer *self);

Gets the part of the firmware that is being transferred.

Parameters

self

a FuCfuOffer

 

Returns

integer

Since: 1.7.0


fu_cfu_offer_get_force_immediate_reset ()

gboolean
fu_cfu_offer_get_force_immediate_reset
                               (FuCfuOffer *self);

Gets if the in-situ firmware should reset into the new firmware immediately, rather than waiting for the next time the device is replugged.

Parameters

self

a FuCfuOffer

 

Returns

boolean

Since: 1.7.0


fu_cfu_offer_get_force_ignore_version ()

gboolean
fu_cfu_offer_get_force_ignore_version (FuCfuOffer *self);

Gets if the in-situ firmware should ignore version mismatch (e.g. downgrade).

Parameters

self

a FuCfuOffer

 

Returns

boolean

Since: 1.7.0


fu_cfu_offer_get_component_id ()

guint8
fu_cfu_offer_get_component_id (FuCfuOffer *self);

Gets the component in the device to apply the firmware update.

Parameters

self

a FuCfuOffer

 

Returns

integer

Since: 1.7.0


fu_cfu_offer_get_token ()

guint8
fu_cfu_offer_get_token (FuCfuOffer *self);

Gets the token to identify the user specific software making the offer.

Parameters

self

a FuCfuOffer

 

Returns

integer

Since: 1.7.0


fu_cfu_offer_get_hw_variant ()

guint32
fu_cfu_offer_get_hw_variant (FuCfuOffer *self);

Gets the hardware variant bitmask corresponding with compatible firmware.

Parameters

self

a FuCfuOffer

 

Returns

integer

Since: 1.7.0


fu_cfu_offer_get_protocol_revision ()

guint8
fu_cfu_offer_get_protocol_revision (FuCfuOffer *self);

Gets the CFU protocol version.

Parameters

self

a FuCfuOffer

 

Returns

integer

Since: 1.7.0


fu_cfu_offer_get_bank ()

guint8
fu_cfu_offer_get_bank (FuCfuOffer *self);

Gets the bank register, used if multiple banks are supported.

Parameters

self

a FuCfuOffer

 

Returns

integer

Since: 1.7.0


fu_cfu_offer_get_milestone ()

guint8
fu_cfu_offer_get_milestone (FuCfuOffer *self);

Gets the milestone, which can be used as a version for example EV1, EVT etc.

Parameters

self

a FuCfuOffer

 

Returns

integer

Since: 1.7.0


fu_cfu_offer_get_product_id ()

guint16
fu_cfu_offer_get_product_id (FuCfuOffer *self);

Gets the product ID for this CFU image.

Parameters

self

a FuCfuOffer

 

Returns

integer

Since: 1.7.0


fu_cfu_offer_set_segment_number ()

void
fu_cfu_offer_set_segment_number (FuCfuOffer *self,
                                 guint8 segment_number);

Sets the part of the firmware that is being transferred.

Parameters

self

a FuCfuOffer

 

segment_number

integer

 

Since: 1.7.0


fu_cfu_offer_set_force_immediate_reset ()

void
fu_cfu_offer_set_force_immediate_reset
                               (FuCfuOffer *self,
                                gboolean force_immediate_reset);

Sets if the in-situ firmware should reset into the new firmware immediately, rather than waiting for the next time the device is replugged.

Parameters

self

a FuCfuOffer

 

force_immediate_reset

boolean

 

Since: 1.7.0


fu_cfu_offer_set_force_ignore_version ()

void
fu_cfu_offer_set_force_ignore_version (FuCfuOffer *self,
                                       gboolean force_ignore_version);

Sets if the in-situ firmware should ignore version mismatch (e.g. downgrade).

Parameters

self

a FuCfuOffer

 

force_ignore_version

boolean

 

Since: 1.7.0


fu_cfu_offer_set_component_id ()

void
fu_cfu_offer_set_component_id (FuCfuOffer *self,
                               guint8 component_id);

Sets the component in the device to apply the firmware update.

Parameters

self

a FuCfuOffer

 

component_id

integer

 

Since: 1.7.0


fu_cfu_offer_set_token ()

void
fu_cfu_offer_set_token (FuCfuOffer *self,
                        guint8 token);

Sets the token to identify the user specific software making the offer.

Parameters

self

a FuCfuOffer

 

token

integer

 

Since: 1.7.0


fu_cfu_offer_set_hw_variant ()

void
fu_cfu_offer_set_hw_variant (FuCfuOffer *self,
                             guint32 hw_variant);

Sets the hardware variant bitmask corresponding with compatible firmware.

Parameters

self

a FuCfuOffer

 

hw_variant

integer

 

Since: 1.7.0


fu_cfu_offer_set_protocol_revision ()

void
fu_cfu_offer_set_protocol_revision (FuCfuOffer *self,
                                    guint8 protocol_revision);

Sets the CFU protocol version.

Parameters

self

a FuCfuOffer

 

protocol_revision

integer

 

Since: 1.7.0


fu_cfu_offer_set_bank ()

void
fu_cfu_offer_set_bank (FuCfuOffer *self,
                       guint8 bank);

Sets bank register, used if multiple banks are supported.

Parameters

self

a FuCfuOffer

 

bank

integer

 

Since: 1.7.0


fu_cfu_offer_set_milestone ()

void
fu_cfu_offer_set_milestone (FuCfuOffer *self,
                            guint8 milestone);

Sets the milestone, which can be used as a version for example EV1, EVT etc.

Parameters

self

a FuCfuOffer

 

milestone

integer

 

Since: 1.7.0


fu_cfu_offer_set_product_id ()

void
fu_cfu_offer_set_product_id (FuCfuOffer *self,
                             guint16 product_id);

Sets the product ID for this CFU image.

Parameters

self

a FuCfuOffer

 

product_id

integer

 

Since: 1.7.0

Types and Values

FU_TYPE_CFU_OFFER

#define FU_TYPE_CFU_OFFER (fu_cfu_offer_get_type())

struct FuCfuOfferClass

struct FuCfuOfferClass {
	FuFirmwareClass parent_class;
};

FuCfuOffer

typedef struct _FuCfuOffer FuCfuOffer;

A CFU offer. This is a 16 byte blob which contains enough data for the device to either accept or refuse a firmware payload. The offer may be loaded from disk, network, or even constructed manually. There is much left to how the specific firmware implements CFU, and it's expected that multiple different plugins will use this offer in different ways.

Documented: https://docs.microsoft.com/en-us/windows-hardware/drivers/cfu/cfu-specification

See also: [classFuFirmware ]