![]() |
![]() |
![]() |
LibAppStream Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#include <appstream.h> enum AsProvidesKind; const gchar * as_provides_kind_to_string (AsProvidesKind kind
); AsProvidesKind as_provides_kind_from_string (const gchar *kind_str
); gchar * as_provides_item_create (AsProvidesKind kind
,const gchar *value
); AsProvidesKind as_provides_item_get_kind (const gchar *item
); gchar * as_provides_item_get_value (const gchar *item
);
Components can provide various items, like libraries, Python-modules, firmware, binaries, etc. Functions to work with these items are provided here.
See also: AsComponent
typedef enum { 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 } AsProvidesKind;
const gchar * as_provides_kind_to_string (AsProvidesKind kind
);
Converts the enumerated value to an text representation.
|
the AsProvidesKind. |
Returns : |
string version of kind
|
AsProvidesKind as_provides_kind_from_string (const gchar *kind_str
);
Converts the text representation to an enumerated value.
|
the string. |
Returns : |
a AsProvidesKind or AS_PROVIDES_KIND_UNKNOWN for unknown |
gchar * as_provides_item_create (AsProvidesKind kind
,const gchar *value
);
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
Returns : |
a new provides-item string. Free with g_free |
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 |