as-tag

as-tag — Helper functions to convert to and from tag enums

Stability Level

Stable, unless otherwise indicated

Functions

Types and Values

enum AsTag

Object Hierarchy


Includes

#include <appstream-glib.h>

Description

These functions will convert a tag enum such as AS_TAG_APPLICATION to it's string form, and also vice-versa.

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

Functions

as_tag_from_string ()

AsTag
as_tag_from_string (const gchar *tag);

Converts the text representation to an enumerated value.

Parameters

tag

the string.

 

Returns

a AsTag, or AS_TAG_UNKNOWN if not known.

Since 0.1.0


as_tag_to_string ()

const gchar *
as_tag_to_string (AsTag tag);

Converts the enumerated value to an text representation.

Parameters

tag

the AsTag value.

 

Returns

string version of tag

Since 0.1.0

Types and Values

enum AsTag

The tag type.

Members

AS_TAG_UNKNOWN

Type invalid or not known

 

AS_TAG_APPLICATIONS

applications

 

AS_TAG_APPLICATION

application

 

AS_TAG_ID

id

 

AS_TAG_PKGNAME

pkgname

 

AS_TAG_NAME

name

 

AS_TAG_SUMMARY

summary

 

AS_TAG_DESCRIPTION

description

 

AS_TAG_URL

url

 

AS_TAG_ICON

icon

 

AS_TAG_CATEGORIES

appcategories

 

AS_TAG_CATEGORY

appcategory

 

AS_TAG_KEYWORDS

keywords

 

AS_TAG_KEYWORD

keyword

 

AS_TAG_MIMETYPES

mimetypes

 

AS_TAG_MIMETYPE

mimetype

 

AS_TAG_PROJECT_GROUP

project_group

 

AS_TAG_PROJECT_LICENSE

project_license (or licence)

 

AS_TAG_SCREENSHOT

screenshot

 

AS_TAG_SCREENSHOTS

screenshots

 

AS_TAG_UPDATE_CONTACT

updatecontact

 

AS_TAG_IMAGE

image

 

AS_TAG_COMPULSORY_FOR_DESKTOP

compulsory_for_desktop

 

AS_TAG_PRIORITY

priority

 

AS_TAG_CAPTION

caption

 

AS_TAG_LANGUAGES

languages

 

AS_TAG_LANG

lang

 

AS_TAG_METADATA

metadata

 

AS_TAG_VALUE

value

 

AS_TAG_RELEASES

releases

 

AS_TAG_RELEASE

release