SnapdApp: snapd-glib Reference Manual

## SnapdApp SnapdApp — Application metadata |

## Functions

const gchar * | snapd_app_get_name ()
gboolean | snapd_app_get_active ()
GStrv | snapd_app_get_aliases ()
const gchar * | snapd_app_get_common_id ()
SnapdDaemonType | snapd_app_get_daemon_type ()
const gchar * | snapd_app_get_desktop_file ()
gboolean | snapd_app_get_enabled ()
const gchar * | snapd_app_get_snap ()

## Properties

gboolean | active | Read / Write / Construct Only
GStrv | aliases | Read / Write / Construct Only
char * | common-id | Read / Write / Construct Only
SnapdDaemonType | daemon-type | Read / Write / Construct Only
char * | desktop-file | Read / Write / Construct Only
gboolean | enabled | Read / Write / Construct Only
char * | name | Read / Write / Construct Only
char * | snap | Read / Write / Construct Only

## Types and Values

enum | SnapdDaemonType
| SnapdApp

## Object Hierarchy

        GEnum
        ╰── SnapdDaemonType
        GObject
        ╰── SnapdApp

## Includes

    #include <snapd-glib/snapd-glib.h>

## Description

A SnapdApp contains information about an application that snapd provides. Apps are retrieved using `snapd_snap_get_apps()`.

## Functions

### snapd_app_get_name ()

    const gchar *
    snapd_app_get_name (SnapdApp *app);

Get the name of this app.

#### Parameters

app | a SnapdApp. |

#### Returns

a name.

Since: 1.0

### snapd_app_get_active ()

    gboolean
    snapd_app_get_active (SnapdApp *app);

Get if this service is active.

#### Parameters

app | a SnapdApp. |

#### Returns

`TRUE` if active.

Since: 1.25

### snapd_app_get_aliases ()

    GStrv
    snapd_app_get_aliases (SnapdApp *app);

`snapd_app_get_aliases` has been deprecated since version 1.25 and should not be used in newly-written code.

Get the aliases for this app.

#### Parameters

app | a SnapdApp. |

#### Returns

the alias names.

[transfer none][array zero-terminated=1]

Since: 1.7

### snapd_app_get_common_id ()

    const gchar *
    snapd_app_get_common_id (SnapdApp *app);

Get the common ID associated with this app.

#### Parameters

app | a SnapdApp. |

#### Returns

an ID or `NULL`.

[allow-none]

Since: 1.41

### snapd_app_get_daemon_type ()

    SnapdDaemonType
    snapd_app_get_daemon_type (SnapdApp *app);

Get the daemon type for this app.

#### Parameters

app | a SnapdApp. |

#### Returns

the daemon type or `NULL`.

[allow-none]

Since: 1.9

### snapd_app_get_desktop_file ()

    const gchar *
    snapd_app_get_desktop_file (SnapdApp *app);

Get the path to the desktop file for this app.

#### Parameters

app | a SnapdApp. |

#### Returns

a path or `NULL`.

[allow-none]

Since: 1.14

### snapd_app_get_enabled ()

    gboolean
    snapd_app_get_enabled (SnapdApp *app);

Get if this service is enabled.

#### Parameters

app | a SnapdApp. |

#### Returns

`TRUE` if enabled.

Since: 1.25

### snapd_app_get_snap ()

    const gchar *
    snapd_app_get_snap (SnapdApp *app);

Get the snap this app is associated with.

#### Parameters

app | a SnapdApp. |

#### Returns

a snap name.

Since: 1.25

## Types and Values

### enum SnapdDaemonType

Type of daemon.

#### Members

SNAPD_DAEMON_TYPE_NONE | Not a daemon |
SNAPD_DAEMON_TYPE_UNKNOWN | Unknown daemon type |
SNAPD_DAEMON_TYPE_SIMPLE | Simple daemon |
SNAPD_DAEMON_TYPE_FORKING | Forking daemon |
SNAPD_DAEMON_TYPE_ONESHOT | One-shot daemon |
SNAPD_DAEMON_TYPE_DBUS | D-Bus daemon |
SNAPD_DAEMON_TYPE_NOTIFY | Notify daemon |

Since: 1.9

### SnapdApp

    typedef struct _SnapdApp SnapdApp;

SnapdApp contains information about an app in a Snap.

Snaps can contain apps which is a single binary executable.

Since: 1.0

## Property Details

### The `“active”` property

      “active”                   gboolean

TRUE if active.

Owner: SnapdApp

Flags: Read / Write / Construct Only

Default value: FALSE

### The `“aliases”` property

      “aliases”                  GStrv

App aliases.

Owner: SnapdApp

Flags: Read / Write / Construct Only

### The `“common-id”` property

      “common-id”                char *

Common ID.

Owner: SnapdApp

Flags: Read / Write / Construct Only

Default value: NULL

### The `“daemon-type”` property

      “daemon-type”              SnapdDaemonType

Daemon type.

Owner: SnapdApp

Flags: Read / Write / Construct Only

Default value: SNAPD_DAEMON_TYPE_UNKNOWN

### The `“desktop-file”` property

      “desktop-file”             char *

App desktop file path.

Owner: SnapdApp

Flags: Read / Write / Construct Only

Default value: NULL

### The `“enabled”` property

      “enabled”                  gboolean

TRUE if enabled.

Owner: SnapdApp

Flags: Read / Write / Construct Only

Default value: FALSE

### The `“name”` property

      “name”                     char *

App name.

Owner: SnapdApp

Flags: Read / Write / Construct Only

Default value: NULL

### The `“snap”` property

      “snap”                     char *

Snap name.

Owner: SnapdApp

Flags: Read / Write / Construct Only

Default value: NULL