AsLaunchable

AsLaunchable — Object representing a way to launch the application.

Stability Level

Stable, unless otherwise indicated

Synopsis

#include <appstream-glib.h>

#define             AS_TYPE_LAUNCHABLE
struct              AsLaunchableClass;
enum                AsLaunchableKind;
AsLaunchable *      as_launchable_new                   (void);
AsLaunchableKind    as_launchable_kind_from_string      (const gchar *kind);
const gchar *       as_launchable_kind_to_string        (AsLaunchableKind kind);
const gchar *       as_launchable_get_value             (AsLaunchable *launchable);
AsLaunchableKind    as_launchable_get_kind              (AsLaunchable *launchable);
void                as_launchable_set_value             (AsLaunchable *launchable,
                                                         const gchar *value);
void                as_launchable_set_kind              (AsLaunchable *launchable,
                                                         AsLaunchableKind kind);

Description

Applications may be launchable using a different application ID to the component ID or may be launchable in some other way, e.g D-Bus, or using the default terminal emulator.

See also: AsApp

Details

AS_TYPE_LAUNCHABLE

#define AS_TYPE_LAUNCHABLE (as_launchable_get_type ())

struct AsLaunchableClass

struct AsLaunchableClass {
	GObjectClass		parent_class;
};

enum AsLaunchableKind

typedef enum {
	AS_LAUNCHABLE_KIND_UNKNOWN,
	AS_LAUNCHABLE_KIND_DESKTOP_ID,		/* Since: 0.6.13 */
	AS_LAUNCHABLE_KIND_SERVICE,		/* Since: 0.7.3 */
	AS_LAUNCHABLE_KIND_COCKPIT_MANIFEST, /* Since: 0.7.3 */
	AS_LAUNCHABLE_KIND_URL,			/* Since: 0.7.3 */
} AsLaunchableKind;

The launchable type.

AS_LAUNCHABLE_KIND_UNKNOWN

Type invalid or not known

AS_LAUNCHABLE_KIND_DESKTOP_ID

A desktop ID

AS_LAUNCHABLE_KIND_SERVICE

A system service

AS_LAUNCHABLE_KIND_COCKPIT_MANIFEST

A manifest run by the cockpit project

AS_LAUNCHABLE_KIND_URL

A web-app

as_launchable_new ()

AsLaunchable *      as_launchable_new                   (void);

Creates a new AsLaunchable.

Returns :

a AsLaunchable. [transfer full]

Since 0.6.13


as_launchable_kind_from_string ()

AsLaunchableKind    as_launchable_kind_from_string      (const gchar *kind);

Converts the text representation to an enumerated value.

kind :

the string.

Returns :

a AsLaunchableKind, or AS_LAUNCHABLE_KIND_UNKNOWN for unknown. [transfer full]

Since 0.6.13


as_launchable_kind_to_string ()

const gchar *       as_launchable_kind_to_string        (AsLaunchableKind kind);

Converts the enumerated value to an text representation.

kind :

the AsLaunchableKind.

Returns :

string version of kind

Since 0.6.13


as_launchable_get_value ()

const gchar *       as_launchable_get_value             (AsLaunchable *launchable);

Gets the value to use for the launchable.

launchable :

a AsLaunchable instance.

Returns :

usually a desktop ID, e.g. "gimp.desktop"

Since 0.6.13


as_launchable_get_kind ()

AsLaunchableKind    as_launchable_get_kind              (AsLaunchable *launchable);

Gets the launchable kind.

launchable :

a AsLaunchable instance.

Returns :

the AsLaunchableKind

Since 0.6.13


as_launchable_set_value ()

void                as_launchable_set_value             (AsLaunchable *launchable,
                                                         const gchar *value);

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

launchable :

a AsLaunchable instance.

value :

the URL.

Since 0.6.13


as_launchable_set_kind ()

void                as_launchable_set_kind              (AsLaunchable *launchable,
                                                         AsLaunchableKind kind);

Sets the launchable kind.

launchable :

a AsLaunchable instance.

kind :

the AsLaunchableKind, e.g. AS_LAUNCHABLE_KIND_DESKTOP_ID.

Since 0.6.13