Top |
Modulemd.ModuleStreamModulemd.ModuleStream — A parent class for all versions of ModulemdModuleStream objects. |
ModulemdModuleStream * modulemd_module_stream_new (guint64 mdversion
,const gchar *module_name
,const gchar *module_stream
);
Since: 2.0
ModulemdModuleStream * modulemd_module_stream_read_file (const gchar *path
,gboolean strict
,const gchar *module_name
,const gchar *module_stream
,GError **error
);
Create a ModulemdModuleStream object from a YAML file.
path |
The path to a YAML document containing a module stream definition. |
[in] |
module_name |
An optional module name to override the document on disk. Mostly useful in cases where the name is being auto-detected from git. |
[in][nullable] |
module_stream |
An optional module stream name to override the document on disk. Mostly useful in cases where the name is being auto-detected from git. |
[in][nullable] |
strict |
Whether the parser should return failure if it encounters an unknown mapping key or if it should ignore it. |
[in] |
error |
A GError that will return the reason for a failed read. |
[out] |
A newly-allocated ModulemdModuleStream object if
the YAML file was valid and contained exactly one document: modulemd
subdocument. NULL if the document fails validation or multiple documents are
encountered and sets NULL appropriately. See ModulemdModuleIndex for
functions to read in multiple-subdocument YAML.
Since: 2.0
ModulemdModuleStream * modulemd_module_stream_read_string (const gchar *yaml_string
,gboolean strict
,const gchar *module_name
,const gchar *module_stream
,GError **error
);
Create a ModulemdModuleStream object from a YAML string.
yaml_string |
A YAML document string containing a module stream definition. |
[in] |
module_name |
An optional module name to override the document on disk. Mostly useful in cases where the name is being auto-detected from git. |
[in][nullable] |
module_stream |
An optional module stream name to override the document on disk. Mostly useful in cases where the name is being auto-detected from git. |
[in][nullable] |
strict |
Whether the parser should return failure if it encounters an unknown mapping key or if it should ignore it. |
[in] |
error |
A GError that will return the reason for a failed read. |
[out] |
A newly-allocated ModulemdModuleStream object if
the YAML string was valid and contained exactly one document: modulemd
subdocument. NULL if the document fails validation or multiple documents are
encountered and sets NULL appropriately. See ModulemdModuleIndex for
functions to read in multiple-subdocument YAML.
Since: 2.0
ModulemdModuleStream * modulemd_module_stream_read_stream (FILE *stream
,gboolean strict
,const gchar *module_name
,const gchar *module_stream
,GError **error
);
Create a ModulemdModuleStream object from a YAML file.
[skip]
stream |
A YAML document as a FILE * containing a module stream definition. |
[in] |
module_name |
An optional module name to override the document on disk. Mostly useful in cases where the name is being auto-detected from git. |
[in][nullable] |
module_stream |
An optional module stream name to override the document on disk. Mostly useful in cases where the name is being auto-detected from git. |
[in][nullable] |
strict |
Whether the parser should return failure if it encounters an unknown mapping key or if it should ignore it. |
[in] |
error |
A GError that will return the reason for a failed read. |
[out] |
A newly-allocated ModulemdModuleStream object if
the YAML file was valid and contained exactly one document: modulemd
subdocument. NULL if the document fails validation or multiple documents are
encountered and sets NULL appropriately. See ModulemdModuleIndex for
functions to read in multiple-subdocument YAML.
Since: 2.0
ModulemdModuleStream * modulemd_module_stream_copy (ModulemdModuleStream *self
,const gchar *module_name
,const gchar *module_stream
);
Copies a ModulemdModuleStream, optionally assigning it a new stream name in the process.
A newly-allocated ModulemdModuleStream object
that is a complete copy of self
, optionally with a new stream name.
Since: 2.0
ModulemdModuleStream * modulemd_module_stream_upgrade (ModulemdModuleStream *self
,guint64 mdversion
,GError **error
);
Return an upgraded copy of this object. Does not modify the original.
self |
This ModulemdModuleStream. |
[in] |
mdversion |
The metadata version to upgrade to. If zero, upgrades to the highest-supported version. |
[in] |
error |
A GError that will return the reason for an upgrade error. |
[out] |
A newly-allocated ModulemdModuleStream copy of
this object upgraded to the requested version. Returns NULL and sets error
appropriately if the upgrade could not be completed automatically.
Since: 2.0
gboolean modulemd_module_stream_validate (ModulemdModuleStream *self
,GError **error
);
Verifies that all stored values are internally consistent and that the module is sufficiently-complete for emitting. This function is called implicitly before attempting to emit the contents.
self |
This ModulemdModuleStream. |
[in] |
error |
A GError that will return the reason for a validation error. |
[out] |
TRUE if the ModulemdModuleStream passed validation. FALSE and sets
error
appropriately if validation fails.
Since: 2.0
guint64
modulemd_module_stream_get_mdversion (ModulemdModuleStream *self
);
Since: 2.0
const gchar *
modulemd_module_stream_get_module_name
(ModulemdModuleStream *self
);
Since: 2.0
const gchar *
modulemd_module_stream_get_stream_name
(ModulemdModuleStream *self
);
Since: 2.0
void modulemd_module_stream_set_version (ModulemdModuleStream *self
,guint64 version
);
self |
This ModulemdModuleStream. |
[in] |
version |
The version of this ModulemdModuleStream. |
[in] |
Since: 2.0
guint64
modulemd_module_stream_get_version (ModulemdModuleStream *self
);
void modulemd_module_stream_set_context (ModulemdModuleStream *self
,const gchar *context
);
self |
This ModulemdModuleStream. |
[in] |
context |
Module context flag. The context flag serves to distinguish module builds with the same name, stream and version and plays an important role in automatic module stream name expansion. |
[in][nullable] |
Since: 2.0
const gchar *
modulemd_module_stream_get_context (ModulemdModuleStream *self
);
Module context flag. The context flag serves to distinguish module builds with the same name, stream and version and plays an important role in automatic module stream name expansion.
Since: 2.0
void modulemd_module_stream_set_arch (ModulemdModuleStream *self
,const gchar *arch
);
self |
This ModulemdModuleStream. |
[in] |
arch |
Module architecture. Indicates to which processor architecture this ModulemdModuleStream applies. |
[in][nullable] |
Since: 2.2
const gchar *
modulemd_module_stream_get_arch (ModulemdModuleStream *self
);
Module architecture. Indicates to which processor architecture this ModulemdModuleStream applies.
Since: 2.2
gchar *
modulemd_module_stream_get_nsvc_as_string
(ModulemdModuleStream *self
);
modulemd_module_stream_get_nsvc_as_string
has been deprecated since version 2.2 and should not be used in newly-written code.
[rename-to modulemd_module_stream_get_nsvc]
The NSVC (name:stream:version[:context]) of this module stream. NULL if module name or stream stream is unknown.
Since: 2.0
gchar *
modulemd_module_stream_get_NSVCA_as_string
(ModulemdModuleStream *self
);
[rename-to modulemd_module_stream_get_NSVCA]
The NSVCA of this module stream. The returned format is described here. NULL if module name or stream stream is unknown.
Since: 2.2
gboolean modulemd_module_stream_depends_on_stream (ModulemdModuleStream *self
,const gchar *module_name
,const gchar *stream_name
);
self |
This ModulemdModuleStream. |
[not nullable] |
module_name |
A module name. |
[not nullable] |
stream_name |
The stream of the module. |
[not nullable] |
TRUE if any of the ModulemdDependencies objects associated with this module applies to the provided module name and stream in the runtime dependencies.
Since: 2.1
Stability Level: Unstable
gboolean modulemd_module_stream_build_depends_on_stream (ModulemdModuleStream *self
,const gchar *module_name
,const gchar *stream_name
);
self |
This ModulemdModuleStream. |
[not nullable] |
module_name |
A module name. |
[not nullable] |
stream_name |
The stream of the module. |
[not nullable] |
TRUE if any of the ModulemdDependencies objects associated with this module applies to the provided module name and stream in the build-time dependencies.
Since: 2.1
Stability Level: Unstable
Represents v1 of the Modulemd.ModuleStream metadata format. |
||
Represents v2 of the Modulemd.ModuleStream metadata format. |
||
Represents the highest-supported version of the Modulemd.ModuleStream metadata format. |
Since: 2.0
#define MODULEMD_TYPE_MODULE_STREAM (modulemd_module_stream_get_type ())
struct ModulemdModuleStreamClass { GObjectClass parent_class; ModulemdModuleStream *(*copy) (ModulemdModuleStream *self, const gchar *module_name, const gchar *module_stream); gboolean (*validate) (ModulemdModuleStream *self, GError **error); guint64 (*get_mdversion) (ModulemdModuleStream *self); gboolean (*depends_on_stream) (ModulemdModuleStream *self, const gchar *module_name, const gchar *stream_name); gboolean (*build_depends_on_stream) (ModulemdModuleStream *self, const gchar *module_name, const gchar *stream_name); /* Padding to allow adding up to 8 new virtual functions without * breaking ABI. */ gpointer padding[8]; };