Jcat.Blob¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class Jcat.Blob(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod kind_from_string(kind)¶
- Parameters:
kind (
str
) – A string- Returns:
a
Jcat.BlobKind
, orJcat.BlobKind.UNKNOWN
if the kind was not found- Return type:
Converts the string to an enumerated kind.
New in version 0.1.0.
- classmethod kind_to_filename_ext(kind)¶
- Parameters:
kind (
Jcat.BlobKind
) –Jcat.BlobKind
- Returns:
a string, or
None
if the kind was not found- Return type:
Converts the enumerated kind to the normal file extension.
New in version 0.1.0.
- classmethod kind_to_string(kind)¶
- Parameters:
kind (
Jcat.BlobKind
) –Jcat.BlobKind
- Returns:
a string, or
None
if the kind was not found- Return type:
Converts the enumerated kind to a string.
New in version 0.1.0.
- classmethod new(kind, data)¶
- Parameters:
kind (
Jcat.BlobKind
) –Jcat.BlobKind
, e.g.Jcat.BlobKind.SHA256
data (
GLib.Bytes
) –GLib.Bytes
- Returns:
- Return type:
Creates a new blob.
New in version 0.1.0.
- classmethod new_full(kind, data, flags)¶
- Parameters:
kind (
Jcat.BlobKind
) –Jcat.BlobKind
, e.g.Jcat.BlobKind.SHA256
data (
GLib.Bytes
) –GLib.Bytes
flags (
Jcat.BlobFlags
) –Jcat.BlobFlags
- Returns:
- Return type:
Creates a new blob.
New in version 0.1.0.
- classmethod new_utf8(kind, data)¶
- Parameters:
kind (
Jcat.BlobKind
) –Jcat.BlobKind
, e.g.Jcat.BlobKind.SHA256
data (
str
) – ASCII data
- Returns:
- Return type:
Creates a new ASCII blob.
New in version 0.1.0.
- get_appstream_id()¶
-
Gets the optional AppStream ID for the blob.
New in version 0.1.0.
- get_data()¶
- Returns:
a
GLib.Bytes
, orNone
if the filename was not found- Return type:
Gets the data stored in the blob, typically in binary (unprintable) form.
New in version 0.1.0.
- get_data_as_string()¶
- Returns:
base64 encoded version of data
- Return type:
Gets the data stored in the blob, in human readable form.
New in version 0.1.0.
- get_kind()¶
- Returns:
- Return type:
gets the blob kind
New in version 0.1.0.
- get_target()¶
- Returns:
- Return type:
Gets the blob target.
New in version 0.2.0.
- get_timestamp()¶
- Returns:
UTC UNIX time, or 0 if unset
- Return type:
Gets the creation timestamp for the blob.
New in version 0.1.0.
- set_appstream_id(appstream_id)¶
-
Sets an optional AppStream ID on the blob.
New in version 0.1.0.
- set_target(target)¶
- Parameters:
target (
Jcat.BlobKind
) – aJcat.BlobKind
, e.g.Jcat.BlobKind.SHA256
Sets the blob target.
New in version 0.2.0.