AppStream.Context

g AppStream.Context AppStream.Context GObject.Object GObject.Object GObject.Object->AppStream.Context

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

get_filename ()

get_format_version ()

get_locale ()

get_locale_use_all ()

get_media_baseurl ()

get_origin ()

get_priority ()

get_style ()

get_value_flags ()

has_media_baseurl ()

set_filename (fname)

set_format_version (ver)

set_locale (locale)

set_media_baseurl (value)

set_origin (value)

set_priority (priority)

set_style (style)

set_value_flags (flags)

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

GObject.Object

Abstract:

No

Structure:

AppStream.ContextClass

classmethod new()
Returns:

an AppStream.Context

Return type:

AppStream.Context

Creates a new AppStream.Context.

get_filename()
Returns:

The name of the file the data originates from.

Return type:

str

get_format_version()
Returns:

The AppStream format version.

Return type:

AppStream.FormatVersion

get_locale()
Returns:

The active locale in BCP47 format.

Return type:

str

get_locale_use_all()
Returns:

True if all locale should be parsed.

Return type:

bool

get_media_baseurl()
Returns:

The media base URL.

Return type:

str

get_origin()
Returns:

The data origin.

Return type:

str

get_priority()
Returns:

The data priority.

Return type:

int

get_style()
Returns:

The document style.

Return type:

AppStream.FormatStyle

get_value_flags()
Returns:

The AppStream.ValueFlags that are set on cpt.

Return type:

AppStream.ValueFlags

has_media_baseurl()
Returns:

True if a media base URL is set.

Return type:

bool

set_filename(fname)
Parameters:

fname (str) – the new file name.

Sets the file name we are loading data from.

set_format_version(ver)
Parameters:

ver (AppStream.FormatVersion) – the new format version.

Sets the AppStream format version.

set_locale(locale)
Parameters:

locale (str or None) – a POSIX or BCP47 locale, or None. e.g. “en_GB”

Sets the active locale. If the magic value “ALL” is used, the current system locale will be used for data reading, but when writing data all locale will be written.

set_media_baseurl(value)
Parameters:

value (str) – the new value.

Sets the media base URL.

set_origin(value)
Parameters:

value (str) – the new value.

Sets the data origin.

set_priority(priority)
Parameters:

priority (int) – the new priority.

Sets the data priority.

set_style(style)
Parameters:

style (AppStream.FormatStyle) – the new document style.

Sets the AppStream document style.

set_value_flags(flags)
Parameters:

flags (AppStream.ValueFlags) – AppStream.ValueFlags to set on cpt.