AppStreamGlib.Checksum

g AppStreamGlib.Checksum AppStreamGlib.Checksum GObject.Object GObject.Object GObject.Object->AppStreamGlib.Checksum

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

class

target_from_string (target)

class

target_to_string (target)

get_filename ()

get_kind ()

get_target ()

get_value ()

set_filename (filename)

set_kind (kind)

set_target (target)

set_value (value)

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

GObject.Object

Abstract:

No

Structure:

AppStreamGlib.ChecksumClass

classmethod new()[source]
Returns:

a AppStreamGlib.Checksum

Return type:

AppStreamGlib.Checksum

Creates a new AppStreamGlib.Checksum.

New in version 0.4.2.

classmethod target_from_string(target)[source]
Parameters:

target (str) – a source kind string

Returns:

A AppStreamGlib.ChecksumTarget, e.g. AppStreamGlib.ChecksumTarget.CONTAINER.

Return type:

AppStreamGlib.ChecksumTarget

Converts the text representation to an enumerated value.

New in version 0.4.2.

classmethod target_to_string(target)[source]
Parameters:

target (AppStreamGlib.ChecksumTarget) – the AppStreamGlib.ChecksumTarget.

Returns:

string version of target, or None for unknown

Return type:

str

Converts the enumerated value to an text representation.

New in version 0.4.2.

get_filename()[source]
Returns:

URL

Return type:

str

Gets the full qualified URL for the checksum, usually pointing at some mirror.

New in version 0.4.2.

get_kind()[source]
Returns:

the GLib.ChecksumType

Return type:

GLib.ChecksumType

Gets the checksum kind.

New in version 0.4.2.

get_target()[source]
Returns:

the GLib.ChecksumType

Return type:

AppStreamGlib.ChecksumTarget

Gets the checksum target.

New in version 0.4.2.

get_value()[source]
Returns:

filename

Return type:

str

Gets the suggested value the checksum, including file extension.

New in version 0.4.2.

set_filename(filename)[source]
Parameters:

filename (str) – the URL.

Sets the filename used to generate the checksum.

New in version 0.4.2.

set_kind(kind)[source]
Parameters:

kind (GLib.ChecksumType) – the GLib.ChecksumType, e.g. GLib.ChecksumType.SHA1.

Sets the checksum kind.

New in version 0.4.2.

set_target(target)[source]
Parameters:

target (AppStreamGlib.ChecksumTarget) – the GLib.ChecksumType, e.g. AppStreamGlib.ChecksumTarget.CONTAINER.

Sets the checksum target.

New in version 0.4.2.

set_value(value)[source]
Parameters:

value (str) – the new filename value.

Sets the checksum value filename.

New in version 0.4.2.