AppStreamGlib.Require

g AppStreamGlib.Require AppStreamGlib.Require GObject.Object GObject.Object GObject.Object->AppStreamGlib.Require

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

compare_from_string (compare)

class

compare_to_string (compare)

class

kind_from_string (kind)

class

kind_to_string (kind)

class

new ()

equal (require2)

get_compare ()

get_kind ()

get_value ()

get_version ()

set_compare (compare)

set_kind (kind)

set_value (value)

set_version (version)

version_compare (version)

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

GObject.Object

Abstract:

No

Structure:

AppStreamGlib.RequireClass

classmethod compare_from_string(compare)[source]
Parameters:

compare (str) – the string.

Returns:

a AppStreamGlib.RequireCompare, or AppStreamGlib.RequireCompare.UNKNOWN for unknown.

Return type:

AppStreamGlib.RequireCompare

Converts the text representation to an enumerated value.

New in version 0.6.7.

classmethod compare_to_string(compare)[source]
Parameters:

compare (AppStreamGlib.RequireCompare) – the AppStreamGlib.RequireCompare.

Returns:

string version of compare

Return type:

str

Converts the enumerated value to an text representation.

New in version 0.6.7.

classmethod kind_from_string(kind)[source]
Parameters:

kind (str) – the string.

Returns:

a AppStreamGlib.RequireKind, or AppStreamGlib.RequireKind.UNKNOWN for unknown.

Return type:

AppStreamGlib.RequireKind

Converts the text representation to an enumerated value.

New in version 0.6.7.

classmethod kind_to_string(kind)[source]
Parameters:

kind (AppStreamGlib.RequireKind) – the AppStreamGlib.RequireKind.

Returns:

string version of kind

Return type:

str

Converts the enumerated value to an text representation.

New in version 0.6.7.

classmethod new()[source]
Returns:

a AppStreamGlib.Require

Return type:

AppStreamGlib.Require

Creates a new AppStreamGlib.Require.

New in version 0.6.7.

equal(require2)[source]
Parameters:

require2 (AppStreamGlib.Require) – a AppStreamGlib.Require instance.

Returns:

True for success

Return type:

bool

Checks if two requires are the same.

New in version 0.7.7.

get_compare()[source]
Returns:

the AppStreamGlib.RequireKind

Return type:

AppStreamGlib.RequireCompare

Gets the require version comparison type.

New in version 0.6.7.

get_kind()[source]
Returns:

the AppStreamGlib.RequireKind

Return type:

AppStreamGlib.RequireKind

Gets the require kind.

New in version 0.6.7.

get_value()[source]
Returns:

the value, e.g. “bootloader”

Return type:

str

Gets the require value if set.

New in version 0.6.7.

get_version()[source]
Returns:

the version, e.g. “0.1.2”

Return type:

str

Gets the require version if set.

New in version 0.6.7.

set_compare(compare)[source]
Parameters:

compare (AppStreamGlib.RequireCompare) – the AppStreamGlib.RequireKind, e.g. AppStreamGlib.RequireKind.ID.

Sets the require version comparison type.

New in version 0.6.7.

set_kind(kind)[source]
Parameters:

kind (AppStreamGlib.RequireKind) – the AppStreamGlib.RequireKind, e.g. AppStreamGlib.RequireKind.ID.

Sets the require kind.

New in version 0.6.7.

set_value(value)[source]
Parameters:

value (str) – an require version, e.g. firmware

Sets the require value.

New in version 0.6.7.

set_version(version)[source]
Parameters:

version (str) – an version number, e.g. 0.1.2

Sets the require version.

New in version 0.6.7.

version_compare(version)[source]
Parameters:

version (str) – a version number, e.g. 0.1.3

Raises:

GLib.Error

Returns:

True if the predicate was true

Return type:

bool

Compares the version number of the requirement with a predicate.

New in version 0.6.7.