Fwupd.Request

g Fwupd.Request Fwupd.Request GObject.Object GObject.Object GObject.Object->Fwupd.Request

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

flag_from_string (flag)

class

flag_to_string (flag)

class

from_variant (value)

class

kind_from_string (kind)

class

kind_to_string (kind)

class

new ()

add_flag (flag)

get_created ()

get_device_id ()

get_flags ()

get_id ()

get_image ()

get_kind ()

get_message ()

has_flag (flag)

remove_flag (flag)

set_created (created)

set_device_id (device_id)

set_flags (flags)

set_id (id)

set_image (image)

set_kind (kind)

set_message (message)

to_string ()

to_variant ()

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

device-id

str

r/w

flags

int

r/w

id

str

r/w

image

str

r/w

kind

int

r/w

message

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.Request(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Fwupd.RequestClass

A user request from the device.

See also: [class`FwupdDevice`]

classmethod flag_from_string(flag)[source]
Parameters:

flag (str or None) – a string, e.g. none

Returns:

enumerated value

Return type:

int

Converts a string to an enumerated request flag.

New in version 1.8.6.

classmethod flag_to_string(flag)[source]
Parameters:

flag (int) – a request flag, e.g. Fwupd.REQUEST_FLAG_NONE

Returns:

identifier string

Return type:

str

Converts an enumerated request flag to a string.

New in version 1.8.6.

classmethod from_variant(value)[source]
Parameters:

value (GLib.Variant) – the serialized data

Returns:

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

Return type:

Fwupd.Request

Creates a new request using serialized data.

New in version 1.6.2.

classmethod kind_from_string(kind)[source]
Parameters:

kind (str or None) – a string, e.g. immediate

Returns:

enumerated value

Return type:

Fwupd.RequestKind

Converts a string to an enumerated update message kind.

New in version 1.6.2.

classmethod kind_to_string(kind)[source]
Parameters:

kind (Fwupd.RequestKind) – a update message kind, e.g. Fwupd.RequestKind.IMMEDIATE

Returns:

identifier string

Return type:

str

Converts an enumerated update message kind to a string.

New in version 1.6.2.

classmethod new()[source]
Returns:

a new Fwupd.Request

Return type:

Fwupd.Request

Creates a new request.

New in version 1.6.2.

add_flag(flag)[source]
Parameters:

flag (int) – the #FwupdRequestFlags

Adds a specific flag to the request.

New in version 1.8.6.

get_created()[source]
Returns:

the UNIX time, or 0 if unset

Return type:

int

Gets when the request was created.

New in version 1.6.2.

get_device_id()[source]
Returns:

the device_id, or None if unset

Return type:

str

Gets the device_id that created the request.

New in version 1.6.2.

get_flags()[source]
Returns:

request flags, or 0 if unset

Return type:

int

Gets the request flags.

New in version 1.8.6.

get_id()[source]
Returns:

the ID, or None if unset

Return type:

str

Gets the ID.

New in version 1.6.2.

get_image()[source]
Returns:

the update image URL, or None if unset

Return type:

str

Gets the update image.

New in version 1.6.2.

get_kind()[source]
Returns:

the kind value, e.g. %FWUPD_STATUS_REQUEST_WRITE

Return type:

Fwupd.RequestKind

Returns what the request is currently doing.

New in version 1.6.2.

get_message()[source]
Returns:

the update message, or None if unset

Return type:

str

Gets the update message, generating a generic one using the request ID if possible.

New in version 1.6.2.

has_flag(flag)[source]
Parameters:

flag (int) – the #FwupdRequestFlags

Returns:

True if the flag is set

Return type:

bool

Finds if the request has a specific flag.

New in version 1.8.6.

remove_flag(flag)[source]
Parameters:

flag (int) – the #FwupdRequestFlags

Removes a specific flag from the request.

New in version 1.8.6.

set_created(created)[source]
Parameters:

created (int) – the UNIX time

Sets when the request was created.

New in version 1.6.2.

set_device_id(device_id)[source]
Parameters:

device_id (str or None) – the device_id, e.g. colorhug

Sets the device_id that created the request.

New in version 1.6.2.

set_flags(flags)[source]
Parameters:

flags (int) – request flags, e.g. Fwupd.REQUEST_FLAG_NONE

Sets the request flags.

New in version 1.8.6.

set_id(id)[source]
Parameters:

id (str or None) – the request ID, e.g. USB:foo

Sets the ID.

New in version 1.6.2.

set_image(image)[source]
Parameters:

image (str or None) – the update image URL

Sets the update image.

New in version 1.6.2.

set_kind(kind)[source]
Parameters:

kind (Fwupd.RequestKind) – the kind value, e.g. %FWUPD_STATUS_REQUEST_WRITE

Sets what the request is currently doing.

New in version 1.6.2.

set_message(message)[source]
Parameters:

message (str or None) – the update message string

Sets the update message.

New in version 1.6.2.

to_string()[source]
Returns:

text, or None for invalid

Return type:

str

Builds a text representation of the object.

New in version 1.6.2.

to_variant()[source]
Returns:

the serialized data, or None for error

Return type:

GLib.Variant

Serialize the request data.

New in version 1.6.2.

Property Details

Fwupd.Request.props.device_id
Name:

device-id

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

The device ID for the request.

New in version 1.8.2.

Fwupd.Request.props.flags
Name:

flags

Type:

int

Default Value:

18446744073709551615

Flags:

READABLE, WRITABLE

The flags for the request.

New in version 1.8.6.

Fwupd.Request.props.id
Name:

id

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

The request identifier.

New in version 1.6.2.

Fwupd.Request.props.image
Name:

image

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

The image link for the request.

New in version 1.6.2.

Fwupd.Request.props.kind
Name:

kind

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

The kind of the request.

New in version 1.6.2.

Fwupd.Request.props.message
Name:

message

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

The message text in the request.

New in version 1.6.2.