## as-enums

as-enums — Some enums used by various other modules

## Functions

#define | as_flags_add()
#define | as_flags_remove()
#define | as_flags_invert()
#define | as_flags_contains()
const gchar * | as_url_kind_to_string ()
AsUrlKind | as_url_kind_from_string ()
const gchar * | as_format_kind_to_string ()
AsFormatKind | as_format_kind_from_string ()
const gchar * | as_urgency_kind_to_string ()
AsUrgencyKind | as_urgency_kind_from_string ()

## Types and Values

enum | AsFormatStyle
enum | AsFormatKind
enum | AsUrlKind
enum | AsUrgencyKind

## Includes

    #include <appstream.h>

## Description

## Functions

### as_flags_add()

    #define as_flags_add(bitfield,enum)		do { ((bitfield) |= (enum)); } while (0)

### as_flags_remove()

    #define as_flags_remove(bitfield,enum)		do { ((bitfield) &= ~(enum)); } while (0)

### as_flags_invert()

    #define as_flags_invert(bitfield,enum)		do { ((bitfield) ^= enum); } while (0)

### as_flags_contains()

    #define as_flags_contains(bitfield,enum) (((bitfield) & enum) > 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`

### 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

### as_format_kind_to_string ()

    const gchar *
    as_format_kind_to_string (AsFormatKind kind);

Converts the enumerated value to an text representation.

#### Parameters

kind | the AsFormatKind. |

#### Returns

string version of `kind`

Since: 0.10

### as_format_kind_from_string ()

    AsFormatKind
    as_format_kind_from_string (const gchar *kind_str);

Converts the text representation to an enumerated value.

#### Parameters

kind_str | the string. |

#### Returns

a AsFormatKind or `AS_FORMAT_KIND_UNKNOWN` for unknown

Since: 0.10

### as_urgency_kind_to_string ()

    const gchar *
    as_urgency_kind_to_string (AsUrgencyKind urgency_kind);

Converts the enumerated value to an text representation.

#### Parameters

urgency_kind | the `AsUrgencyKind`. |

#### Returns

string version of `urgency_kind`

Since: 0.6.5

### as_urgency_kind_from_string ()

    AsUrgencyKind
    as_urgency_kind_from_string (const gchar *urgency_kind);

Converts the text representation to an enumerated value.

#### Parameters

urgency_kind | the string. |

#### Returns

a `AsUrgencyKind` or `AS_URGENCY_KIND_UNKNOWN` for unknown

Since: 0.6.5

## Types and Values

### enum AsFormatStyle

There are a few differences between AppStream's metainfo files (shipped by upstream projects) and the catalog metadata (shipped by distributors). The data source kind indicates which style we should process. Usually you do not want to set this explicitly.

#### Members

AS_FORMAT_STYLE_UNKNOWN | The format style is unknown. |
AS_FORMAT_STYLE_METAINFO | Parse AppStream upstream metadata (metainfo files) |
AS_FORMAT_STYLE_CATALOG | Parse AppStream metadata catalog (shipped by software distributors) |
AS_FORMAT_STYLE_COLLECTION |  |

### enum AsFormatKind

Format of the AppStream metadata.

#### Members

AS_FORMAT_KIND_UNKNOWN | Unknown metadata format. |
AS_FORMAT_KIND_XML | AppStream XML metadata. |
AS_FORMAT_KIND_YAML | AppStream YAML (DEP-11) metadata. |
AS_FORMAT_KIND_DESKTOP_ENTRY | XDG Desktop Entry data. |

### enum AsUrlKind

The URL type.

#### Members

AS_URL_KIND_UNKNOWN | Type invalid or not known |
AS_URL_KIND_HOMEPAGE | Project homepage |
AS_URL_KIND_BUGTRACKER | Bugtracker |
AS_URL_KIND_FAQ | FAQ page |
AS_URL_KIND_HELP | Help manual |
AS_URL_KIND_DONATION | Page with information about how to donate to the project |
AS_URL_KIND_TRANSLATE | Page with instructions on how to translate the project / submit translations. |
AS_URL_KIND_CONTACT | Contact the developers |
AS_URL_KIND_VCS_BROWSER | Browse the source code |
AS_URL_KIND_CONTRIBUTE | Help developing |

### enum AsUrgencyKind

The urgency of an AsRelease

#### Members

AS_URGENCY_KIND_UNKNOWN | Urgency is unknown or not set |
AS_URGENCY_KIND_LOW | Low urgency |
AS_URGENCY_KIND_MEDIUM | Medium urgency |
AS_URGENCY_KIND_HIGH | High urgency |
AS_URGENCY_KIND_CRITICAL | Critical urgency |