| Top |
| void | (*FuContextLookupIter) () |
| const gchar * | fu_context_get_smbios_string () |
| guint | fu_context_get_smbios_integer () |
| GBytes * | fu_context_get_smbios_data () |
| gboolean | fu_context_has_hwid_guid () |
| GPtrArray * | fu_context_get_hwid_guids () |
| gboolean | fu_context_has_hwid_flag () |
| const gchar * | fu_context_get_hwid_value () |
| gchar * | fu_context_get_hwid_replace_value () |
| void | fu_context_add_runtime_version () |
| void | fu_context_add_compile_version () |
| const gchar * | fu_context_lookup_quirk_by_id () |
| gboolean | fu_context_lookup_quirk_by_id_iter () |
| void | fu_context_add_quirk_key () |
| void | fu_context_security_changed () |
| FuBatteryState | fu_context_get_battery_state () |
| void | fu_context_set_battery_state () |
| guint | fu_context_get_battery_level () |
| void | fu_context_set_battery_level () |
| guint | fu_context_get_battery_threshold () |
| void | fu_context_set_battery_threshold () |
void (*FuContextLookupIter) (FuContext *self,const gchar *key,const gchar *value,gpointer user_data);
The context lookup iteration callback.
const gchar * fu_context_get_smbios_string (FuContext *self,guint8 structure_type,guint8 offset);
Gets a hardware SMBIOS string.
The type
and offset
can be referenced from the DMTF SMBIOS specification:
https://www.dmtf.org/sites/default/files/standards/documents/DSP0134_3.1.1.pdf
self |
||
structure_type |
a SMBIOS structure type, e.g. |
|
offset |
a SMBIOS offset |
Since: 1.6.0
guint fu_context_get_smbios_integer (FuContext *self,guint8 type,guint8 offset);
Reads an integer value from the SMBIOS string table of a specific structure.
The type
and offset
can be referenced from the DMTF SMBIOS specification:
https://www.dmtf.org/sites/default/files/standards/documents/DSP0134_3.1.1.pdf
Since: 1.6.0
GBytes * fu_context_get_smbios_data (FuContext *self,guint8 structure_type);
Gets a hardware SMBIOS data.
Since: 1.6.0
gboolean fu_context_has_hwid_guid (FuContext *self,const gchar *guid);
Finds out if a hardware GUID exists.
Since: 1.6.0
GPtrArray *
fu_context_get_hwid_guids (FuContext *self);
Returns all the HWIDs defined in the system. All hardware IDs on a
specific system can be shown using the fwupdmgr hwids command.
Since: 1.6.0
gboolean fu_context_has_hwid_flag (FuContext *self,const gchar *flag);
Returns if a HwId custom flag exists, typically added from a DMI quirk.
Since: 1.7.2
const gchar * fu_context_get_hwid_value (FuContext *self,const gchar *key);
Gets the cached value for one specific key that is valid ASCII and suitable for display.
Since: 1.6.0
gchar * fu_context_get_hwid_replace_value (FuContext *self,const gchar *keys,GError **error);
Gets the replacement value for a specific key. All hardware IDs on a
specific system can be shown using the fwupdmgr hwids command.
self |
||
keys |
a key, e.g. |
|
error |
optional return location for an error. |
[nullable] |
Since: 1.6.0
void fu_context_add_runtime_version (FuContext *self,const gchar *component_id,const gchar *version);
Sets a runtime version of a specific dependency.
self |
||
component_id |
an AppStream component id, e.g. |
|
version |
a version string, e.g. |
Since: 1.6.0
void fu_context_add_compile_version (FuContext *self,const gchar *component_id,const gchar *version);
Sets a compile-time version of a specific dependency.
self |
||
component_id |
an AppStream component id, e.g. |
|
version |
a version string, e.g. |
Since: 1.6.0
const gchar * fu_context_lookup_quirk_by_id (FuContext *self,const gchar *guid,const gchar *key);
Looks up an entry in the hardware database using a string value.
Since: 1.6.0
gboolean fu_context_lookup_quirk_by_id_iter (FuContext *self,const gchar *guid,FuContextLookupIter iter_cb,gpointer user_data);
Looks up all entries in the hardware database using a GUID value.
self |
||
guid |
GUID to lookup |
|
iter_cb |
a function to call for each result. |
[scope async] |
user_data |
user data passed to |
Since: 1.6.0
void fu_context_add_quirk_key (FuContext *self,const gchar *key);
Adds a possible quirk key. If added by a plugin it should be namespaced using the plugin name, where possible.
Plugins can use this method only in fu_plugin_init()
Since: 1.6.0
void
fu_context_security_changed (FuContext *self);
Informs the daemon that the HSI state may have changed.
Since: 1.6.0
FuBatteryState
fu_context_get_battery_state (FuContext *self);
Gets if the system is on battery power, e.g. UPS or laptop battery.
Since: 1.6.0
void fu_context_set_battery_state (FuContext *self,FuBatteryState battery_state);
Sets if the system is on battery power, e.g. UPS or laptop battery.
Since: 1.6.0
guint
fu_context_get_battery_level (FuContext *self);
Gets the system battery level in percent.
Since: 1.6.0
void fu_context_set_battery_level (FuContext *self,guint battery_level);
Sets the system battery level in percent.
Since: 1.6.0
guint
fu_context_get_battery_threshold (FuContext *self);
Gets the system battery threshold in percent.
Since: 1.6.0