as-provides

as-provides — Description of the provides-types in components

Functions

Types and Values

Object Hierarchy


Includes

#include <appstream.h>

Description

Components can provide various items, like libraries, Python-modules, firmware, binaries, etc. Functions to work with these items are provided here.

See also: AsComponent

Functions

as_provides_kind_to_string ()

const gchar *
as_provides_kind_to_string (AsProvidesKind kind);

Converts the enumerated value to an text representation.

Parameters

kind

the AsProvidesKind.

 

Returns

string version of kind


as_provides_kind_from_string ()

AsProvidesKind
as_provides_kind_from_string (const gchar *kind_str);

Converts the text representation to an enumerated value.

Parameters

kind_str

the string.

 

Returns

a AsProvidesKind or AS_PROVIDES_KIND_UNKNOWN for unknown


as_provides_item_create ()

gchar *
as_provides_item_create (AsProvidesKind kind,
                         const gchar *value,
                         const gchar *data);

Creates a new provides-item string, which consists of a type-part describing the items type, and a name-part, containing the name of the item. Both are separated by a semicolon, so an item of type KIND_LIBRARY and name libappstream.so.0 will become "lib;libappstream.so.0"

kind a AsProvidesKind describing the type of the item string value the name of the item as string data (allow-none) (default NULL): additional data associated with this item

Returns

a new provides-item string. Free with g_free


as_provides_item_get_kind ()

AsProvidesKind
as_provides_item_get_kind (const gchar *item);

Returns the type (kind) of a provides-item string as AsProvidesKind

item a valid provides-item string

Returns

the kind of the given item


as_provides_item_get_value ()

gchar *
as_provides_item_get_value (const gchar *item);

Returns the value (name) of a provides-item string

item a valid provides-item string

Returns

the value of the given item, or NULL if the item was invalid

Types and Values

enum AsProvidesKind

Members

AS_PROVIDES_KIND_UNKNOWN

   

AS_PROVIDES_KIND_LIBRARY

   

AS_PROVIDES_KIND_BINARY

   

AS_PROVIDES_KIND_FONT

   

AS_PROVIDES_KIND_MODALIAS

   

AS_PROVIDES_KIND_FIRMWARE

   

AS_PROVIDES_KIND_PYTHON2

   

AS_PROVIDES_KIND_PYTHON3

   

AS_PROVIDES_KIND_LAST