Modulemd.Prioritizer

Modulemd.Prioritizer — Class to aid in merging module metadata from multiple repositories.

Functions

Types and Values

Description

Functions

modulemd_prioritizer_error_quark ()

GQuark
modulemd_prioritizer_error_quark (void);

modulemd_prioritizer_new ()

ModulemdPrioritizer *
modulemd_prioritizer_new (void);

Returns

A newly-allocated ModulemdPrioritizer. This object must be freed with g_object_unref().

[transfer full]

Since: 1.3


modulemd_prioritizer_add ()

gboolean
modulemd_prioritizer_add (ModulemdPrioritizer *self,
                          GPtrArray *objects,
                          gint64 priority,
                          GError **error);

Parameters

objects

A GPtrArray of module-related objects loaded from a modulemd YAML stream.

[array zero-terminated=1][element-type GObject]

priority

The priority of the YAML stream these were loaded from. Items at the same priority level will attempt to merge on conflict. Items at higher priority levels will replace on conflict. Valid values are 0 - 1000.

 

Returns

TRUE if the objects could be added without generating a conflict at this priority level. If a conflict was detected, this function returns FALSE and error is set. The internal state is undefined in the case of an error.

Since: 1.3


modulemd_prioritizer_resolve ()

GPtrArray *
modulemd_prioritizer_resolve (ModulemdPrioritizer *self,
                              GError **error);

Returns

A GPtrArray of module-related objects with all priorities resolved. This object must be freed with g_ptr_array_unref().

[array zero-terminated=1][element-type GObject][transfer container]

Since: 1.3


modulemd_prioritizer_add_index ()

gboolean
modulemd_prioritizer_add_index (ModulemdPrioritizer *self,
                                GHashTable *index,
                                gint64 priority,
                                GError **error);

Parameters

index

A GHashTable of ModulemdImprovedModule objects whose contents need to be merged depending on priority.

[transfer none][not nullable]

priority

The priority of the YAML stream these were loaded from. Items at the same priority level will attempt to merge on conflict. Items at higher priority levels will replace on conflict. Valid values are 0 - 1000.

 

Returns

TRUE if the objects could be added without generating a conflict at this priority level. If a conflict was detected, this function returns FALSE and error is set. The internal state is undefined in the case of an error.

Since: 1.6


modulemd_prioritizer_resolve_index ()

GHashTable *
modulemd_prioritizer_resolve_index (ModulemdPrioritizer *self,
                                    GError **error);

Returns

A GHashTable of ModulemdImprovedModule objects with all priorities resolved. This hash table must be freed with g_hash_table_unref().

[element-type utf8 ModulemdImprovedModule][transfer container]

Since: 1.6

Types and Values

MODULEMD_PRIORITIZER_ERROR

#define MODULEMD_PRIORITIZER_ERROR modulemd_prioritizer_error_quark ()

MODULEMD_PRIORITIZER_PRIORITY_MAX

#define MODULEMD_PRIORITIZER_PRIORITY_MAX 1000

MODULEMD_PRIORITIZER_PRIORITY_MIN

#define MODULEMD_PRIORITIZER_PRIORITY_MIN 0

MODULEMD_TYPE_PRIORITIZER

#define MODULEMD_TYPE_PRIORITIZER (modulemd_prioritizer_get_type ())

ModulemdPrioritizer

typedef struct _ModulemdPrioritizer ModulemdPrioritizer;