Jcat.Blob

g GObject.Object GObject.Object Jcat.Blob Jcat.Blob GObject.Object->Jcat.Blob

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

kind_from_string (kind)

class

kind_to_filename_ext (kind)

class

kind_to_string (kind)

class

new (kind, data)

class

new_full (kind, data, flags)

class

new_utf8 (kind, data)

get_appstream_id ()

get_data ()

get_data_as_string ()

get_kind ()

get_target ()

get_timestamp ()

set_appstream_id (appstream_id)

set_target (target)

set_timestamp (timestamp)

to_string ()

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_instance

GObject.Object

r

Class Details

class Jcat.Blob(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Jcat.BlobClass

classmethod kind_from_string(kind)
Parameters:

kind (str) – A string

Returns:

a Jcat.BlobKind, or Jcat.BlobKind.UNKNOWN if the kind was not found

Return type:

Jcat.BlobKind

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:

str

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:

str

Converts the enumerated kind to a string.

New in version 0.1.0.

classmethod new(kind, data)
Parameters:
Returns:

a Jcat.Blob

Return type:

Jcat.Blob

Creates a new blob.

New in version 0.1.0.

classmethod new_full(kind, data, flags)
Parameters:
Returns:

a Jcat.Blob

Return type:

Jcat.Blob

Creates a new blob.

New in version 0.1.0.

classmethod new_utf8(kind, data)
Parameters:
Returns:

a Jcat.Blob

Return type:

Jcat.Blob

Creates a new ASCII blob.

New in version 0.1.0.

get_appstream_id()
Returns:

a string, or None if not set

Return type:

str

Gets the optional AppStream ID for the blob.

New in version 0.1.0.

get_data()
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 0.1.0.

get_data_as_string()
Returns:

base64 encoded version of data

Return type:

str

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

New in version 0.1.0.

get_kind()
Returns:

Jcat.BlobKind, e.g. Jcat.BlobKind.SHA256

Return type:

Jcat.BlobKind

gets the blob kind

New in version 0.1.0.

get_target()
Returns:

Jcat.BlobKind, e.g. Jcat.BlobKind.SHA256

Return type:

Jcat.BlobKind

Gets the blob target.

New in version 0.2.0.

get_timestamp()
Returns:

UTC UNIX time, or 0 if unset

Return type:

int

Gets the creation timestamp for the blob.

New in version 0.1.0.

set_appstream_id(appstream_id)
Parameters:

appstream_id (str or None) – string

Sets an optional AppStream ID on the blob.

New in version 0.1.0.

set_target(target)
Parameters:

target (Jcat.BlobKind) – a Jcat.BlobKind, e.g. Jcat.BlobKind.SHA256

Sets the blob target.

New in version 0.2.0.

set_timestamp(timestamp)
Parameters:

timestamp (int) – UTC timestamp

Sets the creation timestamp for the blob.

New in version 0.1.0.

to_string()
Returns:

string

Return type:

str

Converts the Jcat.Blob to a string.

New in version 0.1.0.