modulemd-module

modulemd-module

Functions

ModulemdModule * modulemd_module_new ()
ModulemdModule * modulemd_module_new_from_file ()
void modulemd_module_new_all_from_file ()
ModulemdModule * modulemd_module_new_from_string ()
void modulemd_module_new_all_from_string ()
void modulemd_module_dump ()
gchar * modulemd_module_dumps ()
void modulemd_module_dump_all ()
gchar * modulemd_module_dumps_all ()
gboolean modulemd_module_upgrade ()
void modulemd_module_set_arch ()
const gchar * modulemd_module_get_arch ()
void modulemd_module_set_buildrequires ()
GHashTable * modulemd_module_get_buildrequires ()
void modulemd_module_set_community ()
const gchar * modulemd_module_get_community ()
void modulemd_module_set_content_licenses ()
ModulemdSimpleSet * modulemd_module_get_content_licenses ()
void modulemd_module_set_context ()
const gchar * modulemd_module_get_context ()
void modulemd_module_set_description ()
void modulemd_module_set_dependencies ()
void modulemd_module_add_dependencies ()
GPtrArray * modulemd_module_get_dependencies ()
const gchar * modulemd_module_get_description ()
void modulemd_module_set_documentation ()
const gchar * modulemd_module_get_documentation ()
void modulemd_module_set_eol ()
const GDate * modulemd_module_get_eol ()
void modulemd_module_set_mdversion ()
const guint64 modulemd_module_get_mdversion ()
void modulemd_module_add_module_component ()
void modulemd_module_clear_module_components ()
void modulemd_module_set_module_components ()
GHashTable * modulemd_module_get_module_components ()
void modulemd_module_set_module_licenses ()
ModulemdSimpleSet * modulemd_module_get_module_licenses ()
void modulemd_module_set_name ()
const gchar * modulemd_module_get_name ()
void modulemd_module_add_profile ()
void modulemd_module_clear_profiles ()
void modulemd_module_set_profiles ()
GHashTable * modulemd_module_get_profiles ()
void modulemd_module_set_requires ()
GHashTable * modulemd_module_get_requires ()
void modulemd_module_set_rpm_api ()
ModulemdSimpleSet * modulemd_module_get_rpm_api ()
void modulemd_module_set_rpm_artifacts ()
ModulemdSimpleSet * modulemd_module_get_rpm_artifacts ()
void modulemd_module_set_rpm_buildopts ()
GHashTable * modulemd_module_get_rpm_buildopts ()
void modulemd_module_add_rpm_component ()
void modulemd_module_clear_rpm_components ()
void modulemd_module_set_rpm_components ()
GHashTable * modulemd_module_get_rpm_components ()
void modulemd_module_set_rpm_filter ()
ModulemdSimpleSet * modulemd_module_get_rpm_filter ()
void modulemd_module_clear_servicelevels ()
void modulemd_module_set_servicelevels ()
void modulemd_module_add_servicelevel ()
GHashTable * modulemd_module_get_servicelevels ()
void modulemd_module_set_stream ()
const gchar * modulemd_module_get_stream ()
void modulemd_module_set_summary ()
const gchar * modulemd_module_get_summary ()
void modulemd_module_set_tracker ()
const gchar * modulemd_module_get_tracker ()
void modulemd_module_set_version ()
const guint64 modulemd_module_get_version ()
void modulemd_module_set_xmd ()
GHashTable * modulemd_module_get_xmd ()

Types and Values

Description

Functions

modulemd_module_new ()

ModulemdModule *
modulemd_module_new (void);

Allocates a new ModulemdModule.

Returns

a new ModulemdModule.


modulemd_module_new_from_file ()

ModulemdModule *
modulemd_module_new_from_file (const gchar *yaml_file);

Allocates a new ModulemdModule from a file.

Parameters

yaml_file

A YAML file containing the module metadata. If this file contains more than one module, only the first will be loaded.

 

Returns

a new ModulemdModule.


modulemd_module_new_all_from_file ()

void
modulemd_module_new_all_from_file (const gchar *yaml_file,
                                   ModulemdModule ***_modules);

Allocates a list of new ModulemdModule from a file.

Parameters

yaml_file

A YAML file containing the module metadata.

 

_modules

A zero-terminated array of modules contained in this document.

[out][array zero-terminated=1][element-type ModulemdModule][transfer full]

modulemd_module_new_from_string ()

