Modulemd.DefaultsV1

Modulemd.DefaultsV1 — Object representing a defaults document (version 1)

Stability Level

Stable, unless otherwise indicated

Functions

Types and Values

Object Hierarchy

    GObject
    ╰── ModulemdDefaults
        ╰── ModulemdDefaultsV1

Description

Functions

modulemd_defaults_v1_new ()

ModulemdDefaultsV1 *
modulemd_defaults_v1_new (const gchar *module_name);

Parameters

module_name

The name of the module to which these defaults apply.

[in]

Returns

A newly-allocated ModulemdDefaultsV1 object.

[transfer full]

Since: 2.0


modulemd_defaults_v1_set_default_stream ()

void
modulemd_defaults_v1_set_default_stream
                               (ModulemdDefaultsV1 *self,
                                const gchar *default_stream,
                                const gchar *intent);

Set the default stream for this module.

Parameters

self

This ModulemdDefaultsV1 object.

[in]

default_stream

The name of the default stream for this module. If NULL, it will remove the default stream.

[in][nullable]

intent

If non-NULL, this indicates the system intent to apply this default stream. If NULL, it will be added as common defaults. System intents are deprecated and calls with this non-NULL argument will become void in the future.

[in][nullable]

Since: 2.0


modulemd_defaults_v1_get_default_stream ()

const gchar *
modulemd_defaults_v1_get_default_stream
                               (ModulemdDefaultsV1 *self,
                                const gchar *intent);

Parameters

self

This ModulemdDefaultsV1 object.

[in]

intent

The name of the system intent whose default stream will be retrieved. If left NULL or the specified intent has no different default, it will return the generic default stream for this module. System intents are deprecated and this argument will be ignored in the future.

[in][nullable]

Returns

The name of the default stream for this module.

[transfer none]

Since: 2.0


modulemd_defaults_v1_get_streams_with_default_profiles_as_strv ()

GStrv
modulemd_defaults_v1_get_streams_with_default_profiles_as_strv
                               (ModulemdDefaultsV1 *self,
                                const gchar *intent);

[rename-to modulemd_defaults_v1_get_streams_with_default_profiles]

Parameters

self

This ModulemdDefaultsV1 object.

[in]

intent

The name of the system intent whose stream profiles will be retrieved. If left NULL or the specified intent has no separate defaults for this module, it will return the generic stream profiles. System intents are deprecated and this argument will be ignored in the future.

[in][nullable]

Returns

A sorted GStrv list of unique stream names for which default profiles have been assigned.

[transfer full]

Since: 2.0


modulemd_defaults_v1_add_default_profile_for_stream ()

void
modulemd_defaults_v1_add_default_profile_for_stream
                               (ModulemdDefaultsV1 *self,
                                const gchar *stream_name,
                                const gchar *profile_name,
                                const gchar *intent);

Add a profile that will be installed for this stream if none are explicitly specified by the user. This function may be called any number of times for the same stream and will deduplicate input.

Parameters

self

This ModulemdDefaultsV1 object.

[in]

stream_name

The name of the module stream to which to add this default profile.

[in]

profile_name

The name of the default profile to add.

[in]

intent

The name of the system intent to add profile defaults to. If NULL, this sets the generic fallback profiles for the stream. System intents are deprecated and calls with this non-NULL argument will become void in the future.

[in][nullable]

Since: 2.0


modulemd_defaults_v1_set_empty_default_profiles_for_stream ()

void
modulemd_defaults_v1_set_empty_default_profiles_for_stream
                               (ModulemdDefaultsV1 *self,
                                const gchar *stream_name,
                                const gchar *intent);

Sets the default profiles for stream_name to the empty set. When output to a file, it will appear as stream_name: [].

Parameters

self

This ModulemdDefaultsV1 object.

[in]

stream_name

The name of the module stream for which to empty default profiles.

[in]

intent

The name of the system intent from which to clear the profile defaults for this stream. System intents are deprecated and calls with this non-NULL argument will become void in the future.

[in][nullable]

Since: 2.0


modulemd_defaults_v1_remove_default_profiles_for_stream ()

void
modulemd_defaults_v1_remove_default_profiles_for_stream
                               (ModulemdDefaultsV1 *self,
                                const gchar *stream_name,
                                const gchar *intent);

Removes this stream from the list of profiles entirely. It will not appear in the output document.

Parameters

self

This ModulemdDefaultsV1 object.

[in]

stream_name

The name of the module stream from which to remove default profiles.

[in]

intent

The name of the system intent from which to remove the profile defaults for this stream. System intents are deprecated and calls with this non-NULL arugment will become void in the future.

[in][nullable]

Since: 2.0


modulemd_defaults_v1_get_default_profiles_for_stream_as_strv ()

GStrv
modulemd_defaults_v1_get_default_profiles_for_stream_as_strv
                               (ModulemdDefaultsV1 *self,
                                const gchar *stream_name,
                                const gchar *intent);

[rename-to modulemd_defaults_v1_get_default_profiles_for_stream]

Parameters

self

This ModulemdDefaultsV1 object.

[in]

stream_name

The name of the string to retrieve the default profiles for.

[in]

intent

The name of the system intent for which to retrieve the profile defaults for this stream. System intents are deprecated and this argument will be ignored in the future.

[in][nullable]

Returns

A sorted GStrv list of unique profiles to be installed by default for this stream. NULL, if this stream_name is not present in the defaults.

[transfer full]

Since: 2.0

Types and Values

MODULEMD_TYPE_DEFAULTS_V1

#define MODULEMD_TYPE_DEFAULTS_V1 (modulemd_defaults_v1_get_type ())

ModulemdDefaultsV1

typedef struct _ModulemdDefaultsV1 ModulemdDefaultsV1;