Modulemd.Module

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

Stability Level

Stable, unless otherwise indicated

Functions

Types and Values

Description

Functions

modulemd_module_copy ()

ModulemdModule *
modulemd_module_copy (ModulemdModule *self);

Parameters

self

This ModulemdModule object.

[in]

Returns

A deep copy of this ModulemdModule object.

[transfer full]

Since: 2.0


modulemd_module_validate ()

gboolean
modulemd_module_validate (ModulemdModule *self,
                          GError **error);

Parameters

self

This ModulemdModule object.

[in]

error

A GError containign the reason the object failed validation. NULL if the validation passed.

[out]

Returns

TRUE if validation passed, FALSE and sets error if failed.

Since: 2.0


modulemd_module_get_module_name ()

const gchar *
modulemd_module_get_module_name (ModulemdModule *self);

Parameters

self

This ModulemdModule object

 

Returns

The module name.

[transfer none]

Since: 2.0


modulemd_module_get_all_streams ()

GPtrArray *
modulemd_module_get_all_streams (ModulemdModule *self);

Parameters

self

This ModulemdModule object

 

Returns

A list of all available stream objects associated with this module. There may be multiple streams with the same name and different version and context. The order of items in this list is not guaranteed.

[transfer none][element-type ModulemdModuleStream]

Since: 2.0


modulemd_module_get_streams_by_stream_name_as_list ()

GPtrArray *
modulemd_module_get_streams_by_stream_name_as_list
                               (ModulemdModule *self,
                                const gchar *stream_name);

[rename-to modulemd_module_get_streams_by_stream_name]

Parameters

self

This ModulemdModule object

 

stream_name

The name of the stream to retrieve

 

Returns

A list of all available stream objects associated with a particular stream name, sorted highest to lowest by the version. The same version may have more than one associated context.

[transfer container][element-type ModulemdModuleStream]

Since: 2.0


modulemd_module_get_stream_by_NSVC ()

ModulemdModuleStream *
modulemd_module_get_stream_by_NSVC (ModulemdModule *self,
                                    const gchar *stream_name,
                                    const guint64 version,
                                    const gchar *context);

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

Parameters

self

This ModulemdModule object

 

stream_name

The name of the stream to retrieve

 

version

The version of the stream to retrieve

 

context

The context of the stream to retrieve

 

Returns

The requested stream object or NULL if no match was found.

[transfer none]

Since: 2.0


modulemd_module_get_stream_by_NSVCA ()

ModulemdModuleStream *
modulemd_module_get_stream_by_NSVCA (ModulemdModule *self,
                                     const gchar *stream_name,
                                     const guint64 version,
                                     const gchar *context,
                                     const gchar *arch,
                                     GError **error);

Parameters

self

This ModulemdModule object

 

stream_name

The name of the stream to retrieve

 

version

The version of the stream to retrieve. If set to zero, the version is not included in the search.

 

context

The context of the stream to retrieve. If NULL, the context is not included in the search.

[nullable]

arch

The processor architecture of the stream to retrieve. If NULL, the architecture is not included in the search.

[nullable]

error

A GError indicating the reason this function failed to retrieve exactly one ModulemdModuleStream.

[out]

Returns

The requested stream object. NULL and sets error appropriately if the provided information is not sufficient to return exactly one ModulemdModuleStream result.

[transfer none]

Since: 2.2


modulemd_module_remove_streams_by_NSVCA ()

void
modulemd_module_remove_streams_by_NSVCA
                               (ModulemdModule *self,
                                const gchar *stream_name,
                                const guint64 version,
                                const gchar *context,
                                const gchar *arch);

Remove one or more ModulemdModuleStream objects from this ModulemdModule that match the provided parameters.

Parameters

self

This ModulemdModule object

 

stream_name

The name of the stream to remove.

[not nullable]

version

The version of the stream to remove. If set to zero, matches all versions.

 

context

The context of the stream to remove. If NULL, matches all stream contexts.

[nullable]

arch

The processor architecture of the stream to remove. If NULL, matches all architectures.

[nullable]

Since: 2.3


modulemd_module_remove_streams_by_name()

#define             modulemd_module_remove_streams_by_name(self, stream_name)

Remove one or more ModulemdModuleStream objects from this ModulemdModule that match the provided stream name.

Parameters

self

This ModulemdModule object

 

stream_name

The name of the stream to remove.

[not nullable]

Since: 2.3


modulemd_module_get_defaults ()

ModulemdDefaults *
modulemd_module_get_defaults (ModulemdModule *self);

Parameters

self

This ModulemdModule object

 

Returns

The defaults of this module.

[transfer none]

Since: 2.0

Types and Values

MODULEMD_TYPE_MODULE

#define MODULEMD_TYPE_MODULE (modulemd_module_get_type ())

ModulemdModule

typedef struct _ModulemdModule ModulemdModule;