Fwupd.JcatItem

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

Subclasses:

None

Methods

Inherited:

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

Structs:

GObject.ObjectClass (5)

class

new (id)

add_alias_id (id)

add_blob (blob)

get_alias_ids ()

get_blob_by_kind (kind)

get_blobs ()

get_blobs_by_kind (kind)

get_id ()

get_id_safe ()

has_target ()

remove_alias_id (id)

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

GObject.Object, Fwupd.Codec

Abstract:

No

Structure:

Fwupd.JcatItemClass

classmethod new(id)[source]
Parameters:

id (str) – An item ID, typically a file basename

Returns:

a Fwupd.JcatItem

Return type:

Fwupd.JcatItem

Creates a new item.

New in version 2.1.3.

add_alias_id(id)[source]
Parameters:

id (str) – An item ID alias, typically a file basename

Adds an item alias ID. Alias IDs are matched when using functions such as Fwupd.JcatFile.get_item_by_id().

New in version 2.1.3.

add_blob(blob)[source]
Parameters:

blob (Fwupd.JcatBlob) – Fwupd.JcatBlob

Adds a new blob to the item.

New in version 2.1.3.

get_alias_ids()[source]
Returns:

array

Return type:

[str]

Gets the list of alias IDs.

New in version 2.1.3.

get_blob_by_kind(kind)[source]
Parameters:

kind (Fwupd.JcatBlobKind) – Fwupd.JcatBlobKind, e.g. Fwupd.JcatBlobKind.SHA256

Raises:

GLib.Error

Returns:

a blob, or None

Return type:

Fwupd.JcatBlob

Gets the item blobs by a specific kind.

New in version 2.1.3.

get_blobs()[source]
Returns:

blobs

Return type:

[Fwupd.JcatBlob]

Gets all the blobs for this item.

New in version 2.1.3.

get_blobs_by_kind(kind)[source]
Parameters:

kind (Fwupd.JcatBlobKind) – Fwupd.JcatBlobKind, e.g. Fwupd.JcatBlobKind.SHA256

Returns:

blobs

Return type:

[Fwupd.JcatBlob]

Gets the item blobs by a specific kind.

New in version 2.1.3.

get_id()[source]
Returns:

string

Return type:

str

Returns the item ID.

New in version 2.1.3.

get_id_safe()[source]
Raises:

GLib.Error

Returns:

string

Return type:

str

Returns the item ID, if safe to use as a path.

New in version 2.1.3.

has_target()[source]
Returns:

True on success

Return type:

bool

Finds out if any of the blobs are targeting an internal checksum. If this returns with success then the caller might be able to use functions like fwupd_jcat_context_verify_target() supplying some target checksums.

New in version 2.1.3.

remove_alias_id(id)[source]
Parameters:

id (str) – An item ID alias, typically a file basename

Removes an item alias ID.

New in version 2.1.3.