AsBundle

AsBundle — Object representing a single bundle used in a screenshot.

Stability Level

Stable, unless otherwise indicated

Synopsis

#include <appstream-glib.h>

#define             AS_TYPE_BUNDLE
struct              AsBundleClass;
enum                AsBundleKind;
#define             AS_BUNDLE_KIND_XDG_APP
AsBundle *          as_bundle_new                       (void);
AsBundleKind        as_bundle_kind_from_string          (const gchar *kind);
const gchar *       as_bundle_kind_to_string            (AsBundleKind kind);
const gchar *       as_bundle_get_id                    (AsBundle *bundle);
const gchar *       as_bundle_get_runtime               (AsBundle *bundle);
const gchar *       as_bundle_get_sdk                   (AsBundle *bundle);
AsBundleKind        as_bundle_get_kind                  (AsBundle *bundle);
void                as_bundle_set_id                    (AsBundle *bundle,
                                                         const gchar *id);
void                as_bundle_set_runtime               (AsBundle *bundle,
                                                         const gchar *runtime);
void                as_bundle_set_sdk                   (AsBundle *bundle,
                                                         const gchar *sdk);
void                as_bundle_set_kind                  (AsBundle *bundle,
                                                         AsBundleKind kind);

Description

Screenshot may have multiple versions of an bundle in different resolutions or aspect ratios. This object allows access to the location and size of a single bundle.

See also: AsScreenshot

Details

AS_TYPE_BUNDLE

#define AS_TYPE_BUNDLE (as_bundle_get_type ())

struct AsBundleClass

struct AsBundleClass {
	GObjectClass		parent_class;
};

enum AsBundleKind

typedef enum {
	AS_BUNDLE_KIND_UNKNOWN,			/* Since: 0.3.5 */
	AS_BUNDLE_KIND_LIMBA,			/* Since: 0.3.5 */
	AS_BUNDLE_KIND_FLATPAK,			/* Since: 0.5.15 */
	AS_BUNDLE_KIND_SNAP,			/* Since: 0.6.1 */
	AS_BUNDLE_KIND_PACKAGE,			/* Since: 0.6.1 */
	AS_BUNDLE_KIND_CABINET,			/* Since: 0.6.2 */
	AS_BUNDLE_KIND_APPIMAGE,		/* Since: 0.6.4 */
} AsBundleKind;

The bundle type.

AS_BUNDLE_KIND_UNKNOWN

Type invalid or not known

AS_BUNDLE_KIND_LIMBA

Limba application bundle

AS_BUNDLE_KIND_FLATPAK

Flatpak application deployment

AS_BUNDLE_KIND_SNAP

Snap application deployment

AS_BUNDLE_KIND_PACKAGE

Package-based application deployment

AS_BUNDLE_KIND_CABINET

Cabinet firmware deployment

AS_BUNDLE_KIND_APPIMAGE

AppImage application bundle

AS_BUNDLE_KIND_XDG_APP

#define AS_BUNDLE_KIND_XDG_APP AS_BUNDLE_KIND_FLATPAK

as_bundle_new ()

AsBundle *          as_bundle_new                       (void);

Creates a new AsBundle.

Returns :

a AsBundle. [transfer full]

Since 0.3.5


as_bundle_kind_from_string ()

AsBundleKind        as_bundle_kind_from_string          (const gchar *kind);

Converts the text representation to an enumerated value.

kind :

the string.

Returns :

a AsBundleKind, or AS_BUNDLE_KIND_UNKNOWN for unknown. [transfer full]

Since 0.3.5


as_bundle_kind_to_string ()

const gchar *       as_bundle_kind_to_string            (AsBundleKind kind);

Converts the enumerated value to an text representation.

kind :

the AsBundleKind.

Returns :

string version of kind

Since 0.3.5


as_bundle_get_id ()

const gchar *       as_bundle_get_id                    (AsBundle *bundle);

Gets the ID for this bundle.

bundle :

a AsBundle instance.

Returns :

ID, e.g. "foobar-1.0.2"

Since 0.3.5


as_bundle_get_runtime ()

const gchar *       as_bundle_get_runtime               (AsBundle *bundle);

Gets the runtime required for this bundle.

bundle :

a AsBundle instance.

Returns :

Runtime identifier, e.g. "org.gnome.Platform/i386/master"

Since 0.5.10


as_bundle_get_sdk ()

const gchar *       as_bundle_get_sdk                   (AsBundle *bundle);

Gets the SDK for this bundle.

bundle :

a AsBundle instance.

Returns :

SDK identifier, e.g. "org.gnome.Sdk/i386/master"

Since 0.5.10


as_bundle_get_kind ()

AsBundleKind        as_bundle_get_kind                  (AsBundle *bundle);

Gets the bundle kind.

bundle :

a AsBundle instance.

Returns :

the AsBundleKind

Since 0.3.5


as_bundle_set_id ()

void                as_bundle_set_id                    (AsBundle *bundle,
                                                         const gchar *id);

Sets the ID for this bundle.

bundle :

a AsBundle instance.

id :

the URL.

Since 0.3.5


as_bundle_set_runtime ()

void                as_bundle_set_runtime               (AsBundle *bundle,
                                                         const gchar *runtime);

Sets the runtime required for this bundle.

bundle :

a AsBundle instance.

runtime :

the URL.

Since 0.5.10


as_bundle_set_sdk ()

void                as_bundle_set_sdk                   (AsBundle *bundle,
                                                         const gchar *sdk);

Sets the SDK for this bundle.

bundle :

a AsBundle instance.

sdk :

the URL.

Since 0.5.10


as_bundle_set_kind ()

void                as_bundle_set_kind                  (AsBundle *bundle,
                                                         AsBundleKind kind);

Sets the bundle kind.

bundle :

a AsBundle instance.

kind :

the AsBundleKind, e.g. AS_BUNDLE_KIND_THUMBNAIL.

Since 0.3.5