Class
AppStreamMetadata
Functions
as_metadata_file_guess_style
Guesses the AppStream metadata style (metainfo or catalog) based on the filename.
since: 0.14.0
Instance methods
as_metadata_add_component
Add an AsComponent
to the list of components.
This can be used to add multiple components in order to
produce a distro-XML AppStream metadata file.
as_metadata_component_to_metainfo
Convert an AsComponent
to metainfo data.
This will always be XML, YAML is no valid format for metainfo files.
as_metadata_components_to_catalog
Serialize all AsComponent
instances into AppStream
catalog metadata.
NULL
is returned if there is nothing to serialize.
as_metadata_get_component
Gets the AsComponent
which has been parsed from the XML.
If the AppStream XML contained multiple components, return the last
component that has been parsed.
as_metadata_get_locale
Gets the current active locale for parsing metadata, or “ALL” if all locales are read.
as_metadata_parse_bytes
Parses any AppStream metadata into one or more AsComponent
instances.
since: 0.14.0
as_metadata_parse_desktop_data
Parses XDG Desktop Entry metadata and adds it to the list of parsed entities.
as_metadata_parse_releases_bytes
Parses any AppStream release metadata into AsRelease
objects.
You can retrieve the last parsed AsReleaseList
using %as_metadata_get_release_list.
since: 0.16.0
as_metadata_parse_releases_file
Parses any AppStream release metadata into AsRelease
objects
using the provided file.
You can retrieve the last parsed AsReleaseList
using %as_metadata_get_release_list.
since: 0.16.0
as_metadata_releases_to_data
Convert a releases of an AsReleaseList
entity into a release metadata XML representation.
since: 0.16.0
as_metadata_save_catalog
Serialize all AsComponent
instances to XML or YAML metadata and save
the data to a file.
An existing file at the same location will be overridden.
as_metadata_save_metainfo
Serialize AsComponent
instance to XML and save it to file.
An existing file at the same location will be overridden.
as_metadata_set_format_version
Set the current AppStream format version that we should generate data for or be able to read.
as_metadata_set_locale
Sets the locale which should be read when processing metadata. All other locales are ignored, which increases parsing speed and reduces memory usage. If you set the locale to “ALL”, all locales will be read.
as_metadata_set_media_baseurl
Set the base URL for all media links referenced in the metadata,
or NULL
if every component has absolute URLs.
as_metadata_set_update_existing
If set to TRUE
, the parser will not create new components but
instead update existing components in the pool with new metadata.
as_metadata_set_write_header
If set to TRUE
, tehe metadata writer will omit writing a DEP-11
header document when in YAML mode, and will not write a root components node
when writing XML data.
Please keep in mind that this will create an invalid DEP-11 YAML AppStream
catalog metadata file, and an invalid XML file.
This parameter should only be changed e.g. by the appstream-generator tool.
Signals
Signals inherited from GObject (1)
GObject::notify
The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.
Class structure
struct AppStreamMetadataClass {
GObjectClass parent_class;
void (* _as_reserved1) (
void
);
void (* _as_reserved2) (
void
);
void (* _as_reserved3) (
void
);
void (* _as_reserved4) (
void
);
void (* _as_reserved5) (
void
);
void (* _as_reserved6) (
void
);
}
No description available.
Class members
parent_class: GObjectClass
No description available.
_as_reserved1: void (* _as_reserved1) ( void )
No description available.
_as_reserved2: void (* _as_reserved2) ( void )
No description available.
_as_reserved3: void (* _as_reserved3) ( void )
No description available.
_as_reserved4: void (* _as_reserved4) ( void )
No description available.
_as_reserved5: void (* _as_reserved5) ( void )
No description available.
_as_reserved6: void (* _as_reserved6) ( void )
No description available.