ModulemdModule *
modulemd_module_new_from_string (const gchar *yaml_string);

Allocates a new ModulemdModule from a string.

Parameters

yaml_string

A YAML string containing the module metadata. If this string contains more than one module, only the first will be loaded.

 

Returns

a new ModulemdModule.


modulemd_module_new_all_from_string ()

void
modulemd_module_new_all_from_string (const gchar *yaml_string,
                                     ModulemdModule ***_modules);

Allocates a list of new ModulemdModule from a string.

Parameters

yaml_string

A YAML string containing the module metadata.

 

_modules

A zero-terminated array of modules contained in this document.

[out][array zero-terminated=1][element-type ModulemdModule][transfer full]

modulemd_module_dump ()

void
modulemd_module_dump (ModulemdModule *self,
                      const gchar *yaml_file);

Writes this module out to a YAML document on disk.

Parameters

yaml_file

A string containing the path to the output file

 

modulemd_module_dumps ()

gchar *
modulemd_module_dumps (ModulemdModule *self);

Writes this module out to a YAML document string.

Returns

A string containing a YAML representation of this module.


modulemd_module_dump_all ()

void
modulemd_module_dump_all (GPtrArray *module_array,
                          const gchar *yaml_file);

This function writes out a file containing one or more YAML documents generated from the supplied modules.

Parameters

module_array

A zero-terminated array of modules to be output.

[array zero-terminated=1][element-type ModulemdModule][transfer none]

modulemd_module_dumps_all ()

gchar *
modulemd_module_dumps_all (GPtrArray *module_array);

This function returns an allocated string containing one or more YAML documents generated from the supplied modules.

Parameters

module_array

A zero-terminated array of modules to be output.

[array zero-terminated=1][element-type ModulemdModule][transfer none]

Returns

A string containing a YAML representation of all provided modules.


modulemd_module_upgrade ()

gboolean
modulemd_module_upgrade (ModulemdModule *self);

modulemd_module_set_arch ()

void
modulemd_module_set_arch (ModulemdModule *self,
                          const gchar *arch);

Sets the "arch" property.

Parameters

arch

the module artifact architecture.

[nullable]

modulemd_module_get_arch ()

const gchar *
modulemd_module_get_arch (ModulemdModule *self);

Retrieves the "arch" for modulemd.

Returns

A string containing the "arch" property.


modulemd_module_set_buildrequires ()

void
modulemd_module_set_buildrequires (ModulemdModule *self,
                                   GHashTable *buildrequires);

Sets the 'buildrequires' property. This function was deprecated and is not valid for modulemd files of version 2 or later.

Parameters

buildrequires

The requirements to build this module.

[nullable][element-type utf8 utf8]

modulemd_module_get_buildrequires ()

GHashTable *
modulemd_module_get_buildrequires (ModulemdModule *self);

Retrieves the "buildrequires" for modulemd.

Returns

A hash table containing the "buildrequires" property.

[element-type utf8 utf8][transfer none]


modulemd_module_set_community ()

void
modulemd_module_set_community (ModulemdModule *self,
                               const gchar *community);

Sets the "community" property.

Parameters

community

the module community.

[nullable]

modulemd_module_get_community ()

const gchar *
modulemd_module_get_community (ModulemdModule *self);

Retrieves the "community" for modulemd.

Returns

A string containing the "community" property.


modulemd_module_set_content_licenses ()

void
modulemd_module_set_content_licenses (ModulemdModule *self,
                                      ModulemdSimpleSet *licenses);

Sets the content_licenses property.

Parameters

licenses

A ModuleSimpleSet: The licenses under which the components of this module are released.

[nullable]

modulemd_module_get_content_licenses ()

ModulemdSimpleSet *
modulemd_module_get_content_licenses (ModulemdModule *self);

Retrieves the "content_licenses" for modulemd

Returns

a SimpleSet containing the set of licenses in the "content_licenses" property.

[transfer none]


modulemd_module_set_context ()

void
modulemd_module_set_context (ModulemdModule *self,
                             const gchar *context);

Sets the "context" property.

Parameters

context

the module artifact architecture.

[nullable]

modulemd_module_get_context ()

const gchar *
modulemd_module_get_context (ModulemdModule *self);

Retrieves the "context" for modulemd.

Returns

A string containing the "context" property.


modulemd_module_set_description ()

void
modulemd_module_set_description (ModulemdModule *self,
                                 const gchar *description);

Sets the "description" property.

Parameters

