modulemd

modulemd

Functions

Description

Functions

modulemd_objects_from_file ()

GPtrArray *
modulemd_objects_from_file (const gchar *yaml_file,
                            GError **error);

Allocates a GPtrArray of various supported subdocuments from a file.

Parameters

yaml_file

A YAML file containing the module metadata and other related information such as default streams.

 

error

A GError containing additional information if this function fails.

[out]

Returns

A GPtrArray of various supported subdocuments from a YAML file. These subdocuments will all be GObjects and their type can be identified with G_OBJECT_TYPE(object).

[array zero-terminated=1][element-type GObject][transfer container]

Since: 1.2


modulemd_objects_from_string ()

GPtrArray *
modulemd_objects_from_string (const gchar *yaml_string,
                              GError **error);

Allocates a GPtrArray of various supported subdocuments from a file.

Parameters

yaml_string

A YAML string containing the module metadata and other related information such as default streams.

 

error

A GError containing additional information if this function fails.

[out]

Returns

A GPtrArray of various supported subdocuments from a YAML file. These subdocuments will all be GObjects and their type can be identified with G_OBJECT_TYPE(object).

[array zero-terminated=1][element-type GObject][transfer container]

Since: 1.2


modulemd_dump ()

void
modulemd_dump (GPtrArray *objects,
               const gchar *yaml_file,
               GError **error);

Creates a file containing a series of YAML subdocuments, one per object passed in.

Parameters

objects

A GPtrArray of modulemd or related objects to dump to YAML.

[array zero-terminated=1][element-type GObject]

yaml_file

The path to the file that should contain the resulting YAML

 

error

A GError containing additional information if this function fails.

[out]

Since: 1.2


modulemd_dumps ()

gchar *
modulemd_dumps (GPtrArray *objects,
                GError **error);

Creates a string containing a series of YAML subdocuments, one per object passed in. This string must be freed with g_free() when no longer needed.

Parameters

objects

A GPtrArray of modulemd or related objects to dump to YAML.

[array zero-terminated=1][element-type GObject]

error

A GError containing additional information if this function fails.

[out]

Since: 1.2

Types and Values