Method

AppStreamMetadataparse_desktop_data

Declaration [src]

gboolean
as_metadata_parse_desktop_data (
  AsMetadata* metad,
  const gchar* cid,
  const gchar* data,
  gssize data_len,
  GError** error
)

Description [src]

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

Please note that not every desktop-entry file will result in a valid component being generated, even if parsing succeeds without error (The desktiop-entry file may be valid but not generate a component on purpose).

Parameters

cid const gchar*
 

The component-id the new AsComponent should have.

 The data is owned by the caller of the function.
 The value is a NUL terminated UTF-8 string.
data const gchar*
 

Metadata describing one or more software components.

 The data is owned by the caller of the function.
 The value is a NUL terminated UTF-8 string.
data_len gssize
 

The data length, or -1 if unknown and null-terminated.

error GError **
  The return location for a GError*, or NULL.

Return value

Returns: gboolean
 

TRUE if the file was parsed without error.