description

the module description.

[nullable]

modulemd_module_set_dependencies ()

void
modulemd_module_set_dependencies (ModulemdModule *self,
                                  GPtrArray *deps);

Sets the list of dependency objects for this module.

Parameters

deps

The NULL-terminated list of dependencies.

[array zero-terminated=1][element-type ModulemdDependencies][transfer none][nullable]

modulemd_module_add_dependencies ()

void
modulemd_module_add_dependencies (ModulemdModule *self,
                                  ModulemdDependencies *dep);

Helper function to populate the dependencies list

Parameters

dep

A dependency object to add to this module

 

modulemd_module_get_dependencies ()

GPtrArray *
modulemd_module_get_dependencies (ModulemdModule *self);

Returns

The list of dependency objects for this module.

[element-type ModulemdDependencies][transfer none]


modulemd_module_get_description ()

const gchar *
modulemd_module_get_description (ModulemdModule *self);

Retrieves the "description" for modulemd.

Returns

A string containing the "description" property.


modulemd_module_set_documentation ()

void
modulemd_module_set_documentation (ModulemdModule *self,
                                   const gchar *documentation);

Sets the "documentation" property.

Parameters

documentation

the module documentation.

[nullable]

modulemd_module_get_documentation ()

const gchar *
modulemd_module_get_documentation (ModulemdModule *self);

Retrieves the "documentation" for modulemd.

Returns

A string containing the "documentation" property.


modulemd_module_set_eol ()

void
modulemd_module_set_eol (ModulemdModule *self,
                         const GDate *date);

Sets the "eol" property.

Note: This property is obsolete. Use "servicelevels" instead. This will fail on modulemd files using the version 2 or later formats.

Parameters

date

The end-of-life date of the module.

[nullable]

modulemd_module_get_eol ()

const GDate *
modulemd_module_get_eol (ModulemdModule *self);

Retrieves the "eol" property.

Note: This property is obsolete. Use "servicelevels" instead. This will fail on modulemd files using the version 2 or later formats.

Returns

A GDate containing the "EOL" date


modulemd_module_set_mdversion ()

void
modulemd_module_set_mdversion (ModulemdModule *self,
                               const guint64 mdversion);

Sets the "mdversion" property.

Parameters

mdversion

the metadata version

 

modulemd_module_get_mdversion ()

const guint64
modulemd_module_get_mdversion (ModulemdModule *self);

Retrieves the "mdversion" for modulemd.

Returns

A 64-bit unsigned integer containing the "mdversion" property.


modulemd_module_add_module_component ()

void
modulemd_module_add_module_component (ModulemdModule *self,
                                      ModulemdComponentModule *component);

Adds a ModulemdComponentModule to the "module_components" hash table.

Parameters

component

A ModulemdComponentModule

 

modulemd_module_clear_module_components ()

void
modulemd_module_clear_module_components
                               (ModulemdModule *self);

Remove all entries from the "module_components" hash table.


modulemd_module_set_module_components ()

void
modulemd_module_set_module_components (ModulemdModule *self,
                                       GHashTable *components);

Sets the module_components property.

Parameters

components

The hash table of module components that comprise this module. The keys are the module name, the values are a ModulemdComponentModule containing information about that module.

[nullable][element-type utf8 ModulemdComponentModule]

modulemd_module_get_module_components ()

GHashTable *
modulemd_module_get_module_components (ModulemdModule *self);

Retrieves the "module-components" for modulemd.

Returns

A hash table containing the "module-components" property.

[element-type utf8 ModulemdComponentModule][transfer none]


modulemd_module_set_module_licenses ()

void
modulemd_module_set_module_licenses (ModulemdModule *self,
                                     ModulemdSimpleSet *licenses);

Sets the module_licenses property.

Parameters

licenses

A ModuleSimpleSet: The licenses under which the components of this module are released.

[nullable]

modulemd_module_get_module_licenses ()

ModulemdSimpleSet *
modulemd_module_get_module_licenses (ModulemdModule *self);

Retrieves the "module_licenses" for modulemd

Returns

a ModulemdSimpleSet containing the set of licenses in the "module_licenses" property.

[transfer none]


modulemd_module_set_name ()

void
modulemd_module_set_name (ModulemdModule *self,
                          const gchar *name);

Sets the "name" property.

Parameters

name

the module name.

[nullable]

modulemd_module_get_name ()

const gchar *
modulemd_module_get_name (ModulemdModule *self);

