Class

FwupdPluginContext

Description [src]

class FwupdPlugin.Context : GObject.Object {
  parent_instance: GObject
}

A context that represents the shared system state. This object is shared between the engine, the plugins and the devices.

Ancestors

Constructors

fu_context_new

Creates a new FuContext.

since: 1.6.0

Instance methods

fu_context_add_compile_version

Sets a compile-time version of a specific dependency.

since: 1.6.0

fu_context_add_esp_volume

Adds an ESP volume location.

since: 1.8.5

fu_context_add_firmware_gtype

Adds a firmware GType which is used when creating devices. If id is not specified then it is guessed using the GType name.

since: 1.6.0

fu_context_add_flag

Adds a specific flag to the context.

since: 1.8.5

fu_context_add_quirk_key

Adds a possible quirk key. If added by a plugin it should be namespaced using the plugin name, where possible.

since: 1.6.0

fu_context_add_runtime_version

Sets a runtime version of a specific dependency.

since: 1.6.0

fu_context_add_udev_subsystem

Registers the udev subsystem to be watched by the daemon.

since: 1.6.0

fu_context_get_battery_level

Gets the system battery level in percent.

since: 1.6.0

fu_context_get_battery_threshold

Gets the system battery threshold in percent.

since: 1.6.0

fu_context_get_bios_setting

Finds out if a system supports a given BIOS setting.

since: 1.8.4

fu_context_get_bios_setting_pending_reboot

Determine if updates to BIOS settings are pending until next boot.

since: 1.8.4

fu_context_get_bios_settings

Returns all the firmware attributes defined in the system.

since: 1.8.4

fu_context_get_chassis_kind

Gets the chassis kind, if known.

since: 1.8.10

fu_context_get_esp_volumes

Finds all volumes that could be an ESP.

since: 1.8.5

fu_context_get_fdt

Gets and parses the system FDT, aka. the Flat Device Tree.

since: 1.8.10

fu_context_get_firmware_gtype_by_id

Returns the GType using the firmware id.

since: 1.6.0

fu_context_get_firmware_gtype_ids

Returns all the firmware GType IDs.

since: 1.6.0

fu_context_get_hwid_guids

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

fu_context_get_hwid_replace_value

Gets the replacement value for a specific key. All hardware IDs on a specific system can be shown using the fwupdmgr hwids command.

since: 1.6.0

fu_context_get_hwid_value

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

since: 1.6.0

fu_context_get_hwids

Gets the HWIDs store.

since: 1.8.10

fu_context_get_lid_state

Gets the laptop lid state, if applicable.

since: 1.7.4

fu_context_get_power_state

Gets if the system is on battery power, e.g. UPS or laptop battery.

since: 1.8.11

fu_context_get_smbios

Gets the SMBIOS store.

since: 1.8.10

fu_context_get_smbios_data

Gets a hardware SMBIOS data.

since: 1.6.0

fu_context_get_smbios_integer

Reads an integer value from the SMBIOS string table of a specific structure.

since: 1.6.0

fu_context_get_smbios_string

Gets a hardware SMBIOS string.

since: 1.6.0

fu_context_get_udev_subsystems

Gets the udev subsystems required by all plugins.

since: 1.6.0

fu_context_has_flag

Finds if the context has a specific flag.

since: 1.8.5

fu_context_has_hwid_flag

Returns if a HwId custom flag exists, typically added from a DMI quirk.

since: 1.7.2

fu_context_has_hwid_guid

Finds out if a hardware GUID exists.

since: 1.6.0

fu_context_load_hwinfo

Loads all hardware information parts of the context.

since: 1.8.10

fu_context_load_quirks

Loads all quirks into the context.

since: 1.6.0

fu_context_lookup_quirk_by_id

Looks up an entry in the hardware database using a string value.

since: 1.6.0

fu_context_lookup_quirk_by_id_iter

Looks up all entries in the hardware database using a GUID value.

since: 1.6.0

fu_context_reload_bios_settings

Refreshes the list of firmware attributes on the system.

since: 1.8.4

fu_context_remove_flag

Removes a specific flag from the context.

since: 1.8.10

fu_context_security_changed

Informs the daemon that the HSI state may have changed.

since: 1.6.0

fu_context_set_battery_level

Sets the system battery level in percent.

since: 1.6.0

fu_context_set_battery_threshold

Sets the system battery threshold in percent.

since: 1.6.0

fu_context_set_chassis_kind

Sets the chassis kind.

since: 1.8.10

fu_context_set_compile_versions

Sets the compile time versions for a plugin.

since: 1.6.0

fu_context_set_lid_state

Sets the laptop lid state, if applicable.

since: 1.7.4

fu_context_set_power_state

Sets if the system is on battery power, e.g. UPS or laptop battery.

since: 1.8.11

fu_context_set_runtime_versions

Sets the runtime versions for a plugin.

since: 1.6.0

Methods inherited from GObject (43)

Please see GObject for a full list of methods.

Properties

FwupdPlugin.Context:battery-level

The system battery level in percent.

since: 1.6.0

FwupdPlugin.Context:battery-threshold

The system battery threshold in percent.

since: 1.6.0

FwupdPlugin.Context:flags

The context flags.

since: 1.8.10

FwupdPlugin.Context:lid-state

The system lid state.

since: 1.7.4

FwupdPlugin.Context:power-state

The system power state.

since: 1.8.11

Signals

FwupdPlugin.Context::security-changed

The ::security-changed signal is emitted when some system state has changed that could have affected the security level.

since: 1.6.0

Signals inherited from GObject (1)
GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

Class structure

struct FwupdPluginContextClass {
  GObjectClass parent_class;
  void (* security_changed) (
    FuContext* self
  );
  
}
No description available.
Class members
parent_class: GObjectClass
No description available.
security_changed: void (* security_changed) ( FuContext* self )
No description available.

Virtual methods

FwupdPlugin.ContextClass.security_changed

Informs the daemon that the HSI state may have changed.

since: 1.6.0