AsContentRating: AppStream-glib Reference Manual

## AsContentRating AsContentRating — Object representing a content rating |

## Stability Level

Unstable, unless otherwise indicated

## Functions

#define | AS_TYPE_CONTENT
AsContentRating * | as_content_rating_new ()
const gchar * | as_content_rating_value_to_string ()
AsContentRatingValue | as_content_rating_value_from_string ()
const gchar * | as_content_rating_get_kind ()
void | as_content_rating_set_kind ()

## Types and Values

struct | AsContentRatingClass
enum | AsContentRatingValue
| AsContentRating

## Object Hierarchy

        GObject
        ╰── AsContentRating

## Includes

    #include <appstream-glib.h>

## Description

Content ratings are age-specific guidelines for applications.

See also: AsApp

## Functions

### AS_TYPE_CONTENT

    #define AS_TYPE_CONTENT (as_content_rating_get_type ())

### as_content_rating_new ()

    AsContentRating *
    as_content_rating_new (void);

Creates a new AsContentRating.

#### Returns

a AsContentRating.

[transfer full]

Since: 0.5.12

### as_content_rating_value_to_string ()

    const gchar *
    as_content_rating_value_to_string (AsContentRatingValue value);

Converts the enumerated value to an text representation.

#### Parameters

value | the AsContentRatingValue. |

#### Returns

string version of `value`

Since: 0.5.12

### as_content_rating_value_from_string ()

    AsContentRatingValue
    as_content_rating_value_from_string (const gchar *value);

Converts the text representation to an enumerated value.

#### Parameters

value | the string. |

#### Returns

a AsContentRatingValue or `AS_CONTENT_RATING_VALUE_UNKNOWN` for unknown

Since: 0.5.12

### as_content_rating_get_kind ()

    const gchar *
    as_content_rating_get_kind (AsContentRating *content_rating);

Gets the content_rating kind.

#### Parameters

content_rating | a AsContentRating instance. |

#### Returns

a string, e.g. "oars-1.0", or NULL

Since: 0.5.12

### as_content_rating_set_kind ()

    void
    as_content_rating_set_kind (AsContentRating *content_rating,
                                const gchar *kind);

Sets the content rating kind.

#### Parameters

content_rating | a AsContentRating instance. |
kind | the rating kind, e.g. "oars-1.0" |

Since: 0.5.12

## Types and Values

### struct AsContentRatingClass

    struct AsContentRatingClass {
    	GObjectClass		parent_class;
    };

### enum AsContentRatingValue

The specified level of an content_rating rating ID.

#### Members

AS_CONTENT_RATING_VALUE_UNKNOWN | Unknown value |
AS_CONTENT_RATING_VALUE_NONE | None |
AS_CONTENT_RATING_VALUE_MILD | A small amount |
AS_CONTENT_RATING_VALUE_MODERATE | A moderate amount |
AS_CONTENT_RATING_VALUE_INTENSE | An intense amount |

### AsContentRating

    typedef struct _AsContentRating AsContentRating;