Modulemd.Defaults

Modulemd.Defaults — Parent class for Default documents. See ModulemdDefaultsV1 for a specific type.

Stability Level

Stable, unless otherwise indicated

Functions

Types and Values

Description

Functions

modulemd_defaults_new ()

ModulemdDefaults *
modulemd_defaults_new (guint64 version,
                       const gchar *module_name);

Create a new ModulemdDefaults.

Parameters

version

The version of the defaults metadata to create

 

module_name

The name of the module to which these defaults apply

 

Returns

a newly created ModulemdDefaults subtype of the requested version.

[transfer full]

Since: 2.0


modulemd_defaults_copy ()

ModulemdDefaults *
modulemd_defaults_copy (ModulemdDefaults *self);

Parameters

self

This ModulemdDefaults object.

[in]

Returns

A newly-allocated copy of self .

[transfer full]

Since: 2.0


modulemd_defaults_validate ()

gboolean
modulemd_defaults_validate (ModulemdDefaults *self,
                            GError **error);

Parameters

self

This ModulemdDefaults object.

[in]

error

A GError that will return the reason for a validation error.

[out]

Returns

TRUE if validation passed, FALSE and sets error appropriately if validation failed.

Since: 2.0


modulemd_defaults_upgrade ()

ModulemdDefaults *
modulemd_defaults_upgrade (ModulemdDefaults *self,
                           guint64 mdversion,
                           GError **error);

Parameters

self

This ModulemdDefaults object.

[in]

mdversion

The version to upgrade to.

[in]

error

A GError that will return the reason for an upgrade error.

[out]

Returns

A newly-allocated copy of self upgraded to the requested defaults version. NULL if the upgrade cannot be performed and sets error appropriately. This function does not modify self .

[transfer full]

Since: 2.0


modulemd_defaults_get_module_name ()

const gchar *
modulemd_defaults_get_module_name (ModulemdDefaults *self);

Parameters

self

This ModulemdDefaults object.

[in]

Returns

The name of the module to which these defaults apply.

[transfer none]

Since: 2.0


modulemd_defaults_get_mdversion ()

guint64
modulemd_defaults_get_mdversion (ModulemdDefaults *self);

Parameters

self

This ModulemdDefaults object.

[in]

Returns

The metadata version of this defaults object.

Since: 2.0

Types and Values

enum ModulemdDefaultsVersionEnum

Members

MD_DEFAULTS_VERSION_UNSET

   

MD_DEFAULTS_VERSION_ONE

Represents v1 of the Modulemd.Defaults metadata format.

 

MD_DEFAULTS_VERSION_LATEST

Represents the highest-supported version of the Modulemd.Defaults metadata format.

 

Since: 2.0


MODULEMD_TYPE_DEFAULTS

#define MODULEMD_TYPE_DEFAULTS (modulemd_defaults_get_type ())

struct ModulemdDefaultsClass

struct ModulemdDefaultsClass {
  GObjectClass parent_class;

  ModulemdDefaults *(*copy) (ModulemdDefaults *self);

  gboolean (*validate) (ModulemdDefaults *self, GError **error);

  guint64 (*get_mdversion) (ModulemdDefaults *self);

  /* Padding to allow adding up to 10 new virtual functions without
   * breaking ABI. */
  gpointer padding[10];
};

ModulemdDefaults

typedef struct _ModulemdDefaults ModulemdDefaults;