AppStream.ContentRating.attribute_from_csm_age
Description: Reference for AppStream.ContentRating.attribute_from_csm_age

### Function

# AppStream ContentRatingattribute_from_csm_age

since: 0.12.12

#### Declaration [src]

    AsContentRatingValue
    as_content_rating_attribute_from_csm_age (
      const gchar* id,
      guint age
    )

#### Description [src]

Gets the highest `AsContentRatingValue` which is allowed to be seen by the given Common Sense Media `age` for the given subsection `id`.

For example, if the CSM age mappings for `violence-bloodshed` are: * age ≥ 0 for `AS_CONTENT_RATING_VALUE_NONE` * age ≥ 9 for `AS_CONTENT_RATING_VALUE_MILD` * age ≥ 11 for `AS_CONTENT_RATING_VALUE_MODERATE` * age ≥ 18 for `AS_CONTENT_RATING_VALUE_INTENSE` then calling this function with `violence-bloodshed` and `age` set to 17 would return `AS_CONTENT_RATING_VALUE_MODERATE`. Calling it with age 18 would return `AS_CONTENT_RATING_VALUE_INTENSE`.

Available since: 0.12.12

#### Parameters

`id`

  Type: `const gchar*`

  The subsection ID e.g. `violence-cartoon`

  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

`age`

  Type: `guint`

  The CSM age.

#### Return value

Type: `AsContentRatingValue`

The `AsContentRatingValue`, or `AS_CONTENT_RATING_VALUE_UNKNOWN` if unknown.