AsProvide

AsProvide — Object representing a single object the application provides.

Stability Level

Stable, unless otherwise indicated

Synopsis

#include <appstream-glib.h>

enum                AsProvideKind;
AsProvide *         as_provide_new                      (void);
AsProvideKind       as_provide_kind_from_string         (const gchar *kind);
const gchar *       as_provide_kind_to_string           (AsProvideKind kind);
const gchar *       as_provide_get_value                (AsProvide *provide);
AsProvideKind       as_provide_get_kind                 (AsProvide *provide);
void                as_provide_set_value                (AsProvide *provide,
                                                         const gchar *value,
                                                         gssize value_len);
void                as_provide_set_kind                 (AsProvide *provide,
                                                         AsProvideKind kind);

Description

Applications may provide different binary names, firmware files and that kind of thing. This is the place to express those extra items.

See also: AsApp

Details

enum AsProvideKind

typedef enum {
	AS_PROVIDE_KIND_UNKNOWN,
	AS_PROVIDE_KIND_LIBRARY,
	AS_PROVIDE_KIND_BINARY,
	AS_PROVIDE_KIND_FONT,
	AS_PROVIDE_KIND_MODALIAS,
	AS_PROVIDE_KIND_FIRMWARE,
	AS_PROVIDE_KIND_PYTHON2,
	AS_PROVIDE_KIND_PYTHON3,
	AS_PROVIDE_KIND_DBUS,		/* Since: 0.1.7 */
	AS_PROVIDE_KIND_DBUS_SYSTEM, /* Since: 0.2.4 */
} AsProvideKind;

The provide type.

AS_PROVIDE_KIND_UNKNOWN

Type invalid or not known

AS_PROVIDE_KIND_LIBRARY

A library file

AS_PROVIDE_KIND_BINARY

A binary file

AS_PROVIDE_KIND_FONT

A font file

AS_PROVIDE_KIND_MODALIAS

A hardware modalias

AS_PROVIDE_KIND_FIRMWARE

A firmware file

AS_PROVIDE_KIND_PYTHON2

A Python 2 module

AS_PROVIDE_KIND_PYTHON3

A Python 3 module

AS_PROVIDE_KIND_DBUS

A D-Bus service

AS_PROVIDE_KIND_DBUS_SYSTEM

A D-Bus system service

as_provide_new ()

AsProvide *         as_provide_new                      (void);

Creates a new AsProvide.

Returns :

a AsProvide. [transfer full]

Since 0.1.6


as_provide_kind_from_string ()

AsProvideKind       as_provide_kind_from_string         (const gchar *kind);

Converts the text representation to an enumerated value.

kind :

the string.

Returns :

a AsProvideKind, or AS_PROVIDE_KIND_UNKNOWN for unknown. [transfer full]

Since 0.1.6


as_provide_kind_to_string ()

const gchar *       as_provide_kind_to_string           (AsProvideKind kind);

Converts the enumerated value to an text representation.

kind :

the AsProvideKind.

Returns :

string version of kind

Since 0.1.6


as_provide_get_value ()

const gchar *       as_provide_get_value                (AsProvide *provide);

Gets the full qualified URL for the provide, usually pointing at some mirror.

provide :

a AsProvide instance.

Returns :

URL

Since 0.1.6


as_provide_get_kind ()

AsProvideKind       as_provide_get_kind                 (AsProvide *provide);

Gets the provide kind.

provide :

a AsProvide instance.

Returns :

the AsProvideKind

Since 0.1.6


as_provide_set_value ()

void                as_provide_set_value                (AsProvide *provide,
                                                         const gchar *value,
                                                         gssize value_len);

Sets the fully-qualified mirror URL to use for the provide.

provide :

a AsProvide instance.

value :

the URL.

value_len :

the size of value, or -1 if NULL-terminated.

Since 0.1.6


as_provide_set_kind ()

void                as_provide_set_kind                 (AsProvide *provide,
                                                         AsProvideKind kind);

Sets the provide kind.

provide :

a AsProvide instance.

kind :

the AsProvideKind, e.g. AS_PROVIDE_KIND_LIBRARY.

Since 0.1.6