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
,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] |
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
,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] |
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
,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] |
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
gchar *
modulemd_module_stream_get_nsvc_as_string
(ModulemdModuleStream *self
);
[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
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); /* Padding to allow adding up to 10 new virtual functions without * breaking ABI. */ gpointer padding[10]; };