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_equals ()

gboolean
modulemd_defaults_equals (ModulemdDefaults *self_1,
                          ModulemdDefaults *self_2);

Parameters

self_1

A ModulemdDefaults object.

[in]

self_2

A ModulemdDefaults object.

[in]

Returns

TRUE if both self_1 and self_2 contain equal values, FALSE if they differed.

Since: 2.2


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


modulemd_defaults_set_modified ()

void
modulemd_defaults_set_modified (ModulemdDefaults *self,
                                guint64 modified);

Parameters

self

This ModulemdDefaults object.

[in]

modified

The last modified time represented as a 64-bit integer (such as 201807011200).

[in]

Since: 2.0


modulemd_defaults_get_modified ()

guint64
modulemd_defaults_get_modified (ModulemdDefaults *self);

Parameters

self

This ModulemdDefaults object.

[in]

Returns

The last modified time represented as a 64-bit integer (such as 201807011200)

Since: 2.0

Types and Values

enum ModulemdDefaultsVersionEnum

Members

MD_DEFAULTS_VERSION_ERROR

Represents an error handling mdversion.

 

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);

  gboolean (*equals) (ModulemdDefaults *self_1, ModulemdDefaults *self_2);

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

ModulemdDefaults

typedef struct _ModulemdDefaults ModulemdDefaults;