Modulemd.PackagerV3 (Private): Modulemd Reference Manual

## Modulemd.PackagerV3 (Private) Modulemd.PackagerV3 (Private) — ModulemdPackagerV3 methods that should only be used by internal consumers. |

## Stability Level

Private, unless otherwise indicated

## Functions

gboolean | modulemd_packager_v3_to_defaults ()
ModulemdModuleStreamV2 * | modulemd_packager_v3_to_stream_v2 ()
ModulemdModuleIndex * | modulemd_packager_v3_to_stream_v2_ext ()
ModulemdPackagerV3 * | modulemd_packager_v3_parse_yaml ()
gboolean | modulemd_packager_v3_emit_yaml ()

## Description

## Functions

### modulemd_packager_v3_to_defaults ()

    gboolean
    modulemd_packager_v3_to_defaults (ModulemdPackagerV3 *self,
                                      ModulemdDefaults **defaults_ptr,
                                      GError **error);

Sets `defaults_ptr` to point to a newly-allocated ModulemdDefaults object corresponding to the ModulemdPackagerV3 object `self` if `self` contains any profiles marked as default. Leaves `defaults_ptr` pointing to NULL if `self` contained no default profiles.

#### Parameters

self | This ModulemdPackagerV3 object. | [in]
defaults_ptr | (transfer-full): A pointer to a pointer to a new ModulemdDefaults object. Must be a valid pointer to a NULL object when called. | [out]
error | A GError that will return the reason for a conversion error. | [out]

#### Returns

TRUE if the conversion succeeded, including the case where there `self` contains no default profiles. FALSE otherwise and `error` will be set.

Since: 2.11

### modulemd_packager_v3_to_stream_v2 ()

    ModulemdModuleStreamV2 *
    modulemd_packager_v3_to_stream_v2 (ModulemdPackagerV3 *self,
                                       GError **error);

#### Parameters

self | This ModulemdPackagerV3 object. | [in]
error | A GError that will return the reason for a conversion error. | [out]

#### Returns

A newly-allocated ModulemdModuleStreamV2 object corresponding to the ModulemdPackagerV3 object `self` . NULL if there was an error doing the mapping and sets `error` appropriately.

[transfer full]

Since: 2.11

### modulemd_packager_v3_to_stream_v2_ext ()

    ModulemdModuleIndex *
    modulemd_packager_v3_to_stream_v2_ext (ModulemdPackagerV3 *self,
                                           GError **error);

Note: If buildopts (ModulemdBuildopts) are in use in one or more build configurations in the ModulemdPackagerV3 object `self` , only the buildopts present in the first listed configuration (if any) will be applied to the ModulemdModuleStreamV2 object in the returned index.

#### Parameters

self | This ModulemdPackagerV3 object. | [in]
error | A GError that will return the reason for a conversion error. | [out]

#### Returns

A newly-allocated ModulemdModuleIndex object containing a ModulemdModuleStreamV2 object and possibly a ModulemdDefaults object corresponding to the ModulemdPackagerV3 object `self` . NULL if there was an error doing the mapping and sets `error` appropriately.

[transfer full]

Since: 2.11

### modulemd_packager_v3_parse_yaml ()

    ModulemdPackagerV3 *
    modulemd_packager_v3_parse_yaml (ModulemdSubdocumentInfo *subdoc,
                                     GError **error);

Parse a ModulemdPackagerV3 document. This parser always operates in strict mode, since it should only be used as input for a build-system.

#### Parameters

subdoc | A ModulemdSubdocumentInfo representing a packager v3 document. | [in]
error | A GError that will return the reason for a parsing or validation error. | [out]

#### Returns

A newly-allocated ModulemdPackagerV3 object read from the YAML. NULL if a parse or validation error occurred and sets `error` appropriately.

[transfer full]

Since: 2.11

### modulemd_packager_v3_emit_yaml ()

    gboolean
    modulemd_packager_v3_emit_yaml (ModulemdPackagerV3 *self,
                                    yaml_emitter_t *emitter,
                                    GError **error);

#### Parameters

self | This ModulemdPackagerV3 object. |
emitter | A libyaml emitter object positioned where the data section of a ModulemdPackagerV3 belongs in the YAML document. | [inout]
error | A GError that will return the reason for an emission or validation error. | [out]

#### Returns

TRUE if the modulemd-packager v3 document was emitted successfully. FALSE and sets `error` appropriately if the YAML could not be emitted.

Since: 2.11