AsBundle: AppStream-glib Reference Manual

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

## Stability Level

Stable, unless otherwise indicated

## Functions

AsBundle * | as_bundle_new ()
AsBundleKind | as_bundle_kind_from_string ()
const gchar * | as_bundle_kind_to_string ()
const gchar * | as_bundle_get_id ()
const gchar * | as_bundle_get_runtime ()
const gchar * | as_bundle_get_sdk ()
AsBundleKind | as_bundle_get_kind ()
void | as_bundle_set_id ()
void | as_bundle_set_runtime ()
void | as_bundle_set_sdk ()
void | as_bundle_set_kind ()

## Types and Values

#define | AS_TYPE_BUNDLE
struct | AsBundleClass
enum | AsBundleKind
#define | AS_BUNDLE_KIND_XDG_APP
| AsBundle

## Includes

    #include <appstream-glib.h>

## 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

## Functions

### 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.

#### Parameters

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.

#### Parameters

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.

#### Parameters

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.

#### Parameters

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.

#### Parameters

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.

#### Parameters

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.

#### Parameters

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.

#### Parameters

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.

#### Parameters

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.

#### Parameters

bundle | a AsBundle instance. |
kind | the AsBundleKind, e.g. `AS_BUNDLE_KIND_FLATPAK`. |

Since: 0.3.5

## Types and Values

### AS_TYPE_BUNDLE

    #define AS_TYPE_BUNDLE (as_bundle_get_type ())

### struct AsBundleClass

    struct AsBundleClass {
    	GObjectClass		parent_class;
    };

### enum AsBundleKind

The bundle type.

#### Members

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

### AsBundle

    typedef struct _AsBundle AsBundle;