Fwupd.Plugin

g Fwupd.Plugin Fwupd.Plugin GObject.Object GObject.Object GObject.Object->Fwupd.Plugin

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

array_from_variant (value)

class

flag_from_string (plugin_flag)

class

flag_to_string (plugin_flag)

class

from_variant (value)

class

new ()

add_flag (flag)

get_flags ()

get_name ()

has_flag (flag)

remove_flag (flag)

set_flags (flags)

set_name (name)

to_json (builder)

to_string ()

to_variant ()

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

flags

int

r/w

name

str

r/w

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_instance

GObject.Object

r

Class Details

class Fwupd.Plugin(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Fwupd.PluginClass

A plugin which is used by fwupd to enumerate and update devices.

See also: [class`FwupdRelease`]

classmethod array_from_variant(value)[source]
Parameters:

value (GLib.Variant) – the serialized data

Returns:

plugins, or None if value was invalid

Return type:

[Fwupd.Plugin]

Creates an array of new plugins using serialized data.

New in version 1.5.0.

classmethod flag_from_string(plugin_flag)[source]
Parameters:

plugin_flag (str or None) – a string, e.g. require-ac

Returns:

enumerated value

Return type:

int

Converts a string to an enumerated plugin flag.

New in version 1.5.0.

classmethod flag_to_string(plugin_flag)[source]
Parameters:

plugin_flag (int) – plugin flags, e.g. Fwupd.PLUGIN_FLAG_CLEAR_UPDATABLE

Returns:

identifier string

Return type:

str

Converts an enumerated plugin flag to a string.

New in version 1.5.0.

classmethod from_variant(value)[source]
Parameters:

value (GLib.Variant) – the serialized data

Returns:

a new Fwupd.Plugin, or None if value was invalid

Return type:

Fwupd.Plugin

Creates a new plugin using serialized data.

New in version 1.5.0.

classmethod new()[source]
Returns:

a new Fwupd.Plugin

Return type:

Fwupd.Plugin

Creates a new plugin.

New in version 1.5.0.

add_flag(flag)[source]
Parameters:

flag (int) – the #FwupdPluginFlags

Adds a specific plugin flag to the plugin.

New in version 1.5.0.

get_flags()[source]
Returns:

plugin flags, or 0 if unset

Return type:

int

Gets the plugin flags.

New in version 1.5.0.

get_name()[source]
Returns:

the plugin name, or None if unset

Return type:

str

Gets the plugin name.

New in version 1.5.0.

has_flag(flag)[source]
Parameters:

flag (int) – a plugin flag

Returns:

True if the flag is set

Return type:

bool

Finds if the plugin has a specific plugin flag.

New in version 1.5.0.

remove_flag(flag)[source]
Parameters:

flag (int) – a plugin flag

Removes a specific plugin flag from the plugin.

New in version 1.5.0.

set_flags(flags)[source]
Parameters:

flags (int) – plugin flags, e.g. Fwupd.PLUGIN_FLAG_CAPSULES_UNSUPPORTED

Sets the plugin flags.

New in version 1.5.0.

set_name(name)[source]
Parameters:

name (str) – the plugin name, e.g. bios

Sets the plugin name.

New in version 1.5.0.

to_json(builder)[source]
Parameters:

builder (Json.Builder) – a JSON builder

Adds a fwupd plugin to a JSON builder

New in version 1.5.0.

to_string()[source]
Returns:

text, or None for invalid

Return type:

str

Builds a text representation of the object.

New in version 1.5.0.

to_variant()[source]
Returns:

the serialized data, or None for error

Return type:

GLib.Variant

Serialize the plugin data omitting sensitive fields

New in version 1.5.0.

Property Details

Fwupd.Plugin.props.flags
Name:

flags

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

The plugin flags.

New in version 1.5.0.

Fwupd.Plugin.props.name
Name:

name

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

The plugin name.

New in version 1.5.0.