Top | ![]() |
![]() |
![]() |
![]() |
#define | AS_TYPE_CONTENT |
struct | AsContentRatingClass |
enum | AsContentRatingValue |
AsContentRating |
const gchar *
as_content_rating_value_to_string (AsContentRatingValue value
);
Converts the enumerated value to an text representation.
Since: 0.11.0
AsContentRatingValue
as_content_rating_value_from_string (const gchar *value
);
Converts the text representation to an enumerated value.
Since: 0.11.0
guint as_content_rating_attribute_to_csm_age (const gchar *id
,AsContentRatingValue value
);
Gets the Common Sense Media approved age for a specific rating level.
id |
the subsection ID e.g. |
|
value |
the AsContentRatingValue, e.g. |
Since: 0.12.10
const gchar **
as_content_rating_get_all_rating_ids (void
);
Returns a list of all the valid OARS content rating attribute IDs as could
be passed to as_content_rating_add_attribute()
or
as_content_rating_attribute_to_csm_age()
.
a NULL
-terminated
array of IDs, to be freed with g_free()
(the element values are owned by
libappstream-glib and must not be freed).
[array zero-terminated=1][transfer container]
Since: 0.12.10
AsContentRating *
as_content_rating_new (void
);
Creates a new AsContentRating.
Since: 0.11.0
const gchar *
as_content_rating_get_kind (AsContentRating *content_rating
);
Gets the content_rating kind.
Since: 0.11.0
void as_content_rating_set_kind (AsContentRating *content_rating
,const gchar *kind
);
Sets the content rating kind.
Since: 0.11.0
guint
as_content_rating_get_minimum_age (AsContentRating *content_rating
);
Gets the lowest Common Sense Media approved age for the content_rating block. NOTE: these numbers are based on the data and descriptions available from https://www.commonsensemedia.org/about-us/our-mission/about-our-ratings and you may disagree with them.
You're free to disagree with these, and of course you should use your own brain to work our if your child is able to cope with the concepts enumerated here. Some 13 year olds may be fine with the concept of mutilation of body parts; others may get nightmares.
Since: 0.11.0
AsContentRatingValue as_content_rating_get_value (AsContentRating *content_rating
,const gchar *id
);
Gets the value of a content rating key.
Since: 0.11.0
void as_content_rating_set_value (AsContentRating *content_rating
,const gchar *id
,AsContentRatingValue value
);
Sets the value of a content rating key.
content_rating |
||
id |
A ratings ID, e.g. |
|
value |
A AsContentRatingValue, e.g. |
Since: 0.11.0
const gchar **
as_content_rating_get_rating_ids (AsContentRating *content_rating
);
Gets the set of ratings IDs which are present in this content_rating
. An
example of a ratings ID is violence-bloodshed
.
The IDs are returned in lexicographical order.
NULL
-terminated
array of ratings IDs; each ratings ID is owned by the AsContentRating and
must not be freed, but the container must be freed with g_free()
.
[array zero-terminated=1][transfer container]
Since: 0.12.10