## Modulemd.Obsoletes Modulemd.Obsoletes — Obsoletes information for a module stream. |

## Stability Level

Stable, unless otherwise indicated

## Functions

ModulemdObsoletes * | modulemd_obsoletes_new ()
ModulemdObsoletes * | modulemd_obsoletes_copy ()
gboolean | modulemd_obsoletes_validate ()
const gchar * | modulemd_obsoletes_get_module_context ()
void | modulemd_obsoletes_set_module_context ()
void | modulemd_obsoletes_set_modified ()
void | modulemd_obsoletes_set_reset ()
gboolean | modulemd_obsoletes_get_reset ()
void | modulemd_obsoletes_set_eol_date ()
guint64 | modulemd_obsoletes_get_eol_date ()
const gchar * | modulemd_obsoletes_get_message ()
void | modulemd_obsoletes_set_obsoleted_by ()
const gchar * | modulemd_obsoletes_get_obsoleted_by_module_name ()
const gchar * | modulemd_obsoletes_get_obsoleted_by_module_stream ()
guint64 | modulemd_obsoletes_get_modified ()
gboolean | modulemd_obsoletes_is_active ()

## Properties

guint64 | eol-date | Read / Write / Construct
guint64 | mdversion | Read / Write / Construct Only
char * | message | Read / Write / Construct Only
guint64 | modified | Read / Write / Construct
char * | module-context | Read / Write / Construct
char * | module-name | Read / Write / Construct Only
char * | module-stream | Read / Write / Construct Only
char * | obsoleted-by-module-name | Read / Write / Construct
char * | obsoleted-by-module-stream | Read / Write / Construct
gboolean | override-previous | Read / Write / Construct

## Types and Values

#define | MODULEMD_TYPE_OBSOLETES
enum | ModulemdObsoletesVersionEnum
| ModulemdObsoletes

## Object Hierarchy

        GEnum
        ╰── ModulemdObsoletesVersionEnum
        GObject
        ╰── ModulemdObsoletes

## Description

## Functions

### modulemd_obsoletes_new ()

    ModulemdObsoletes *
    modulemd_obsoletes_new (guint64 mdversion,
                            guint64 modified,
                            const gchar *module_name,
                            const gchar *module_stream,
                            const gchar *message);

#### Parameters

mdversion | The metadata version of this ModulemdObsoletes. | [in]
modified | The last modified time represented as a 64-bit integer (such as 201807011200). | [in]
module_name | The name of the module to which this obsoletes applies. | [in]
module_stream | The name of the module stream to which this obsoletes applies. | [in]
message | A string describing the change, reason, etc. | [in]

#### Returns

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

[transfer full]

Since: 2.10

### modulemd_obsoletes_copy ()

    ModulemdObsoletes *
    modulemd_obsoletes_copy (ModulemdObsoletes *self);

Create a copy of this ModulemdObsoletes object.

#### Parameters

self | This ModulemdObsoletes object. | [in]

#### Returns

The copied ModulemdObsoletes object.

[transfer full]

Since: 2.10

### modulemd_obsoletes_validate ()

    gboolean
    modulemd_obsoletes_validate (ModulemdObsoletes *self,
                                 GError **error);

This method ensures that the obsoletes is internally consistent for usage or dumping to YAML. It will be run implicitly prior to emitting YAML. This is not a complete linter, merely a sanity check that the values are not impossible.

#### Parameters

self | This ModulemdObsoletes object. | [in]
error | If the object is not valid, it will return the reason. | [out]

Since: 2.10

### modulemd_obsoletes_get_module_context ()

    const gchar *
    modulemd_obsoletes_get_module_context (ModulemdObsoletes *self);

#### Parameters

self | This ModulemdObsoletes object. | [in]

#### Returns

The context name to which this ModulemdObsoletes object applies.

[transfer none]

Since: 2.10

### modulemd_obsoletes_set_module_context ()

    void
    modulemd_obsoletes_set_module_context (ModulemdObsoletes *self,
                                           const gchar *module_context);

#### Parameters

self | This ModulemdObsoletes object. |
module_context | The name of the module context to which this obsoletes applies. | [in][nullable]

Since: 2.10

### modulemd_obsoletes_set_modified ()

    void
    modulemd_obsoletes_set_modified (ModulemdObsoletes *self,
                                     guint64 modified);

#### Parameters

self | This ModulemdObsoletes object. |
modified | The last modified time represented as a 64-bit integer (such as 201807011200). | [in]

Since: 2.10

### modulemd_obsoletes_set_reset ()

    void
    modulemd_obsoletes_set_reset (ModulemdObsoletes *self,
                                  gboolean reset);

Sets the reset attribute on ModulemdObsoletes object. With this boolean attribute set the obsoletes resets (cancels out) all previously specified obsoletes.

#### Parameters

self | This ModulemdObsoletes object. |
reset | Whether to reset/cancel all previously specified obsoletes. | [in]

Since: 2.10

### modulemd_obsoletes_get_reset ()

    gboolean
    modulemd_obsoletes_get_reset (ModulemdObsoletes *self);

#### Parameters

self | This ModulemdObsoletes object. | [in]

#### Returns

Whether this ModulemdObsoletes object cancels/resets all previously specified obsoletes.

Since: 2.10

### modulemd_obsoletes_set_eol_date ()

    void
    modulemd_obsoletes_set_eol_date (ModulemdObsoletes *self,
                                     guint64 eol_date);

#### Parameters

self | This ModulemdObsoletes object. |
eol_date | The end-of-life date for this stream. If set to zero, the stream is EOLed immediately. | [in]

