manpagez: man pages & more
html files: appstream-glib
Home | html | info | man

as-tag

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

Stability Level

Stable, unless otherwise indicated

Types and Values

enum AsTag
enum AsTagFlags

Includes

#include <appstream-glib.h>

Description

These functions will convert a tag enum such as AS_TAG_COMPONENT 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_from_string_full ()

AsTag
as_tag_from_string_full (const gchar *tag,
                         AsTagFlags flags);

Converts the text representation to an enumerated value also converting legacy key names.

Parameters

tag

the string.

 

flags

the AsTagFlags e.g. AS_TAG_FLAG_USE_FALLBACKS

 

Returns

a AsTag, or AS_TAG_UNKNOWN if not known.

Since: 0.1.2


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_COMPONENTS

components

 

AS_TAG_COMPONENT

component

 

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

categories

 

AS_TAG_CATEGORY

category

 

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

 

AS_TAG_SCREENSHOT

screenshot

 

AS_TAG_SCREENSHOTS

screenshots

 

AS_TAG_UPDATE_CONTACT

update_contact

 

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

 

AS_TAG_ARCHITECTURES

architectures

 

AS_TAG_ARCH

arch

 

AS_TAG_METADATA_LICENSE

metadata_license

 

AS_TAG_PROVIDES

provides

 

AS_TAG_EXTENDS

extends

 

AS_TAG_DEVELOPER_NAME

developer_name

 

AS_TAG_KUDOS

kudos

 

AS_TAG_KUDO

kudo

 

AS_TAG_SOURCE_PKGNAME

source_pkgname

 

AS_TAG_VETOS

vetos

 

AS_TAG_VETO

veto

 

AS_TAG_BUNDLE

bundle

 

AS_TAG_PERMISSIONS

permissions

 

AS_TAG_PERMISSION

permission

 

AS_TAG_LOCATION

location

 

AS_TAG_CHECKSUM

checksum

 

AS_TAG_SIZE

size

 

AS_TAG_TRANSLATION

translation

 

AS_TAG_CONTENT_RATING

content_rating

 

AS_TAG_CONTENT_ATTRIBUTE

content_attribute

 

AS_TAG_VERSION

version

 

AS_TAG_REVIEWS

reviews

 

AS_TAG_REVIEW

review

 

AS_TAG_REVIEWER_NAME

reviewer_name

 

AS_TAG_REVIEWER_ID

reviewer_id

 

AS_TAG_SUGGESTS

suggests

 

AS_TAG_REQUIRES

requires

 

AS_TAG_CUSTOM

custom

 

AS_TAG_LAUNCHABLE

launchable

 

enum AsTagFlags

The flags to use when matching AsTag's.

Members

AS_TAG_FLAG_NONE

No special actions to use

 

AS_TAG_FLAG_USE_FALLBACKS

Use fallback tag names

 

AS_TAG_FLAG_USE_TRANSLATED

Use translated tag names

 
© manpagez.com 2000-2017
Individual documents may contain additional copyright information.