as-enums

as-enums — Helper functions for converting to and from enum strings

Stability Level

Stable, unless otherwise indicated

Functions

Types and Values

enum AsIdKind
enum AsIconKind
enum AsUrlKind

Object Hierarchy


Includes

#include <appstream-glib.h>

Description

These helper functions may be useful if implementing an AppStream parser.

Functions

as_id_kind_to_string ()

const gchar *
as_id_kind_to_string (AsIdKind id_kind);

Converts the enumerated value to an text representation.

Parameters

id_kind

the AsIdKind.

 

Returns

string version of id_kind

Since 0.1.0


as_id_kind_from_string ()

AsIdKind
as_id_kind_from_string (const gchar *id_kind);

Converts the text representation to an enumerated value.

Parameters

id_kind

the string.

 

Returns

a AsIdKind or AS_ID_KIND_UNKNOWN for unknown

Since 0.1.0


as_icon_kind_to_string ()

const gchar *
as_icon_kind_to_string (AsIconKind icon_kind);

Converts the enumerated value to an text representation.

Parameters

icon_kind

the AsIconKind .

 

Returns

string version of icon_kind

Since 0.1.0


as_icon_kind_from_string ()

AsIconKind
as_icon_kind_from_string (const gchar *icon_kind);

Converts the text representation to an enumerated value.

Parameters

icon_kind

the string.

 

Returns

a AsIconKind or AS_ICON_KIND_UNKNOWN for unknown

Since 0.1.0


as_url_kind_to_string ()

const gchar *
as_url_kind_to_string (AsUrlKind url_kind);

Converts the enumerated value to an text representation.

Parameters

url_kind

the AsUrlKind .

 

Returns

string version of url_kind

Since 0.1.0


as_url_kind_from_string ()

AsUrlKind
as_url_kind_from_string (const gchar *url_kind);

Converts the text representation to an enumerated value.

Parameters

url_kind

the string.

 

Returns

a AsUrlKind or AS_URL_KIND_UNKNOWN for unknown

Since 0.1.0

Types and Values

enum AsIdKind

The ID type.

Members

AS_ID_KIND_UNKNOWN

Type invalid or not known

 

AS_ID_KIND_DESKTOP

A desktop application

 

AS_ID_KIND_FONT

A font add-on

 

AS_ID_KIND_CODEC

A codec add-on

 

AS_ID_KIND_INPUT_METHOD

A input method add-on

 

AS_ID_KIND_WEB_APP

A web appication

 

AS_ID_KIND_SOURCE

A software source

 

enum AsIconKind

The icon type.

Members

AS_ICON_KIND_UNKNOWN

Type invalid or not known

 

AS_ICON_KIND_STOCK

Stock icon or present in the generic icon theme

 

AS_ICON_KIND_CACHED

An icon shipped with the AppStream metadata

 

AS_ICON_KIND_REMOTE

An icon referenced by a remote URL

 

enum AsUrlKind

The URL type.

Members

AS_URL_KIND_UNKNOWN

Type invalid or not known

 

AS_URL_KIND_HOMEPAGE

Application project homepage