AppStreamGlib.Format¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class AppStreamGlib.Format(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod guess_kind(filename)[source]¶
- Parameters:
filename (
str
) – a file name- Returns:
A
AppStreamGlib.FormatKind
, e.g.AppStreamGlib.FormatKind.APPSTREAM
.- Return type:
Guesses the source kind based from the filename.
New in version 0.6.9.
- classmethod kind_from_string(kind)[source]¶
- Parameters:
kind (
str
) – the string.- Returns:
a
AppStreamGlib.FormatKind
, orAppStreamGlib.FormatKind.UNKNOWN
for unknown.- Return type:
Converts the text representation to an enumerated value.
New in version 0.6.9.
- classmethod kind_to_string(kind)[source]¶
- Parameters:
kind (
AppStreamGlib.FormatKind
) –- Return type:
- classmethod new()[source]¶
- Returns:
- Return type:
Creates a new
AppStreamGlib.Format
.New in version 0.6.9.
- equal(format2)[source]¶
- Parameters:
format2 (
AppStreamGlib.Format
) – aAppStreamGlib.Format
instance.- Returns:
True
for success- Return type:
Checks if two formats are the same.
New in version 0.6.9.
- get_filename()[source]¶
- Returns:
Runtime identifier, e.g. “org.gnome.Platform/i386/master”
- Return type:
Gets the filename required for this format.
New in version 0.6.9.
- set_filename(filename)[source]¶
- Parameters:
filename (
str
) – the URL.
Sets the filename required for this format.
New in version 0.6.9.
- set_kind(kind)[source]¶
- Parameters:
kind (
AppStreamGlib.FormatKind
) – theAppStreamGlib.FormatKind
, e.g.AppStreamGlib.FormatKind.APPDATA
.
Sets the format kind.
New in version 0.6.9.