fu-hwids

fu-hwids

Functions

FuHwids * fu_hwids_new ()
GPtrArray * fu_hwids_get_keys ()
const gchar * fu_hwids_get_value ()
void fu_hwids_add_smbios_override ()
const gchar * fu_hwids_get_replace_keys ()
gchar * fu_hwids_get_replace_values ()
gchar * fu_hwids_get_guid ()
GPtrArray * fu_hwids_get_guids ()
gboolean fu_hwids_has_guid ()
gboolean fu_hwids_setup ()

Types and Values

Description

Functions

fu_hwids_new ()

FuHwids *
fu_hwids_new (void);

Creates a new FuHwids

Since: 0.9.3


fu_hwids_get_keys ()

GPtrArray *
fu_hwids_get_keys (FuHwids *self);

Returns all the defined HWID keys.

Parameters

self

A FuHwids

 

Returns

All the known keys, e.g. FU_HWIDS_KEY_FAMILY.

[transfer container][element-type utf8]

Since: 1.5.6


fu_hwids_get_value ()

const gchar *
fu_hwids_get_value (FuHwids *self,
                    const gchar *key);

Gets the cached value for one specific key that is valid ASCII and suitable for display.

Parameters

self

A FuHwids

 

key

A DMI ID, e.g. BiosVersion

 

Returns

the string, e.g. 1.2.3, or NULL if not found

Since: 0.9.3


fu_hwids_add_smbios_override ()

void
fu_hwids_add_smbios_override (FuHwids *self,
                              const gchar *key,
                              const gchar *value);

Sets SMBIOS override values so you can emulate another system.

This function has no effect if called after fu_hwids_setup()

Parameters

self

A FuHwids

 

key

A key, e.g. FU_HWIDS_KEY_PRODUCT_SKU

 

value

A new value, e.g. "ExampleModel" or NULL.

[nullable]

Since: 1.5.6


fu_hwids_get_replace_keys ()

const gchar *
fu_hwids_get_replace_keys (FuHwids *self,
                           const gchar *key);

Gets the replacement key for a well known value.

Parameters

self

A FuHwids

 

key

A HardwareID key, e.g. HardwareID-3

 

Returns

the replacement value, e.g. Manufacturer&ProductName, or NULL for error.

Since: 0.9.3


fu_hwids_get_replace_values ()

gchar *
fu_hwids_get_replace_values (FuHwids *self,
                             const gchar *keys,
                             GError **error);

Gets the replacement values for a HardwareID key or plain key.

Parameters

self

A FuHwids

 

keys

A key, e.g. HardwareID-3 or FU_HWIDS_KEY_PRODUCT_SKU

 

error

A GError or NULL

 

Returns

a string, e.g. LENOVO&ThinkPad T440s, or NULL for error.

Since: 0.9.3


fu_hwids_get_guid ()

gchar *
fu_hwids_get_guid (FuHwids *self,
                   const gchar *keys,
                   GError **error);

Gets the GUID for a specific key.

Parameters

self

A FuHwids

 

keys

A key, e.g. HardwareID-3 or FU_HWIDS_KEY_PRODUCT_SKU

 

error

A GError or NULL

 

Returns

a string, or NULL for error.

Since: 0.9.3


fu_hwids_get_guids ()

GPtrArray *
fu_hwids_get_guids (FuHwids *self);

Returns all the defined HWIDs

Parameters

self

A FuHwids

 

Returns

An array of GUIDs.

[transfer none][element-type utf8]

Since: 0.9.3


fu_hwids_has_guid ()

gboolean
fu_hwids_has_guid (FuHwids *self,
                   const gchar *guid);

Finds out if a hardware GUID exists.

Parameters

self

A FuHwids

 

guid

A GUID, e.g. 059eb22d-6dc7-59af-abd3-94bbe017f67c

 

Returns

TRUE if the GUID exists

Since: 0.9.3


fu_hwids_setup ()

gboolean
fu_hwids_setup (FuHwids *self,
                FuSmbios *smbios,
                GError **error);

Reads all the SMBIOS values from the hardware.

Parameters

self

A FuHwids

 

smbios

A FuSmbios or NULL.

[nullable]

error

A GError or NULL

 

Returns

TRUE for success

Since: 0.9.3

Types and Values

FU_TYPE_HWIDS

#define FU_TYPE_HWIDS (fu_hwids_get_type ())

FU_HWIDS_KEY_BASEBOARD_MANUFACTURER

#define FU_HWIDS_KEY_BASEBOARD_MANUFACTURER "BaseboardManufacturer"

FU_HWIDS_KEY_BASEBOARD_PRODUCT

#define FU_HWIDS_KEY_BASEBOARD_PRODUCT		"BaseboardProduct"

FU_HWIDS_KEY_BIOS_MAJOR_RELEASE

#define FU_HWIDS_KEY_BIOS_MAJOR_RELEASE		"BiosMajorRelease"

FU_HWIDS_KEY_BIOS_MINOR_RELEASE

#define FU_HWIDS_KEY_BIOS_MINOR_RELEASE		"BiosMinorRelease"

FU_HWIDS_KEY_BIOS_VENDOR

#define FU_HWIDS_KEY_BIOS_VENDOR		"BiosVendor"

FU_HWIDS_KEY_BIOS_VERSION

#define FU_HWIDS_KEY_BIOS_VERSION		"BiosVersion"

FU_HWIDS_KEY_ENCLOSURE_KIND

#define FU_HWIDS_KEY_ENCLOSURE_KIND		"EnclosureKind"

FU_HWIDS_KEY_FAMILY

#define FU_HWIDS_KEY_FAMILY			"Family"

FU_HWIDS_KEY_MANUFACTURER

#define FU_HWIDS_KEY_MANUFACTURER		"Manufacturer"

FU_HWIDS_KEY_PRODUCT_NAME

#define FU_HWIDS_KEY_PRODUCT_NAME		"ProductName"

FU_HWIDS_KEY_PRODUCT_SKU

#define FU_HWIDS_KEY_PRODUCT_SKU		"ProductSku"

FuHwids

typedef struct _FuHwids FuHwids;