Retrieves the "name" for modulemd.

Returns

A string containing the "name" property.


modulemd_module_add_profile ()

void
modulemd_module_add_profile (ModulemdModule *self,
                             ModulemdProfile *profile);

Adds a ModulemdProfile definition to this module.

Parameters

profile

A ModulemdProfile

 

modulemd_module_clear_profiles ()

void
modulemd_module_clear_profiles (ModulemdModule *self);

Remove all entries from the "profiles" hash table.


modulemd_module_set_profiles ()

void
modulemd_module_set_profiles (ModulemdModule *self,
                              GHashTable *profiles);

Sets the 'profiles' property.

Parameters

profiles

The profiles avaiable for this module.

[nullable][element-type utf8 ModulemdProfile]

modulemd_module_get_profiles ()

GHashTable *
modulemd_module_get_profiles (ModulemdModule *self);

Retrieves the "profiles" for modulemd.

Returns

A hash table containing the "profiles" property.

[element-type utf8 ModulemdProfile][transfer none]


modulemd_module_set_requires ()

void
modulemd_module_set_requires (ModulemdModule *self,
                              GHashTable *requires);

Sets the 'requires' property. This function was deprecated and is not valid for modulemd files of version 2 or later.

Parameters

requires

The requirements to run this module.

[nullable][element-type utf8 utf8]

modulemd_module_get_requires ()

GHashTable *
modulemd_module_get_requires (ModulemdModule *self);

Retrieves the "requires" for modulemd.

Returns

A hash table containing the "requires" property. This function was deprecated and is not valid for modulemd files of version 2 or later.

[element-type utf8 utf8][transfer none]


modulemd_module_set_rpm_api ()

void
modulemd_module_set_rpm_api (ModulemdModule *self,
                             ModulemdSimpleSet *apis);

Sets the rpm_api property.

Parameters

apis

A ModuleSimpleSet: The set of binary RPM packages that form the public API for this module.

[nullable]

modulemd_module_get_rpm_api ()

ModulemdSimpleSet *
modulemd_module_get_rpm_api (ModulemdModule *self);

Retrieves the "rpm_api" for modulemd

Returns

a SimpleSet containing the set of binary RPM packages in the "rpm_api" property.

[transfer none]


modulemd_module_set_rpm_artifacts ()

void
modulemd_module_set_rpm_artifacts (ModulemdModule *self,
                                   ModulemdSimpleSet *artifacts);

Sets the rpm_artifacts property.

Parameters

artifacts

A ModuleSimpleSet: The set of binary RPM packages that are contained in this module. Generally populated by the module build service.

[nullable]

modulemd_module_get_rpm_artifacts ()

ModulemdSimpleSet *
modulemd_module_get_rpm_artifacts (ModulemdModule *self);

Retrieves the "rpm_artifacts" for modulemd

Returns

a SimpleSet containing the set of binary RPMs contained in this module.

[transfer none]


modulemd_module_set_rpm_buildopts ()

void
modulemd_module_set_rpm_buildopts (ModulemdModule *self,
                                   GHashTable *buildopts);

Sets the 'rpm-buildopts' property.

Parameters

buildopts

A dictionary of build options to pass to rpmbuild. Currently the only recognized key is "macros".

[nullable][element-type utf8 utf8]

modulemd_module_get_rpm_buildopts ()

GHashTable *
modulemd_module_get_rpm_buildopts (ModulemdModule *self);

Retrieves the "rpm-buildopts" for modulemd.

Returns

A hash table containing the "rpm-buildopts" property.

[element-type utf8 utf8][transfer none]


modulemd_module_add_rpm_component ()

void
modulemd_module_add_rpm_component (ModulemdModule *self,
                                   ModulemdComponentRpm *component);

Adds a ModulemdComponentRpm to the "rpm_components" hash table.

Parameters

component

A ModulemdComponentRpm

 

modulemd_module_clear_rpm_components ()

void
modulemd_module_clear_rpm_components (ModulemdModule *self);

Remove all entries from the "rpm_components" hash table.


modulemd_module_set_rpm_components ()

void
modulemd_module_set_rpm_components (ModulemdModule *self,
                                    GHashTable *components);

Sets the rpm_components property.

Parameters

components

The hash table of module components that comprise this module. The keys are the module name, the values are a ModulemdComponentRpm containing information about that module.

[nullable][element-type utf8 ModulemdComponentRpm]

