Modulemd.ImprovedModule

Modulemd.ImprovedModule — Collects all information about a module: all of its streams, defaults, etc.

Functions

Types and Values

Description

Functions

modulemd_improvedmodule_new ()

ModulemdImprovedModule *
modulemd_improvedmodule_new (const gchar *name);

Returns

A newly-allocated ModulemdImprovedModule. This object must be freed with g_object_unref().

[transfer full]

Since: 1.6


modulemd_improvedmodule_add_stream ()

void
modulemd_improvedmodule_add_stream (ModulemdImprovedModule *self,
                                    ModulemdModuleStream *stream);

Add a ModulemdModuleStream to this module. If this stream name is already in use, this function will overwrite the existing value. If the module name does not match, this function will silently ignore this stream.

Since : 1.6

Parameters

stream

A ModulemdModuleStream of this module.

[transfer none][not nullable]

modulemd_improvedmodule_get_stream_by_name ()

ModulemdModuleStream *
modulemd_improvedmodule_get_stream_by_name
                               (ModulemdImprovedModule *self,
                                const gchar *stream_name);

modulemd_improvedmodule_get_stream_by_name has been deprecated since version 1.7 and should not be used in newly-written code.

Use get_stream_by_nsvc() or get_streams_by_name() instead.

Parameters

stream_name

The name of the stream to retrieve.

 

Returns

A ModulemModuleStream representing the requested module stream. NULL if the stream name was not found. If there is more than one version and/or context for this stream, it will return one in a non-deterministic manner. This function remains for backwards-compatibility, but it should never be used.

[transfer full]

Since: 1.6


modulemd_improvedmodule_get_stream_by_nsvc ()

ModulemdModuleStream *
modulemd_improvedmodule_get_stream_by_nsvc
                               (ModulemdImprovedModule *self,
                                const gchar *nsvc);

Parameters

nsvc

The NSVC of the stream to retrieve.

 

Returns

A ModulemModuleStream representing the requested module stream. NULL if the stream (name, version, context) was not found.

[transfer full]

Since: 1.7


modulemd_improvedmodule_get_streams ()

GHashTable *
modulemd_improvedmodule_get_streams (ModulemdImprovedModule *self);

Returns

A GHashTable containing all ModulemModuleStream objects for this module. This hash table must be freed with g_hash_table_unref().

[element-type utf8 ModulemdModuleStream][transfer container]

Since: 1.6


modulemd_improvedmodule_get_streams_by_name ()

GPtrArray *
modulemd_improvedmodule_get_streams_by_name
                               (ModulemdImprovedModule *self,
                                const gchar *stream_name);

Parameters

stream_name

The name of the stream to retrieve

 

Returns

A GPtrArray containing all ModulemModuleStream objects for this module which matches the requested stream_name. Returns NULL if no streams matched this name. This GPtrArray must be freed with g_ptr_array_unref().

[element-type ModulemdModuleStream][transfer container]

Since: 1.6


modulemd_improvedmodule_set_name ()

void
modulemd_improvedmodule_set_name (ModulemdImprovedModule *self,
                                  const gchar *module_name);

Sets the module name.

Parameters

module_name

The name of this module.

[transfer none][not nullable]

Since: 1.6


modulemd_improvedmodule_get_name ()

gchar *
modulemd_improvedmodule_get_name (ModulemdImprovedModule *self);

Gets the name of this module.

Returns

The name of this module. This value must be freed with g_free().

[transfer full]

Since: 1.6


modulemd_improvedmodule_peek_name ()

const gchar *
modulemd_improvedmodule_peek_name (ModulemdImprovedModule *self);

Gets the name of this module.

[skip]

Returns

The name of this module. This value must be not be modified or freed.

[transfer none]

Since: 1.6


modulemd_improvedmodule_set_defaults ()

void
modulemd_improvedmodule_set_defaults (ModulemdImprovedModule *self,
                                      ModulemdDefaults *defaults);

Set the default stream and profiles for this module. Makes no changes if the defaults do not apply to this module.

Parameters

defaults

A ModulemdDefaults object describing the defaults for this module.

[transfer none][nullable]

Since: 1.6


modulemd_improvedmodule_get_defaults ()

ModulemdDefaults *
modulemd_improvedmodule_get_defaults (ModulemdImprovedModule *self);

Returns the ModulemdDefaults object for this module.

Returns

a ModulemdDefaults object if set, NULL otherwise. This object must be freed with g_object_unref().

[transfer full]

Since: 1.6


modulemd_improvedmodule_peek_defaults ()

ModulemdDefaults *
modulemd_improvedmodule_peek_defaults (ModulemdImprovedModule *self);

Returns the ModulemdDefaults object for this module.

[skip]

Returns

a ModulemdDefaults object if set, NULL otherwise. This object must be not be modified or freed.

[transfer none]

Since: 1.6


modulemd_improvedmodule_copy ()

ModulemdImprovedModule *
modulemd_improvedmodule_copy (ModulemdImprovedModule *self);

Make a copy of this module.

Returns

A newly-allocated ModulemdImprovedModule that is a copy of the one passed in.

[transfer full]

Since: 1.6


modulemd_improvedmodule_dump ()

void
modulemd_improvedmodule_dump (ModulemdImprovedModule *self,
                              const gchar *yaml_file,
                              GError **error);

Writes this module out to a YAML document on disk.

Parameters

yaml_file

A string containing the path to the output file

 

Since: 1.6


modulemd_improvedmodule_dumps ()

gchar *
modulemd_improvedmodule_dumps (ModulemdImprovedModule *self,
                               GError **error);

Writes this module out to a YAML document string.

Returns

A string containing a YAML representation of this module and all of its streams. This string must be freed with g_free().

[transfer full]

Since: 1.6

Types and Values

MODULEMD_TYPE_IMPROVEDMODULE

#define MODULEMD_TYPE_IMPROVEDMODULE (modulemd_improvedmodule_get_type ())

ModulemdImprovedModule

typedef struct _ModulemdImprovedModule ModulemdImprovedModule;