Top |
Modulemd.ModuleStreamModulemd.ModuleStream — The data to represent a stream of a module as described by a modulemd YAML document. |
ModulemdModuleStream *
modulemd_modulestream_new (void
);
Allocates a new ModulemdModuleStream.
Since: 1.6
ModulemdModuleStream *
modulemd_modulestream_copy (ModulemdModuleStream *self
);
Make a copy of the current module
Since: 1.1
gboolean modulemd_modulestream_import_from_file (ModulemdModuleStream *self
,const gchar *yaml_file
,GPtrArray **failures
,GError **error
);
Populates this ModulemdModuleStream with data from a YAML file.
yaml_file |
A YAML file containing the module metadata. If this file contains more than one subdocument, the entire document will be parsed but only the first document will be returned, if it is a valid module. |
|
failures |
An array containing any subdocuments from the YAML file that failed to
parse. This must be freed with |
[element-type ModulemdSubdocument][transfer container][out] |
False if a parse error occurred and sets error
and failures
.
False if the first subdocument was not a module and sets error
Since: 1.6
gboolean modulemd_modulestream_dump (ModulemdModuleStream *self
,const gchar *yaml_file
,GError **error
);
Writes this module stream out to a YAML document on disk.
Since: 1.6
gboolean modulemd_modulestream_import_from_string (ModulemdModuleStream *self
,const gchar *yaml_string
,GPtrArray **failures
,GError **error
);
Populates this ModulemdModuleStream with data from a YAML string.
yaml_string |
A YAML string containing the module metadata. If this string contains more than one subdocument, the entire document will be parsed but only the first document will be returned, if it is a valid module. |
|
failures |
An array containing any subdocuments from the YAML file that failed to
parse. This must be freed with |
[element-type ModulemdSubdocument][transfer container][out] |
False if a parse error occurred and sets error
and failures
.
False if the first subdocument was not a module and sets error
Since: 1.6
gchar * modulemd_modulestream_dumps (ModulemdModuleStream *self
,GError **error
);
Writes this module out to a YAML document string.
The serialized YAML representation of this stream
document or NULL and sets error
appropriately. The returned string must be
freed with g_free()
.
Since: 1.6
gboolean modulemd_modulestream_import_from_stream (ModulemdModuleStream *self
,FILE *stream
,GPtrArray **failures
,GError **error
);
Populates this ModulemdModuleStream with data from a YAML stream.
stream |
A YAML stream containing the module metadata. If this stream contains more than one subdocument, the entire document will be parsed but only the first document will be returned, if it is a valid module. |
|
failures |
An array containing any subdocuments from the YAML file that failed to
parse. This must be freed with |
[element-type ModulemdSubdocument][transfer container][out] |
False if a parse error occurred and sets error
and failures
.
False if the first subdocument was not a module and sets error
Since: 1.6
gboolean
modulemd_modulestream_upgrade (ModulemdModuleStream *self
);
This function takes content imported from earlier versions of the modulemd format and upgrades it into the most recent version.
TRUE if the upgrade was performed successfully. If this function returns FALSE, the internal state of the data is undefined and should not be used further.
Since: 1.6
void modulemd_modulestream_set_arch (ModulemdModuleStream *self
,const gchar *arch
);
Sets the "arch" property.
Since: 1.6
gchar *
modulemd_modulestream_get_arch (ModulemdModuleStream *self
);
Retrieves the "arch" for modulemd.
Since: 1.6
const gchar *
modulemd_modulestream_peek_arch (ModulemdModuleStream *self
);
Retrieves the "arch" for modulemd.
[skip]
Since: 1.6
void modulemd_modulestream_set_buildopts (ModulemdModuleStream *self
,ModulemdBuildopts *buildopts
);
Copies a ModulemdBuildopts object into the module. This object contains additional instructions to the build system required to build this module.
Since: 1.6
ModulemdBuildopts *
modulemd_modulestream_get_buildopts (ModulemdModuleStream *self
);
Get a copy of the ModulemdBuildopts object
a copy of the ModulemdBuildopts object. This
object must be freed with g_object_unref()
when the caller is finished with
it. This function will return NULL if no buildopts have been set.
Since: 1.6
ModulemdBuildopts *
modulemd_modulestream_peek_buildopts (ModulemdModuleStream *self
);
Get a copy of the ModulemdBuildopts object
[skip]
The ModulemdBuildopts object. This object must not be modified or freed. This function will return NULL if no buildopts have been set.
Since: 1.6
void modulemd_modulestream_set_buildrequires (ModulemdModuleStream *self
,GHashTable *buildrequires
);
Sets the 'buildrequires' property. This function was deprecated and is not valid for modulemd files of version 2 or later.
buildrequires |
The requirements to build this module. |
[nullable][element-type utf8 utf8][transfer none] |
Since: 1.6
GHashTable *
modulemd_modulestream_get_buildrequires
(ModulemdModuleStream *self
);
Retrieves the "buildrequires" for modulemd.
A hash table
containing the "buildrequires" property. This table must be freed with
g_hash_table_unref()
.
[element-type utf8 utf8][transfer container]
Since: 1.6
GHashTable *
modulemd_modulestream_peek_buildrequires
(ModulemdModuleStream *self
);
Retrieves the "buildrequires" for modulemd.
[skip]
A hash table containing the "buildrequires" property.
[element-type utf8 utf8][transfer none]
Since: 1.6
void modulemd_modulestream_set_community (ModulemdModuleStream *self
,const gchar *community
);
Sets the "community" property.
Since: 1.6
gchar *
modulemd_modulestream_get_community (ModulemdModuleStream *self
);
Retrieves the "community" for modulemd.
Since: 1.6
const gchar *
modulemd_modulestream_peek_community (ModulemdModuleStream *self
);
Retrieves the "community" for modulemd.
[skip]
Since: 1.6
void modulemd_modulestream_set_content_licenses (ModulemdModuleStream *self
,ModulemdSimpleSet *licenses
);
Sets the content_licenses property.
licenses |
A ModuleSimpleSet: The licenses under which the components of this module are released. |
[nullable][transfer none] |
Since: 1.6
ModulemdSimpleSet *
modulemd_modulestream_get_content_licenses
(ModulemdModuleStream *self
);
Retrieves the "content_licenses" for modulemd
a SimpleSet containing the set of licenses in the
"content_licenses" property. The returned SimpleSet must be freed with
g_object_unref()
.
Since: 1.6
ModulemdSimpleSet *
modulemd_modulestream_peek_content_licenses
(ModulemdModuleStream *self
);
Retrieves the "content_licenses" for modulemd
[skip]
a SimpleSet containing the set of licenses in the "content_licenses" property. This SimpleSet must not be modified or freed.
Since: 1.6
void modulemd_modulestream_set_context (ModulemdModuleStream *self
,const gchar *context
);
Sets the "context" property.
Since: 1.6
gchar *
modulemd_modulestream_get_context (ModulemdModuleStream *self
);
Retrieves the "context" for modulemd.
Since: 1.6
const gchar *
modulemd_modulestream_peek_context (ModulemdModuleStream *self
);
Retrieves the "context" for modulemd.
[skip]
Since: 1.6
void modulemd_modulestream_set_dependencies (ModulemdModuleStream *self
,GPtrArray *deps
);
Sets the list of ModulemdDependencies objects for this module stream.
deps |
The list of ModulemdDependencies for this module stream. |
[array zero-terminated=1][element-type ModulemdDependencies][transfer none][nullable] |
Since: 1.6
void modulemd_modulestream_add_dependencies (ModulemdModuleStream *self
,ModulemdDependencies *dep
);
Helper function to populate the dependencies list
Since: 1.6
GPtrArray *
modulemd_modulestream_get_dependencies
(ModulemdModuleStream *self
);
The list
of dependency objects for this module. This list must be freed with
g_ptr_array_unref()
.
[element-type ModulemdDependencies][transfer container]
Since: 1.6
GPtrArray *
modulemd_modulestream_peek_dependencies
(ModulemdModuleStream *self
);
[skip]
The list of dependency objects for this module. This list and its contents must not be modified or freed.
[element-type ModulemdDependencies][transfer none]
Since: 1.6
void modulemd_modulestream_set_description (ModulemdModuleStream *self
,const gchar *description
);
Sets the "description" property.
Since: 1.6
gchar *
modulemd_modulestream_get_description (ModulemdModuleStream *self
);
Retrieves the "description" for modulemd.
Since: 1.6
gchar * modulemd_modulestream_get_localized_description (ModulemdModuleStream *self
,const gchar *locale
);
locale |
Specify the locale for the description. If NULL is passed, it will attempt to use the LC_MESSAGES locale. If "C" is passed or if the locale has no translation available, it will treat it as untranslated. |
[transfer none][nullable] |
A string containing the "description" property,
translated into the language specified by locale
if possible. This string
must be freed with g_free()
.
Since: 1.6
const gchar *
modulemd_modulestream_peek_description
(ModulemdModuleStream *self
);
Retrieves the "description" for modulemd.
[skip]
Since: 1.6
void modulemd_modulestream_set_documentation (ModulemdModuleStream *self
,const gchar *documentation
);
Sets the "documentation" property.
Since: 1.6
gchar *
modulemd_modulestream_get_documentation
(ModulemdModuleStream *self
);
Retrieves the "documentation" for modulemd.
Since: 1.6
const gchar *
modulemd_modulestream_peek_documentation
(ModulemdModuleStream *self
);
Retrieves the "documentation" for modulemd.
[skip]
A string containing the "documentation" property. This string must not be modified or freed.
Since: 1.6
void modulemd_modulestream_set_eol (ModulemdModuleStream *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.
Since: 1.6
GDate *
modulemd_modulestream_get_eol (ModulemdModuleStream *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.
Since: 1.6
const GDate *
modulemd_modulestream_peek_eol (ModulemdModuleStream *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.
[skip]
Since: 1.6
void modulemd_modulestream_set_mdversion (ModulemdModuleStream *self
,const guint64 mdversion
);
Sets the "mdversion" property.
Since: 1.6
guint64
modulemd_modulestream_get_mdversion (ModulemdModuleStream *self
);
Retrieves the "mdversion" for modulemd.
Since: 1.6
void modulemd_modulestream_add_module_component (ModulemdModuleStream *self
,ModulemdComponentModule *component
);
Adds a ModulemdComponentModule to the "module_components" hash table.
Since: 1.6
void
modulemd_modulestream_clear_module_components
(ModulemdModuleStream *self
);
Remove all entries from the "module_components" hash table.
Since: 1.6
void modulemd_modulestream_set_module_components (ModulemdModuleStream *self
,GHashTable *components
);
Sets the module_components property.
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. |
[transfer none][nullable][element-type utf8 ModulemdComponentModule] |
Since: 1.6
GHashTable *
modulemd_modulestream_get_module_components
(ModulemdModuleStream *self
);
Retrieves the "module-components" for modulemd.
A hash
table containing the "module-components" property. This table must be freed
with g_hash_table_unref()
.
[element-type utf8 ModulemdComponentModule][transfer container]
Since: 1.6
GHashTable *
modulemd_modulestream_peek_module_components
(ModulemdModuleStream *self
);
Retrieves the "module-components" for modulemd.
[skip]
A hash table containing the "module-components" property.
[element-type utf8 ModulemdComponentModule][transfer none]
Since: 1.6
void modulemd_modulestream_set_module_licenses (ModulemdModuleStream *self
,ModulemdSimpleSet *licenses
);
Sets the module_licenses property.
licenses |
A ModuleSimpleSet: The licenses under which the components of this module are released. |
[transfer none][nullable] |
Since: 1.6
ModulemdSimpleSet *
modulemd_modulestream_get_module_licenses
(ModulemdModuleStream *self
);
Retrieves the "module_licenses" for modulemd
a ModulemdSimpleSet containing the set of
licenses in the "module_licenses" property. This ModulemdSimpleSet must be
freed with g_object_unref()
.
Since: 1.6
ModulemdSimpleSet *
modulemd_modulestream_peek_module_licenses
(ModulemdModuleStream *self
);
Retrieves the "module_licenses" for modulemd
[skip]
Since: 1.6
void modulemd_modulestream_set_name (ModulemdModuleStream *self
,const gchar *name
);
Sets the "name" property.
Since: 1.6
gchar *
modulemd_modulestream_get_name (ModulemdModuleStream *self
);
Retrieves the "name" for modulemd.
Since: 1.6
const gchar *
modulemd_modulestream_peek_name (ModulemdModuleStream *self
);
Retrieves the "name" for modulemd.
[skip]
Since: 1.6
void modulemd_modulestream_add_profile (ModulemdModuleStream *self
,ModulemdProfile *profile
);
Adds a ModulemdProfile definition to this module.
Since: 1.6
void
modulemd_modulestream_clear_profiles (ModulemdModuleStream *self
);
Remove all entries from the "profiles" hash table.
Since: 1.6
void modulemd_modulestream_set_profiles (ModulemdModuleStream *self
,GHashTable *profiles
);
Sets the 'profiles' property.
profiles |
The profiles available for this module. |
[transfer none][nullable][element-type utf8 ModulemdProfile] |
Since: 1.6
GHashTable *
modulemd_modulestream_get_profiles (ModulemdModuleStream *self
);
Retrieves the "profiles" for modulemd.
A hash
table containing the "profiles" property. This table must be freed with
g_hash_table_unref()
.
[element-type utf8 ModulemdProfile][transfer container]
Since: 1.6
GHashTable *
modulemd_modulestream_peek_profiles (ModulemdModuleStream *self
);
Retrieves the "profiles" for modulemd.
[skip]
A hash table containing the "profiles" property.
[element-type utf8 ModulemdProfile][transfer none]
Since: 1.6
void modulemd_modulestream_set_requires (ModulemdModuleStream *self
,GHashTable *requires
);
Sets the 'requires' property. This function was deprecated and is not valid for modulemd files of version 2 or later.
requires |
The requirements to run this module. |
[transfer none][nullable][element-type utf8 utf8] |
Since: 1.6
GHashTable *
modulemd_modulestream_get_requires (ModulemdModuleStream *self
);
Retrieves the "requires" for modulemd.
A hash table
containing the "requires" property. This function was deprecated and is not
valid for modulemd files of version 2 or later. This table must be freed with
g_hash_table_unref()
.
[element-type utf8 utf8][transfer container]
Since: 1.6
GHashTable *
modulemd_modulestream_peek_requires (ModulemdModuleStream *self
);
Retrieves the "requires" for modulemd.
[skip]
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]
Since: 1.6
void modulemd_modulestream_set_rpm_api (ModulemdModuleStream *self
,ModulemdSimpleSet *apis
);
Sets the rpm_api property.
apis |
A ModuleSimpleSet: The set of binary RPM packages that form the public API for this module. |
[transfer none][nullable] |
Since: 1.6
ModulemdSimpleSet *
modulemd_modulestream_get_rpm_api (ModulemdModuleStream *self
);
Retrieves the "rpm_api" for modulemd
a ModulemdSimpleSet containing the set of binary
RPM packages in the "rpm_api" property. This ModulemdSimpleSet must be freed
with g_object_unref()
.
Since: 1.6
ModulemdSimpleSet *
modulemd_modulestream_peek_rpm_api (ModulemdModuleStream *self
);
Retrieves the "rpm_api" for modulemd
[skip]
a ModulemdSimpleSet containing the set of binary RPM packages in the "rpm_api" property. This ModulemdSimpleSet must not be modified or freed.
Since: 1.6
void modulemd_modulestream_set_rpm_artifacts (ModulemdModuleStream *self
,ModulemdSimpleSet *artifacts
);
Sets the rpm_artifacts property.
artifacts |
A ModuleSimpleSet: The set of binary RPM packages that are contained in this module. Generally populated by the module build service. |
[transfer none][nullable] |
Since: 1.6
ModulemdSimpleSet *
modulemd_modulestream_get_rpm_artifacts
(ModulemdModuleStream *self
);
Retrieves the "rpm_artifacts" for modulemd
Since: 1.6
ModulemdSimpleSet *
modulemd_modulestream_peek_rpm_artifacts
(ModulemdModuleStream *self
);
Retrieves the "rpm_artifacts" for modulemd
[skip]
Since: 1.6
void modulemd_modulestream_add_rpm_component (ModulemdModuleStream *self
,ModulemdComponentRpm *component
);
Adds a ModulemdComponentRpm to the "rpm_components" hash table.
Since: 1.6
void
modulemd_modulestream_clear_rpm_components
(ModulemdModuleStream *self
);
Remove all entries from the "rpm_components" hash table.
Since: 1.6
void modulemd_modulestream_set_rpm_components (ModulemdModuleStream *self
,GHashTable *components
);
Sets the rpm_components property.
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. |
[transfer none][nullable][element-type utf8 ModulemdComponentRpm] |
Since: 1.6
GHashTable *
modulemd_modulestream_get_rpm_components
(ModulemdModuleStream *self
);
Retrieves the "rpm-components" for modulemd.
A hash
table containing the "rpm-components" property. This table must be freed with
g_hash_table_unref()
.
[element-type utf8 ModulemdComponentRpm][transfer container]
Since: 1.6
GHashTable *
modulemd_modulestream_peek_rpm_components
(ModulemdModuleStream *self
);
Retrieves the "rpm-components" for modulemd.
[skip]
A hash table containing the "rpm-components" property.
[element-type utf8 ModulemdComponentRpm][transfer none]
Since: 1.6
void modulemd_modulestream_set_rpm_filter (ModulemdModuleStream *self
,ModulemdSimpleSet *filter
);
Sets the rpm_artifacts property.
filter |
A ModuleSimpleSet: The set of binary RPM packages that are explicitly filtered out of this module. |
[transfer none][nullable] |
Since: 1.6
ModulemdSimpleSet *
modulemd_modulestream_get_rpm_filter (ModulemdModuleStream *self
);
Retrieves the "rpm_filter" for modulemd
a ModulemdSimpleSet containing the set of binary
RPMs filtered out of this module. This ModulemdSimpleSet must be freed with
g_object_unref()
.
Since: 1.6
ModulemdSimpleSet *
modulemd_modulestream_peek_rpm_filter (ModulemdModuleStream *self
);
Retrieves the "rpm_filter" for modulemd
[skip]
a ModulemdSimpleSet containing the set of binary RPMs filtered out of this module. This ModulemdSimpleSet must not be modified or freed.
Since: 1.6
void
modulemd_modulestream_clear_servicelevels
(ModulemdModuleStream *self
);
Remove all entries from the "servicelevels" hash table
Since: 1.6
void modulemd_modulestream_set_servicelevels (ModulemdModuleStream *self
,GHashTable *servicelevels
);
Sets the service levels for the module.
servicelevels |
A hash table of ModulemdServiceLevel objects. |
[transfer none][nullable][element-type utf8 ModulemdServiceLevel] |
Since: 1.6
void modulemd_modulestream_add_servicelevel (ModulemdModuleStream *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.
Since: 1.6
GHashTable *
modulemd_modulestream_get_servicelevels
(ModulemdModuleStream *self
);
Retrieves the service levels for the module
A
hash table containing the service levels. This table must be freed with
g_hash_table_unref()
.
[element-type utf8 ModulemdServiceLevel][transfer container]
Since: 1.6
GHashTable *
modulemd_modulestream_peek_servicelevels
(ModulemdModuleStream *self
);
Retrieves the service levels for the module
[skip]
A hash table containing the service levels.
[element-type utf8 ModulemdServiceLevel][transfer none]
Since: 1.6
void modulemd_modulestream_set_stream (ModulemdModuleStream *self
,const gchar *stream
);
Sets the "stream" property.
Since: 1.6
gchar *
modulemd_modulestream_get_stream (ModulemdModuleStream *self
);
Retrieves the "stream" for modulemd.
Since: 1.6
const gchar *
modulemd_modulestream_peek_stream (ModulemdModuleStream *self
);
Retrieves the "stream" for modulemd.
[skip]
Since: 1.6
void modulemd_modulestream_set_summary (ModulemdModuleStream *self
,const gchar *summary
);
Sets the "summary" property.
Since: 1.6
gchar *
modulemd_modulestream_get_summary (ModulemdModuleStream *self
);
Retrieves the "summary" for modulemd.
Since: 1.6
gchar * modulemd_modulestream_get_localized_summary (ModulemdModuleStream *self
,const gchar *locale
);
locale |
Specify the locale for the summary. If NULL is passed, it will attempt to use the LC_MESSAGES locale. If "C" is passed or if the locale has no translation available, it will treat it as untranslated. |
[transfer none][nullable] |
A string containing the "summary" property,
translated into the language specified by locale
if possible. This string
must be freed with g_free()
.
Since: 1.6
const gchar *
modulemd_modulestream_peek_summary (ModulemdModuleStream *self
);
Retrieves the "summary" for modulemd.
[skip]
Since: 1.6
void modulemd_modulestream_set_tracker (ModulemdModuleStream *self
,const gchar *tracker
);
Sets the "tracker" property.
Since: 1.6
gchar *
modulemd_modulestream_get_tracker (ModulemdModuleStream *self
);
Retrieves the "tracker" for modulemd.
Since: 1.6
const gchar *
modulemd_modulestream_peek_tracker (ModulemdModuleStream *self
);
Retrieves the "tracker" for modulemd.
[skip]
Since: 1.6
void modulemd_modulestream_set_translation (ModulemdModuleStream *self
,ModulemdTranslation *translation
);
translation |
A ModulemdTranslation associated with this module and stream which provides translated strings. If the passed ModulemdTranslation does not match this module and stream, it will have no effect, but a warning will be emitted. |
[transfer none][nullable] |
Since: 1.6
ModulemdTranslation *
modulemd_modulestream_get_translation (ModulemdModuleStream *self
);
Since: 1.6
void modulemd_modulestream_set_version (ModulemdModuleStream *self
,const guint64 version
);
Sets the "version" property.
Since: 1.6
guint64
modulemd_modulestream_get_version (ModulemdModuleStream *self
);
Retrieves the "version" for modulemd.
Since: 1.6
void modulemd_modulestream_set_xmd (ModulemdModuleStream *self
,GHashTable *xmd
);
Sets the 'xmd' property.
Since: 1.6
GHashTable *
modulemd_modulestream_get_xmd (ModulemdModuleStream *self
);
Retrieves the "xmd" for modulemd.
A hash table containing the "xmd" property.
[element-type utf8 GVariant][transfer container]
Since: 1.6
GHashTable *
modulemd_modulestream_peek_xmd (ModulemdModuleStream *self
);
Retrieves the "xmd" for modulemd.
[skip]
Since: 1.6
gchar *
modulemd_modulestream_get_nsvc (ModulemdModuleStream *self
);
Return the unique module identifier.
a string describing the unique module identifier in the form:
"NAME:STREAM:VERSION[:CONTEXT]". This string is owned by the caller and
must be freed with g_free()
.