AppStreamGlib.Agreement

g AppStreamGlib.Agreement AppStreamGlib.Agreement GObject.Object GObject.Object GObject.Object->AppStreamGlib.Agreement

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

kind_from_string (value)

class

kind_to_string (value)

class

new ()

add_section (agreement_section)

get_kind ()

get_section_default ()

get_sections ()

get_version_id ()

set_kind (kind)

set_version_id (version_id)

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

GObject.Object

Abstract:

No

Structure:

AppStreamGlib.AgreementClass

classmethod kind_from_string(value)[source]
Parameters:

value (str) – the string.

Returns:

a AppStreamGlib.AgreementKind or AppStreamGlib.AgreementKind.UNKNOWN for unknown

Return type:

AppStreamGlib.AgreementKind

Converts the text representation to an enumerated value.

New in version 0.7.8.

classmethod kind_to_string(value)[source]
Parameters:

value (AppStreamGlib.AgreementKind) – the AppStreamGlib.AgreementKind.

Returns:

string version of value

Return type:

str

Converts the enumerated value to an text representation.

New in version 0.7.8.

classmethod new()[source]
Returns:

a AppStreamGlib.Agreement

Return type:

AppStreamGlib.Agreement

Creates a new AppStreamGlib.Agreement.

New in version 0.7.8.

add_section(agreement_section)[source]
Parameters:

agreement_section (AppStreamGlib.AgreementSection) –

get_kind()[source]
Returns:

a string, e.g. AppStreamGlib.AgreementKind.EULA

Return type:

AppStreamGlib.AgreementKind

Gets the agreement kind.

New in version 0.7.8.

get_section_default()[source]
Returns:

agreement section, or None

Return type:

AppStreamGlib.AgreementSection

Gets the first section in the agreement.

New in version 0.7.8.

get_sections()[source]
Returns:

array

Return type:

[AppStreamGlib.AgreementSection]

Gets all the sections in the agreement.

New in version 0.7.8.

get_version_id()[source]
Returns:

a string, e.g. “1.4a”, or None

Return type:

str

Gets the agreement version_id.

New in version 0.7.8.

set_kind(kind)[source]
Parameters:

kind (AppStreamGlib.AgreementKind) – the agreement kind, e.g. AppStreamGlib.AgreementKind.EULA

Sets the agreement kind.

New in version 0.7.8.

set_version_id(version_id)[source]
Parameters:

version_id (str) – the agreement version ID, e.g. “1.4a”

Sets the agreement version identifier.

New in version 0.7.8.