Since: 2.10

### modulemd_obsoletes_get_eol_date ()

    guint64
    modulemd_obsoletes_get_eol_date (ModulemdObsoletes *self);

#### Parameters

self | This ModulemdObsoletes object. | [in]

#### Returns

A date represented as a 64-bit integer (such as 201807011200).

Since: 2.10

### modulemd_obsoletes_get_message ()

    const gchar *
    modulemd_obsoletes_get_message (ModulemdObsoletes *self);

#### Parameters

self | This ModulemdObsoletes object. | [in]

#### Returns

The message associated with this ModulemdObsoletes object.

[transfer none]

Since: 2.10

### modulemd_obsoletes_set_obsoleted_by ()

    void
    modulemd_obsoletes_set_obsoleted_by (ModulemdObsoletes *self,
                                         const gchar *obsoleted_by_module_name,
                                         const gchar *obsoleted_by_module_stream);

Sets both obsoleted by module name and stream because having one without the other is invalid.

#### Parameters

self | This ModulemdObsoletes object. |
obsoleted_by_module_name | The module name of obsoleting stream. | [in]
obsoleted_by_module_stream | The module stream of obsoleting stream. | [in]

Since: 2.10

### modulemd_obsoletes_get_obsoleted_by_module_name ()

    const gchar *
    modulemd_obsoletes_get_obsoleted_by_module_name
                                   (ModulemdObsoletes *self);

#### Parameters

self | This ModulemdObsoletes object. | [in]

#### Returns

The module name of obsoleting stream.

[transfer none]

Since: 2.10

### modulemd_obsoletes_get_obsoleted_by_module_stream ()

    const gchar *
    modulemd_obsoletes_get_obsoleted_by_module_stream
                                   (ModulemdObsoletes *self);

#### Parameters

self | This ModulemdObsoletes object. | [in]

#### Returns

The module stream of obsoleting stream.

[transfer none]

Since: 2.10

### modulemd_obsoletes_get_modified ()

    guint64
    modulemd_obsoletes_get_modified (ModulemdObsoletes *self);

#### Parameters

self | This ModulemdObsoletes object. | [in]

#### Returns

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

Since: 2.10

### modulemd_obsoletes_is_active ()

    gboolean
    modulemd_obsoletes_is_active (ModulemdObsoletes *self);

#### Parameters

self | This ModulemdObsoletes object. | [in]

#### Returns

If this ModulemdObsoletes object has eol_date set and the date has not occured yet it returns false otherwise it returns true. (When eol_date is not set or it already occured the obsoletes is active.)

Since: 2.10

## Types and Values

### MODULEMD_TYPE_OBSOLETES

    #define MODULEMD_TYPE_OBSOLETES (modulemd_obsoletes_get_type ())

### enum ModulemdObsoletesVersionEnum

#### Members

MD_OBSOLETES_VERSION_ERROR | Represents an error handling mdversion. |
MD_OBSOLETES_VERSION_UNSET | Represents an unset mdversion. |
MD_OBSOLETES_VERSION_ONE | Represents v1 of the ModulemdObsoletes metadata format. |
MD_OBSOLETES_VERSION_LATEST | Represents the highest-supported version of the ModulemdObsoletes metadata format. |

Since: 2.10

### ModulemdObsoletes

    typedef struct _ModulemdObsoletes ModulemdObsoletes;

## Property Details

### The `“eol-date”` property

      “eol-date”                 guint64

A string representing UTC date in ISO 8601 format: YYYY-MM-DDTHH:MMZ.

Owner: ModulemdObsoletes

Flags: Read / Write / Construct

Default value: 0

### The `“mdversion”` property

      “mdversion”                guint64

The metadata version of this obsoletes object.

Owner: ModulemdObsoletes

Flags: Read / Write / Construct Only

Default value: 0

### The `“message”` property

      “message”                  char *

A string describing the change, reason, etc.

Owner: ModulemdObsoletes

Flags: Read / Write / Construct Only

Default value: "__obsoletes_VALUE_UNSET__"

### The `“modified”` property

      “modified”                 guint64

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

Owner: ModulemdObsoletes

Flags: Read / Write / Construct

Default value: 0

### The `“module-context”` property

      “module-context”           char *

The name of the module context to which this obsoletes applies.

Owner: ModulemdObsoletes

Flags: Read / Write / Construct

Default value: NULL

### The `“module-name”` property

      “module-name”              char *

The name of the module to which this obsoletes applies.

Owner: ModulemdObsoletes

Flags: Read / Write / Construct Only

Default value: "__obsoletes_VALUE_UNSET__"

### The `“module-stream”` property

      “module-stream”            char *

The name of the module stream to which this obsoletes applies.

Owner: ModulemdObsoletes

Flags: Read / Write / Construct Only

Default value: "__obsoletes_VALUE_UNSET__"

### The `“obsoleted-by-module-name”` property

      “obsoleted-by-module-name” char *

Name of the module that obsoletes this one.

Owner: ModulemdObsoletes

Flags: Read / Write / Construct

Default value: NULL

### The `“obsoleted-by-module-stream”` property

      “obsoleted-by-module-stream” char *

Stream of the module that obsoletes this one.

Owner: ModulemdObsoletes

Flags: Read / Write / Construct

Default value: NULL

### The `“override-previous”` property

      “override-previous”        gboolean

A boolean option to cancel/reset all previously specified obsoletes.

Owner: ModulemdObsoletes

Flags: Read / Write / Construct

Default value: FALSE