Class

AppStreamMetadata

Description

class AppStream.Metadata : GObject.Object
{
  /* No available fields */
}

No description available.

Hierarchy

hierarchy this AsMetadata ancestor_0 GObject ancestor_0--this

Ancestors

Constructors

as_metadata_new

Creates a new AsMetadata.

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_clear_components

Remove all previously parsed or manually added components.

as_metadata_clear_releases

Remove all previously parsed releases entries.

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_architecture
No description available.

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_components
No description available.

as_metadata_get_format_style

Get the metadata parsing mode.

as_metadata_get_format_version
No description available.

as_metadata_get_locale

Gets the current active locale for parsing metadata, or “ALL” if all locales are read.

as_metadata_get_media_baseurl
No description available.

as_metadata_get_origin
No description available.

as_metadata_get_parse_flags

Get the metadata parse flags.

as_metadata_get_release_list

Gets the recently parsed AsReleaseList entry.

as_metadata_get_release_lists
No description available.

as_metadata_get_update_existing
No description available.

as_metadata_get_write_header
No description available.

as_metadata_parse_bytes

Parses any AppStream metadata into one or more AsComponent instances.

since: 0.14.0

as_metadata_parse_data

Parses any AppStream metadata into one or more AsComponent instances.

as_metadata_parse_desktop_data

Parses XDG Desktop Entry metadata and adds it to the list of parsed entities.

as_metadata_parse_file

Parses an AppStream upstream metadata file.

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_architecture

Set the architecture the components in this metadata belong to.

as_metadata_set_format_style

Sets the current metadata parsing mode.

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_origin

Set the origin of AppStream distro metadata.

as_metadata_set_parse_flags

Sets the current metadata parse flags.

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.

Methods inherited from GObject (43)

Please see GObject for a full list of methods.

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.