modulemd_module_get_rpm_components ()

GHashTable *
modulemd_module_get_rpm_components (ModulemdModule *self);

Retrieves the "rpm-components" for modulemd.

Returns

A hash table containing the "rpm-components" property.

[element-type utf8 ModulemdComponentRpm][transfer none]


modulemd_module_set_rpm_filter ()

void
modulemd_module_set_rpm_filter (ModulemdModule *self,
                                ModulemdSimpleSet *filter);

Sets the rpm_artifacts property.

Parameters

filter

A ModuleSimpleSet: The set of binary RPM packages that are explicitly filtered out of this module.

[nullable]

modulemd_module_get_rpm_filter ()

ModulemdSimpleSet *
modulemd_module_get_rpm_filter (ModulemdModule *self);

Retrieves the "rpm_filter" for modulemd

Returns

a SimpleSet containing the set of binary RPMs filtered out of this module.

[transfer none]


modulemd_module_clear_servicelevels ()

void
modulemd_module_clear_servicelevels (ModulemdModule *self);

Remove all entries from the "servicelevels" hash table


modulemd_module_set_servicelevels ()

void
modulemd_module_set_servicelevels (ModulemdModule *self,
                                   GHashTable *servicelevels);

Sets the service levels for the module.

Parameters

servicelevels

A hash table of ServiceLevel objects.

[nullable][element-type utf8 ModulemdServiceLevel]

modulemd_module_add_servicelevel ()

void
modulemd_module_add_servicelevel (ModulemdModule *self,
                                  ModulemdServiceLevel *servicelevel);

Adds a service levels to the module. If the name already exists, it will be replaced by this entry and will release a reference on the previous entry.

Parameters

servicelevel

A ServiceLevel object to add to the hash table

 

modulemd_module_get_servicelevels ()

GHashTable *
modulemd_module_get_servicelevels (ModulemdModule *self);

Retrieves the service levels for the module

Returns

A hash table containing the service levels.

[element-type utf8 ModulemdServiceLevel][transfer none]


modulemd_module_set_stream ()

void
modulemd_module_set_stream (ModulemdModule *self,
                            const gchar *stream);

Sets the "stream" property.

Parameters

stream

the module stream.

[nullable]

modulemd_module_get_stream ()

const gchar *
modulemd_module_get_stream (ModulemdModule *self);

Retrieves the "stream" for modulemd.

Returns

A string containing the "stream" property.


modulemd_module_set_summary ()

void
modulemd_module_set_summary (ModulemdModule *self,
                             const gchar *summary);

Sets the "summary" property.

Parameters

summary

the module summary.

[nullable]

modulemd_module_get_summary ()

const gchar *
modulemd_module_get_summary (ModulemdModule *self);

Retrieves the "summary" for modulemd.

Returns

A string containing the "summary" property.


modulemd_module_set_tracker ()

void
modulemd_module_set_tracker (ModulemdModule *self,
                             const gchar *tracker);

Sets the "tracker" property.

Parameters

tracker

the module tracker.

[nullable]

modulemd_module_get_tracker ()

const gchar *
modulemd_module_get_tracker (ModulemdModule *self);

Retrieves the "tracker" for modulemd.

Returns

A string containing the "tracker" property.


modulemd_module_set_version ()

void
modulemd_module_set_version (ModulemdModule *self,
                             const guint64 version);

Sets the "version" property.

Parameters

version

the module version

 

modulemd_module_get_version ()

const guint64
modulemd_module_get_version (ModulemdModule *self);

Retrieves the "version" for modulemd.

Returns

A 64-bit unsigned integer containing the "version" property.


modulemd_module_set_xmd ()

void
modulemd_module_set_xmd (ModulemdModule *self,
                         GHashTable *xmd);

Sets the 'xmd' property.

Parameters

xmd

Extensible metadata block.

[nullable][element-type utf8 GVariant]

modulemd_module_get_xmd ()

GHashTable *
modulemd_module_get_xmd (ModulemdModule *self);

Retrieves the "xmd" for modulemd.

Returns

A hash table containing the "xmd" property.

[element-type utf8 GVariant][transfer none]

Types and Values

MD_VERSION_LATEST

#define MD_VERSION_LATEST MD_VERSION_2

MODULEMD_TYPE_MODULE

#define MODULEMD_TYPE_MODULE modulemd_module_get_type ()

ModulemdModule

typedef struct _ModulemdModule ModulemdModule;