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

## Stability Level

Private, unless otherwise indicated

## Functions

gboolean | modulemd_module_index_update_from_file_ext ()
gboolean | modulemd_module_index_update_from_parser ()
gboolean | modulemd_module_index_merge ()

## Description

## Functions

### modulemd_module_index_update_from_file_ext ()

    gboolean
    modulemd_module_index_update_from_file_ext
                                   (ModulemdModuleIndex *self,
                                    const gchar *yaml_file,
                                    gboolean strict,
                                    gboolean autogen_module_name,
                                    GPtrArray **failures,
                                    GError **error);

#### Parameters

self | This ModulemdModuleIndex object. |
yaml_file | A YAML file containing the module metadata and other related information such as default streams. | [in]
strict | Whether the parser should return failure if it encounters an unknown mapping key or if it should ignore it. | [in]
autogen_module_name | Whether the parser should automatically generate a module name and stream name if they are not provided by the file being read in. This is intended mainly for applications interacting with modulemd docs that are build input. | [in]
failures | An array containing any subdocuments from the YAML file that failed to parse. See ModulemdSubdocumentInfo for more details. | [out][element-type ModulemdSubdocumentInfo][transfer container]
error | A GError containing additional information if this function fails in a way that prevents program continuation. | [out]

#### Returns

TRUE if the update was successful. Returns FALSE and sets `failures` appropriately if any of the YAML subdocuments were invalid or sets `error` if there was a fatal parse error.

Since: 2.9

### modulemd_module_index_update_from_parser ()

    gboolean
    modulemd_module_index_update_from_parser
                                   (ModulemdModuleIndex *self,
                                    yaml_parser_t *parser,
                                    gboolean strict,
                                    gboolean autogen_module_name,
                                    GPtrArray **failures,
                                    GError **error);

#### Parameters

self | This ModulemdModuleIndex object. | [in]
parser | An initialized YAML parser that has not yet processed any events. | [inout]
strict | Whether the parser should return failure if it encounters an unknown mapping key or if it should ignore it. | [in]
autogen_module_name | When parsing a module stream that contains no module name or stream name, whether to autogenerate one or not. This option should be used only for validation tools such as modulemd-validator. Normal public routines should always set this to FALSE. | [in]
failures | An array containing any subdocuments from the YAML file that failed to parse. See ModulemdSubdocumentInfo for more details. If the array is NULL, it will be allocated by this function. If it is non-NULL, this function will append to it. | [out][element-type ModulemdSubdocumentInfo][transfer container]
error | A GError containing additional information if this function fails in a way that prevents program continuation. | [out]

#### Returns

TRUE if the update was successful. Returns FALSE and sets failures appropriately if any of the YAML subdocuments were invalid or sets `error` if there was a fatal parse error.

Since: 2.0

### modulemd_module_index_merge ()

    gboolean
    modulemd_module_index_merge (ModulemdModuleIndex *from,
                                 ModulemdModuleIndex *into,
                                 gboolean override,
                                 gboolean strict_default_streams,
                                 GError **error);

#### Parameters

from | The ModulemdModuleIndex whose contents are being merged in. | [in][transfer none]
into | The ModulemdModuleIndex whose contents are being merged updated by those from `from` . | [inout][transfer none]
override | In the event that the contents cannot be merged, this argument specifies whether the contents of `from` will supersede those from `into` . For specifics of how this works, see the Description section for ModulemdModuleIndexMerger. | [in]
strict_default_streams | When merging ModulemdDefaults, treat conflicting stream defaults as an error if this is True. Otherwise, on a conflict, the default stream will be unset. | [in]
error | If the merge fails, this will return a GError explaining the reason for it. | [out]

#### Returns

TRUE if the two ModulemdModuleIndex objects could be merged without conflicts. FALSE and sets `error` appropriately if the merge fails.

Since: 2.0