GsOsRelease: GNOME Software Reference Manual

## GsOsRelease GsOsRelease — Data from os-release |

## Stability Level

Unstable, unless otherwise indicated

## Functions

GsOsRelease * | gs_os_release_new ()
const gchar * | gs_os_release_get_name ()
const gchar * | gs_os_release_get_version ()
const gchar * | gs_os_release_get_id ()
const gchar * | gs_os_release_get_version_id ()
const gchar * | gs_os_release_get_pretty_name ()
const gchar * | gs_os_release_get_distro_codename ()

## Types and Values

#define | GS_TYPE_OS_RELEASE
| GsOsRelease

## Object Hierarchy

        GObject
        ╰── GsOsRelease

## Implemented Interfaces

GsOsRelease implements GInitable.

## Includes

    #include <gnome-software.h>

## Description

This object allows plugins to parse /etc/os-release for distribution metadata information.

## Functions

### gs_os_release_new ()

    GsOsRelease *
    gs_os_release_new (GError **error);

Creates a new os_release.

#### Parameters

error | a GError, or `NULL` |

#### Returns

A newly allocated GsOsRelease, or `NULL` for error.

[transfer full]

Since: 3.22

### gs_os_release_get_name ()

    const gchar *
    gs_os_release_get_name (GsOsRelease *os_release);

Gets the name from the os-release parser.

#### Parameters

os_release | A GsOsRelease |

#### Returns

a string, or `NULL`

Since: 3.22

### gs_os_release_get_version ()

    const gchar *
    gs_os_release_get_version (GsOsRelease *os_release);

Gets the version from the os-release parser.

#### Parameters

os_release | A GsOsRelease |

#### Returns

a string, or `NULL`

Since: 3.22

### gs_os_release_get_id ()

    const gchar *
    gs_os_release_get_id (GsOsRelease *os_release);

Gets the ID from the os-release parser.

#### Parameters

os_release | A GsOsRelease |

#### Returns

a string, or `NULL`

Since: 3.22

### gs_os_release_get_version_id ()

    const gchar *
    gs_os_release_get_version_id (GsOsRelease *os_release);

Gets the version ID from the os-release parser.

#### Parameters

os_release | A GsOsRelease |

#### Returns

a string, or `NULL`

Since: 3.22

### gs_os_release_get_pretty_name ()

    const gchar *
    gs_os_release_get_pretty_name (GsOsRelease *os_release);

Gets the pretty name from the os-release parser.

#### Parameters

os_release | A GsOsRelease |

#### Returns

a string, or `NULL`

Since: 3.22

### gs_os_release_get_distro_codename ()

    const gchar *
    gs_os_release_get_distro_codename (GsOsRelease *os_release);

Gets the distro codename from the os-release parser.

#### Parameters

os_release | A GsOsRelease |

#### Returns

a string, or `NULL`

Since: 3.22

## Types and Values

### GS_TYPE_OS_RELEASE

    #define GS_TYPE_OS_RELEASE (gs_os_release_get_type ())

### GsOsRelease

    typedef struct _GsOsRelease GsOsRelease;