Fwupd.JcatFile¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class Fwupd.JcatFile(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- add_item(item)[source]¶
- Parameters:
item (
Fwupd.JcatItem) –Fwupd.JcatItem
Adds an item to a file.
New in version 2.1.3.
- export_bytes()[source]¶
- Raises:
- Returns:
- Return type:
Exports a FwupdJcat file to a compressed blob.
New in version 2.1.3.
- export_json(flags)[source]¶
- Parameters:
flags (
Fwupd.CodecFlags) – aFwupd.CodecFlags, typicallyFwupd.CodecFlags.NONE- Raises:
- Returns:
JSON output, or
Nonefor error- Return type:
Exports a FwupdJcat file to raw JSON.
New in version 2.1.3.
- get_item_by_id(id)[source]¶
- Parameters:
id (
str) – An ID, typically a filename basename- Raises:
- Returns:
a
Fwupd.JcatItem, orNoneif the filename was not found- Return type:
Finds the item with the specified ID, falling back to the ID alias if set.
New in version 2.1.3.
- get_item_default()[source]¶
- Raises:
- Returns:
a
Fwupd.JcatItem, orNoneif no default exists- Return type:
Finds the default item. If more than one
Fwupd.JcatItemexists this function will return with an error.New in version 2.1.3.
- get_items()[source]¶
- Returns:
all the items in the file
- Return type:
Returns all the items in the file.
New in version 2.1.3.
- get_version_major()[source]¶
- Returns:
integer
- Return type:
Returns the major version number of the FwupdJcat specification
New in version 2.1.3.
- get_version_minor()[source]¶
- Returns:
integer
- Return type:
Returns the minor version number of the FwupdJcat specification
New in version 2.1.3.
- import_bytes(blob)[source]¶
- Parameters:
blob (
GLib.Bytes) – aGLib.Bytes- Raises:
- Returns:
Truefor success- Return type:
Imports a compressed FwupdJcat file from a blob of data.
New in version 2.1.3.
- import_json(json)[source]¶
-
Imports a FwupdJcat file from raw JSON.
New in version 2.1.3.
- import_stream(istream)[source]¶
- Parameters:
istream (
Gio.InputStream) –Gio.InputStream- Raises:
- Returns:
Truefor success- Return type:
Imports a compressed FwupdJcat file from a file.
New in version 2.1.3.