Fwupd.JcatBlob

g Fwupd.Codec Fwupd.Codec Fwupd.JcatBlob Fwupd.JcatBlob Fwupd.Codec->Fwupd.JcatBlob GObject.GInterface GObject.GInterface GObject.GInterface->Fwupd.Codec GObject.Object GObject.Object GObject.Object->Fwupd.JcatBlob

Subclasses:

None

Methods

Inherited:

GObject.Object (37), Fwupd.Codec (22)

Structs:

GObject.ObjectClass (5)

class

flags_to_string (val)

class

kind_from_string (val)

class

kind_to_string (val)

class

method_to_string (val)

class

new (kind, data, flags)

class

new_utf8 (kind, data)

get_data ()

get_data_as_string ()

get_kind ()

get_target ()

get_timestamp ()

set_target (target)

set_timestamp (timestamp)

Virtual Methods

Inherited:

GObject.Object (7), Fwupd.Codec (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class Fwupd.JcatBlob(**kwargs)
Bases:

GObject.Object, Fwupd.Codec

Abstract:

No

Structure:

Fwupd.JcatBlobClass

classmethod flags_to_string(val)[source]
Parameters:

val (Fwupd.JcatBlobFlags) – value, e.g. Fwupd.JcatBlobFlags.IS_UTF8

Returns:

identifier string

Return type:

str

Converts an enumerated value to a string.

New in version 2.1.3.

classmethod kind_from_string(val)[source]
Parameters:

val (str or None) – a string, e.g. sha256

Returns:

enumerated value

Return type:

Fwupd.JcatBlobKind

Converts a string to an enumerated value.

New in version 2.1.3.

classmethod kind_to_string(val)[source]
Parameters:

val (Fwupd.JcatBlobKind) – value, e.g. Fwupd.JcatBlobKind.SHA256

Returns:

identifier string

Return type:

str

Converts an enumerated value to a string.

New in version 2.1.3.

classmethod method_to_string(val)[source]
Parameters:

val (Fwupd.JcatBlobMethod) – value, e.g. Fwupd.JcatBlobMethod.CHECKSUM

Returns:

identifier string

Return type:

str

Converts an enumerated value to a string.

New in version 2.1.3.

classmethod new(kind, data, flags)[source]
Parameters:
Returns:

a Fwupd.JcatBlob

Return type:

Fwupd.JcatBlob

Creates a new blob.

New in version 2.1.3.

classmethod new_utf8(kind, data)[source]
Parameters:
Returns:

a Fwupd.JcatBlob

Return type:

Fwupd.JcatBlob

Creates a new ASCII blob.

New in version 2.1.3.

get_data()[source]
Returns:

a GLib.Bytes, or None if the filename was not found

Return type:

GLib.Bytes

Gets the data stored in the blob, typically in binary (unprintable) form.

New in version 2.1.3.

get_data_as_string()[source]
Returns:

either UTF-8 text, or base64 encoded version of binary data

Return type:

str

Gets the data stored in the blob, in human readable form.

New in version 2.1.3.

get_kind()[source]
Returns:

Fwupd.JcatBlobKind, e.g. Fwupd.JcatBlobKind.SHA256

Return type:

Fwupd.JcatBlobKind

gets the blob kind

New in version 2.1.3.

get_target()[source]
Returns:

Fwupd.JcatBlobKind, e.g. Fwupd.JcatBlobKind.SHA256

Return type:

Fwupd.JcatBlobKind

Gets the blob target.

New in version 2.1.3.

get_timestamp()[source]
Returns:

UTC UNIX time, or 0 if unset

Return type:

int

Gets the creation timestamp for the blob.

New in version 2.1.3.

set_target(target)[source]
Parameters:

target (Fwupd.JcatBlobKind) – a Fwupd.JcatBlobKind, e.g. Fwupd.JcatBlobKind.SHA256

Sets the blob target.

New in version 2.1.3.

set_timestamp(timestamp)[source]
Parameters:

timestamp (int) – UTC timestamp

Sets the creation timestamp for the blob.

New in version 2.1.3.