Fwupd.BiosSetting¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class Fwupd.BiosSetting(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
A BIOS setting that represents a setting in the firmware.
- classmethod array_from_variant(value)[source]¶
- Parameters:
value (
GLib.Variant
) – the serialized data- Returns:
attributes, or
None
if value was invalid.- Return type:
Creates an array of new bios settings using serialized data.
New in version 1.8.4.
- classmethod from_variant(value)[source]¶
- Parameters:
value (
GLib.Variant
) – the serialized data- Returns:
a new
Fwupd.BiosSetting
, orNone
if value was invalid.- Return type:
Creates a new bios setting using serialized data.
New in version 1.8.4.
- classmethod new(name, path)[source]¶
- Parameters:
- Returns:
a new
Fwupd.BiosSetting
.- Return type:
Creates a new bios setting.
New in version 1.8.4.
- add_possible_value(possible_value)[source]¶
- Parameters:
possible_value (
str
) – the possible
Adds a possible value to the attribute. This indicates one of the values the kernel driver will accept from userspace.
New in version 1.8.4.
- from_json(json_node)[source]¶
-
Loads a fwupd bios setting from a JSON node.
New in version 1.8.4.
- get_current_value()[source]¶
- Returns:
the current value of the attribute.
- Return type:
Gets the string representation of the current_value stored in an attribute from the kernel. This value is cached; so changing it outside of fwupd may may put it out of sync.
New in version 1.8.4.
- get_description()[source]¶
-
Gets the attribute description which is provided by some drivers to explain what they change.
New in version 1.8.4.
- get_id()[source]¶
-
Gets the unique attribute identifier for this attribute/driver
New in version 1.8.4.
- get_kind()[source]¶
- Returns:
the bios setting type, or
Fwupd.BiosSettingKind.UNKNOWN
if unset.- Return type:
Gets the BIOS setting type used by the kernel interface.
New in version 1.8.4.
- get_lower_bound()[source]¶
- Returns:
guint64
- Return type:
Gets the lower bound for integer attributes or minimum length for string attributes.
New in version 1.8.4.
- get_possible_values()[source]¶
- Returns:
all possible values.
- Return type:
[
str
]
Find all possible values for an enumeration attribute.
New in version 1.8.4.
- get_scalar_increment()[source]¶
- Returns:
guint64
- Return type:
Gets the scalar increment used for integer attributes.
New in version 1.8.4.
- get_upper_bound()[source]¶
- Returns:
guint64
- Return type:
Gets the upper bound for integer attributes or maximum length for string attributes.
New in version 1.8.4.
- has_possible_value(val)[source]¶
-
Finds out if a specific possible value was added to the attribute.
New in version 1.8.4.
- map_possible_value(key)[source]¶
- Parameters:
key (
str
) – the string to try to map- Raises:
- Returns:
the possible value that maps or
None
if none if found- Return type:
Attempts to map a user provided string into strings that a
Fwupd.BiosSetting
can support. The following heuristics are used:Ignore case sensitivity
Map obviously “positive” phrases into a value that turns on the
Fwupd.BiosSetting
Map obviously “negative” phrases into a value that turns off the
Fwupd.BiosSetting
New in version 1.8.4.
- set_current_value(value)[source]¶
-
Sets the string stored in an attribute. This doesn’t change the representation in the kernel.
New in version 1.8.4.
- set_id(id)[source]¶
- Parameters:
id (
str
) –
Sets the unique attribute identifier for this attribute
New in version 1.8.4.
- set_kind(type)[source]¶
- Parameters:
type (
Fwupd.BiosSettingKind
) – a bios setting type, e.g.Fwupd.BiosSettingKind.ENUMERATION
Sets the BIOS setting type used by the kernel interface.
New in version 1.8.4.
- set_lower_bound(val)[source]¶
- Parameters:
val (
int
) – a guint64 value to set bound to
Sets the lower bound used for BIOS integer attributes or max length for string attributes.
New in version 1.8.4.
- set_read_only(val)[source]¶
- Parameters:
val (
bool
) –
Configures whether an attribute is read only maximum length for string attributes.
New in version 1.8.4.
- set_scalar_increment(val)[source]¶
- Parameters:
val (
int
) – a guint64 value to set increment to
Sets the scalar increment used for BIOS integer attributes.
New in version 1.8.4.
- set_upper_bound(val)[source]¶
- Parameters:
val (
int
) – a guint64 value to set bound to
Sets the upper bound used for BIOS integer attributes or max length for string attributes.
New in version 1.8.4.
- to_json(builder)[source]¶
- Parameters:
builder (
Json.Builder
) – a JSON builder
Adds a fwupd bios setting to a JSON builder.
New in version 1.8.4.
- to_variant(trusted)[source]¶
- Parameters:
trusted (
bool
) – whether the caller should receive trusted values- Returns:
the serialized data, or
None
for error.- Return type:
Serialize the bios setting.
New in version 1.8.4.
- write_value(value)[source]¶
-
Writes a new value into the setting if it is different from the current value.
NOTE: A subclass should handle the
->write_value()
vfunc and actually write the value to the firmware.New in version 1.9.4.
- do_write_value(value) virtual¶
-
Writes a new value into the setting if it is different from the current value.
NOTE: A subclass should handle the
->write_value()
vfunc and actually write the value to the firmware.New in version 1.9.4.