## SnapdClient SnapdClient — Client connection to snapd |

## Functions

void | (*SnapdProgressCallback) ()
SnapdClient * | snapd_client_new ()
SnapdClient * | snapd_client_new_from_socket ()
void | snapd_client_set_socket_path ()
const gchar * | snapd_client_get_socket_path ()
gboolean | snapd_client_get_allow_interaction ()
void | snapd_client_set_allow_interaction ()
SnapdMaintenance * | snapd_client_get_maintenance ()
gboolean | snapd_client_connect_sync ()
void | snapd_client_connect_async ()
gboolean | snapd_client_connect_finish ()
SnapdAuthData * | snapd_client_login_sync ()
void | snapd_client_login_async ()
SnapdAuthData * | snapd_client_login_finish ()
SnapdUserInformation * | snapd_client_login2_sync ()
void | snapd_client_login2_async ()
SnapdUserInformation * | snapd_client_login2_finish ()
gboolean | snapd_client_logout_sync ()
void | snapd_client_logout_async ()
gboolean | snapd_client_logout_finish ()
void | snapd_client_set_user_agent ()
const gchar * | snapd_client_get_user_agent ()
void | snapd_client_set_auth_data ()
SnapdAuthData * | snapd_client_get_auth_data ()
GPtrArray * | snapd_client_get_changes_sync ()
void | snapd_client_get_changes_async ()
GPtrArray * | snapd_client_get_changes_finish ()
SnapdChange * | snapd_client_get_change_sync ()
void | snapd_client_get_change_async ()
SnapdChange * | snapd_client_get_change_finish ()
SnapdChange * | snapd_client_abort_change_sync ()
void | snapd_client_abort_change_async ()
SnapdChange * | snapd_client_abort_change_finish ()
SnapdSystemInformation * | snapd_client_get_system_information_sync ()
void | snapd_client_get_system_information_async ()
SnapdSystemInformation * | snapd_client_get_system_information_finish ()
GPtrArray * | snapd_client_list_sync ()
void | snapd_client_list_async ()
GPtrArray * | snapd_client_list_finish ()
GPtrArray * | snapd_client_get_snaps_sync ()
void | snapd_client_get_snaps_async ()
GPtrArray * | snapd_client_get_snaps_finish ()
SnapdSnap * | snapd_client_list_one_sync ()
void | snapd_client_list_one_async ()
SnapdSnap * | snapd_client_list_one_finish ()
SnapdSnap * | snapd_client_get_snap_sync ()
void | snapd_client_get_snap_async ()
SnapdSnap * | snapd_client_get_snap_finish ()
GHashTable * | snapd_client_get_snap_conf_sync ()
void | snapd_client_get_snap_conf_async ()
GHashTable * | snapd_client_get_snap_conf_finish ()
gboolean | snapd_client_set_snap_conf_sync ()
void | snapd_client_set_snap_conf_async ()
gboolean | snapd_client_set_snap_conf_finish ()
GPtrArray * | snapd_client_get_apps_sync ()
void | snapd_client_get_apps_async ()
GPtrArray * | snapd_client_get_apps_finish ()
GPtrArray * | snapd_client_get_apps2_sync ()
void | snapd_client_get_apps2_async ()
GPtrArray * | snapd_client_get_apps2_finish ()
SnapdIcon * | snapd_client_get_icon_sync ()
void | snapd_client_get_icon_async ()
SnapdIcon * | snapd_client_get_icon_finish ()
void | snapd_client_get_assertions_async ()
GStrv | snapd_client_get_assertions_finish ()
GStrv | snapd_client_get_assertions_sync ()
void | snapd_client_add_assertions_async ()
gboolean | snapd_client_add_assertions_finish ()
gboolean | snapd_client_add_assertions_sync ()
gboolean | snapd_client_get_interfaces_sync ()
void | snapd_client_get_interfaces_async ()
gboolean | snapd_client_get_interfaces_finish ()
GPtrArray * | snapd_client_get_interfaces2_sync ()
void | snapd_client_get_interfaces2_async ()
GPtrArray * | snapd_client_get_interfaces2_finish ()
gboolean | snapd_client_get_connections_sync ()
void | snapd_client_get_connections_async ()
gboolean | snapd_client_get_connections_finish ()
gboolean | snapd_client_get_connections2_sync ()
void | snapd_client_get_connections2_async ()
gboolean | snapd_client_get_connections2_finish ()
gboolean | snapd_client_connect_interface_sync ()
void | snapd_client_connect_interface_async ()
gboolean | snapd_client_connect_interface_finish ()
gboolean | snapd_client_disconnect_interface_sync ()
void | snapd_client_disconnect_interface_async ()
gboolean | snapd_client_disconnect_interface_finish ()
GPtrArray * | snapd_client_find_sync ()
void | snapd_client_find_async ()
GPtrArray * | snapd_client_find_finish ()
void | snapd_client_find_section_async ()
GPtrArray * | snapd_client_find_section_sync ()
GPtrArray * | snapd_client_find_section_finish ()
GPtrArray * | snapd_client_find_refreshable_sync ()
void | snapd_client_find_refreshable_async ()
GPtrArray * | snapd_client_find_refreshable_finish ()
gboolean | snapd_client_install_sync ()
void | snapd_client_install_async ()
gboolean | snapd_client_install_finish ()
gboolean | snapd_client_install2_sync ()
void | snapd_client_install2_async ()
gboolean | snapd_client_install2_finish ()
void | snapd_client_install_stream_async ()
gboolean | snapd_client_install_stream_finish ()
gboolean | snapd_client_install_stream_sync ()
void | snapd_client_try_async ()
gboolean | snapd_client_try_finish ()
gboolean | snapd_client_try_sync ()
gboolean | snapd_client_refresh_sync ()
void | snapd_client_refresh_async ()
gboolean | snapd_client_refresh_finish ()
GStrv | snapd_client_refresh_all_sync ()
void | snapd_client_refresh_all_async ()
GStrv | snapd_client_refresh_all_finish ()
gboolean | snapd_client_remove_sync ()
void | snapd_client_remove_async ()
gboolean | snapd_client_remove_finish ()
gboolean | snapd_client_remove2_sync ()
void | snapd_client_remove2_async ()
gboolean | snapd_client_remove2_finish ()
gboolean | snapd_client_enable_sync ()
void | snapd_client_enable_async ()
gboolean | snapd_client_enable_finish ()
gboolean | snapd_client_disable_sync ()
void | snapd_client_disable_async ()
gboolean | snapd_client_disable_finish ()
gboolean | snapd_client_switch_sync ()
void | snapd_client_switch_async ()
gboolean | snapd_client_switch_finish ()
gboolean | snapd_client_check_buy_sync ()
void | snapd_client_check_buy_async ()
gboolean | snapd_client_check_buy_finish ()
gboolean | snapd_client_buy_sync ()
void | snapd_client_buy_async ()
gboolean | snapd_client_buy_finish ()
SnapdUserInformation * | snapd_client_create_user_sync ()
void | snapd_client_create_user_async ()
SnapdUserInformation * | snapd_client_create_user_finish ()
GPtrArray * | snapd_client_create_users_sync ()
void | snapd_client_create_users_async ()
GPtrArray * | snapd_client_create_users_finish ()
GPtrArray * | snapd_client_get_users_sync ()
void | snapd_client_get_users_async ()
GPtrArray * | snapd_client_get_users_finish ()
GStrv | snapd_client_get_sections_sync ()
void | snapd_client_get_sections_async ()
GStrv | snapd_client_get_sections_finish ()
void | snapd_client_get_aliases_async ()
GPtrArray * | snapd_client_get_aliases_finish ()
GPtrArray * | snapd_client_get_aliases_sync ()
void | snapd_client_alias_async ()
gboolean | snapd_client_alias_finish ()
gboolean | snapd_client_alias_sync ()
void | snapd_client_unalias_async ()
gboolean | snapd_client_unalias_finish ()
gboolean | snapd_client_unalias_sync ()
void | snapd_client_prefer_async ()
gboolean | snapd_client_prefer_finish ()
gboolean | snapd_client_prefer_sync ()
void | snapd_client_enable_aliases_async ()
gboolean | snapd_client_enable_aliases_finish ()
gboolean | snapd_client_enable_aliases_sync ()
void | snapd_client_disable_aliases_async ()
gboolean | snapd_client_disable_aliases_finish ()
gboolean | snapd_client_disable_aliases_sync ()
void | snapd_client_reset_aliases_async ()
gboolean | snapd_client_reset_aliases_finish ()
gboolean | snapd_client_reset_aliases_sync ()
void | snapd_client_download_async ()
GBytes * | snapd_client_download_finish ()
GBytes * | snapd_client_download_sync ()
void | snapd_client_run_snapctl_async ()
gboolean | snapd_client_run_snapctl_finish ()
gboolean | snapd_client_run_snapctl_sync ()
void | snapd_client_run_snapctl2_async ()
gboolean | snapd_client_run_snapctl2_finish ()
gboolean | snapd_client_run_snapctl2_sync ()

## Properties

GCancellable * | cancellable | Write / Construct Only
gpointer | ready-callback | Write / Construct Only
gpointer | ready-callback-data | Write / Construct Only
GObject * | source-object | Write / Construct Only
char * | change-api-path | Write / Construct Only
gpointer | progress-callback | Write / Construct Only
gpointer | progress-callback-data | Write / Construct Only

## Types and Values

| SnapdClient
struct | SnapdClientClass
enum | SnapdChangeFilter
enum | SnapdGetSnapsFlags
enum | SnapdGetAppsFlags
enum | SnapdGetConnectionsFlags
enum | SnapdFindFlags
enum | SnapdInstallFlags
enum | SnapdRemoveFlags
enum | SnapdCreateUserFlags
enum | SnapdGetInterfacesFlags

## Object Hierarchy

        GEnum
        ╰── SnapdChangeFilter
        GFlags
        ├── SnapdCreateUserFlags
        ├── SnapdFindFlags
        ├── SnapdGetAppsFlags
        ├── SnapdGetConnectionsFlags
        ├── SnapdGetInterfacesFlags
        ├── SnapdGetSnapsFlags
        ├── SnapdInstallFlags
        ╰── SnapdRemoveFlags
        GObject
        ├── SnapdRequest
        │   ├── SnapdGetAliases
        │   ├── SnapdGetApps
        │   ├── SnapdGetAssertions
        │   ├── SnapdGetBuyReady
        │   ├── SnapdGetChange
        │   ├── SnapdGetChanges
        │   ├── SnapdGetConnections
        │   ├── SnapdGetFind
        │   ├── SnapdGetIcon
        │   ├── SnapdGetInterfaces
        │   ├── SnapdGetInterfacesLegacy
        │   ├── SnapdGetSections
        │   ├── SnapdGetSnapConf
        │   ├── SnapdGetSnap
        │   ├── SnapdGetSnaps
        │   ├── SnapdGetSystemInfo
        │   ├── SnapdGetUsers
        │   ├── SnapdRequestAsync
        │   │   ├── SnapdPostAliases
        │   │   ├── SnapdPostInterfaces
        │   │   ├── SnapdPostSnap
        │   │   ├── SnapdPostSnapStream
        │   │   ├── SnapdPostSnapTry
        │   │   ├── SnapdPostSnaps
        │   │   ╰── SnapdPutSnapConf
        │   ├── SnapdPostAssertions
        │   ├── SnapdPostBuy
        │   ├── SnapdPostChange
        │   ├── SnapdPostCreateUser
        │   ├── SnapdPostCreateUsers
        │   ├── SnapdPostDownload
        │   ├── SnapdPostLogin
        │   ├── SnapdPostLogout
        │   ├── SnapdPostSnapctl
        │   ├── SnapdPostAssertions
        │   ├── SnapdPostBuy
        │   ├── SnapdPostChange
        │   ├── SnapdPostCreateUser
        │   ├── SnapdPostCreateUsers
        │   ├── SnapdPostDownload
        │   ├── SnapdPostLogin
        │   ├── SnapdPostLogout
        │   ├── SnapdPostSnapctl
        │   ├── SnapdRequestAsync
        │   │   ├── SnapdPostAliases
        │   │   ├── SnapdPostInterfaces
        │   │   ├── SnapdPostSnap
        │   │   ├── SnapdPostSnapStream
        │   │   ├── SnapdPostSnapTry
        │   │   ├── SnapdPostSnaps
        │   │   ╰── SnapdPutSnapConf
        │   ├── SnapdGetAliases
        │   ├── SnapdGetApps
        │   ├── SnapdGetAssertions
        │   ├── SnapdGetBuyReady
        │   ├── SnapdGetChange
        │   ├── SnapdGetChanges
        │   ├── SnapdGetConnections
        │   ├── SnapdGetFind
        │   ├── SnapdGetIcon
        │   ├── SnapdGetInterfaces
        │   ├── SnapdGetInterfacesLegacy
        │   ├── SnapdGetSections
        │   ├── SnapdGetSnap
        │   ├── SnapdGetSnapConf
        │   ├── SnapdGetSnaps
        │   ├── SnapdGetSystemInfo
        │   ╰── SnapdGetUsers
        ╰── SnapdClient

## Includes

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

## Description

A SnapdClient is the means of talking to snapd.

To communicate with snapd create a client with `snapd_client_new()` then send requests.

Some requests require authorization which can be set with `snapd_client_set_auth_data()`.

## Functions

### SnapdProgressCallback ()

    void
    (*SnapdProgressCallback) (SnapdClient *client,
                              SnapdChange *change,
                              gpointer deprecated,
                              gpointer user_data);

Signature for callback function used in `snapd_client_connect_interface_sync()`, `snapd_client_disconnect_interface_async()`, `snapd_client_install2_sync()`, `snapd_client_refresh_sync()`, `snapd_client_remove2_sync()`, `snapd_client_enable_sync()` and `snapd_client_disable_sync()`.

#### Parameters

client | a SnapdClient |
change | a SnapdChange describing the change in progress |
deprecated | A deprecated field that is no longer used. |
user_data | user data passed to the callback |

Since: 1.0

### snapd_client_new ()

    SnapdClient *
    snapd_client_new (void);

Create a new client to talk to snapd.

#### Returns

a new SnapdClient

Since: 1.0

### snapd_client_new_from_socket ()

    SnapdClient *
    snapd_client_new_from_socket (GSocket *socket);

Create a new client to talk on an existing socket.

#### Parameters

socket | A GSocket that is connected to snapd. |

#### Returns

a new SnapdClient

Since: 1.5

### snapd_client_set_socket_path ()

    void
    snapd_client_set_socket_path (SnapdClient *client,
                                  const gchar *socket_path);

Set the Unix socket path to connect to snapd with. Defaults to the system socket.

#### Parameters

client | a SnapdClient |
socket_path | a socket path or `NULL` to reset to the default. | [allow-none]

Since: 1.24

### snapd_client_get_socket_path ()

    const gchar *
    snapd_client_get_socket_path (SnapdClient *client);

Get the unix socket path to connect to snapd with.

#### Parameters

client | a SnapdClient |

#### Returns

socket path.

Since: 1.24

### snapd_client_get_allow_interaction ()

    gboolean
    snapd_client_get_allow_interaction (SnapdClient *client);

Get whether snapd operations are allowed to interact with the user.

#### Parameters

client | a SnapdClient |

#### Returns

`TRUE` if interaction is allowed.

Since: 1.19

### snapd_client_set_allow_interaction ()

    void
    snapd_client_set_allow_interaction (SnapdClient *client,
                                        gboolean allow_interaction);

Set whether snapd operations are allowed to interact with the user. This affects operations that use polkit authorisation. Defaults to TRUE.

#### Parameters

client | a SnapdClient |
allow_interaction | whether to allow interaction. |

Since: 1.19

### snapd_client_get_maintenance ()

    SnapdMaintenance *
    snapd_client_get_maintenance (SnapdClient *client);

Get the maintenance information reported by snapd or `NULL` if no maintenance is in progress. This information is updated after every request.

#### Parameters

client | a SnapdClient |

#### Returns

a SnapdMaintenance or `NULL`.

[transfer none][allow-none]

Since: 1.45

### snapd_client_connect_sync ()

    gboolean
    snapd_client_connect_sync (SnapdClient *client,
                               GCancellable *cancellable,
                               GError **error);

`snapd_client_connect_sync` is deprecated and should not be used in newly-written code.

This method is no longer required and does nothing, snapd-glib now connects on demand.

#### Parameters

client | a SnapdClient |
cancellable | a GCancellable or `NULL`. | [allow-none]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

`TRUE` if successfully connected to snapd.

Since: 1.0

### snapd_client_connect_async ()

    void
    snapd_client_connect_async (SnapdClient *client,
                                GCancellable *cancellable,
                                GAsyncReadyCallback callback,
                                gpointer user_data);

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

This method is no longer required and does nothing, snapd-glib now connects on demand.

#### Parameters

client | a SnapdClient |
cancellable | a GCancellable or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when the request is satisfied. | [scope async]
user_data | the data to pass to callback function. | [closure]

Since: 1.3

### snapd_client_connect_finish ()

    gboolean
    snapd_client_connect_finish (SnapdClient *client,
                                 GAsyncResult *result,
                                 GError **error);

`snapd_client_connect_finish` is deprecated and should not be used in newly-written code.

Complete request started with `snapd_client_connect_async()`. See `snapd_client_connect_sync()` for more information.

#### Parameters

client | a SnapdClient |
result | a GAsyncResult. |
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

`TRUE` if successfully connected to snapd.

Since: 1.3

### snapd_client_login_sync ()

    SnapdAuthData *
    snapd_client_login_sync (SnapdClient *client,
                             const gchar *email,
                             const gchar *password,
                             const gchar *otp,
                             GCancellable *cancellable,
                             GError **error);

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

Use `snapd_client_login2_sync()`

Log in to snapd and get authorization to install/remove snaps.

#### Parameters

client | a SnapdClient. |
email | email address to log in with. |
password | password to log in with. |
otp | response to one-time password challenge. | [allow-none]
cancellable | a GCancellable or `NULL`. | [allow-none]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

a SnapdAuthData or `NULL` on error.

[transfer full]

Since: 1.0

### snapd_client_login_async ()

    void
    snapd_client_login_async (SnapdClient *client,
                              const gchar *email,
                              const gchar *password,
                              const gchar *otp,
                              GCancellable *cancellable,
                              GAsyncReadyCallback callback,
                              gpointer user_data);

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

Use `snapd_client_login2_async()`

Asynchronously get authorization to install/remove snaps. See `snapd_client_login_sync()` for more information.

#### Parameters

client | a SnapdClient. |
email | email address to log in with. |
password | password to log in with. |
otp | response to one-time password challenge. | [allow-none]
cancellable | a GCancellable or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when the request is satisfied. | [scope async]
user_data | the data to pass to callback function. | [closure]

Since: 1.0

### snapd_client_login_finish ()

    SnapdAuthData *
    snapd_client_login_finish (SnapdClient *client,
                               GAsyncResult *result,
                               GError **error);

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

Use `snapd_client_login2_finish()`

Complete request started with `snapd_client_login_async()`. See `snapd_client_login_sync()` for more information.

#### Parameters

client | a SnapdClient. |
result | a GAsyncResult. |
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

a SnapdAuthData or `NULL` on error.

[transfer full]

Since: 1.0

### snapd_client_login2_sync ()

    SnapdUserInformation *
    snapd_client_login2_sync (SnapdClient *client,
                              const gchar *email,
                              const gchar *password,
                              const gchar *otp,
                              GCancellable *cancellable,
                              GError **error);

Log in to snapd and get authorization to install/remove snaps.

#### Parameters

client | a SnapdClient. |
email | email address to log in with. |
password | password to log in with. |
otp | response to one-time password challenge. | [allow-none]
cancellable | a GCancellable or `NULL`. | [allow-none]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

a SnapdUserInformation or `NULL` on error.

[transfer full]

Since: 1.26

### snapd_client_login2_async ()

    void
    snapd_client_login2_async (SnapdClient *client,
                               const gchar *email,
                               const gchar *password,
                               const gchar *otp,
                               GCancellable *cancellable,
                               GAsyncReadyCallback callback,
                               gpointer user_data);

Asynchronously get authorization to install/remove snaps. See `snapd_client_login2_sync()` for more information.

#### Parameters

client | a SnapdClient. |
email | email address to log in with. |
password | password to log in with. |
otp | response to one-time password challenge. | [allow-none]
cancellable | a GCancellable or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when the request is satisfied. | [scope async]
user_data | the data to pass to callback function. | [closure]

Since: 1.26

### snapd_client_login2_finish ()

    SnapdUserInformation *
    snapd_client_login2_finish (SnapdClient *client,
                                GAsyncResult *result,
                                GError **error);

Complete request started with `snapd_client_login2_async()`. See `snapd_client_login2_sync()` for more information.

#### Parameters

client | a SnapdClient. |
result | a GAsyncResult. |
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

a SnapdUserInformation or `NULL` on error.

[transfer full]

Since: 1.26

### snapd_client_logout_sync ()

    gboolean
    snapd_client_logout_sync (SnapdClient *client,
                              gint64 id,
                              GCancellable *cancellable,
                              GError **error);

Log out from snapd.

#### Parameters

client | a SnapdClient. |
id | login ID to use. |
cancellable | a GCancellable or `NULL`. | [allow-none]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

`TRUE` on success or `FALSE` on error.

Since: 1.55

### snapd_client_logout_async ()

    void
    snapd_client_logout_async (SnapdClient *client,
                               gint64 id,
                               GCancellable *cancellable,
                               GAsyncReadyCallback callback,
                               gpointer user_data);

Asynchronously log out from the snap store. See `snapd_client_logout_sync()` for more information.

#### Parameters

client | a SnapdClient. |
id | login ID to use. |
cancellable | a GCancellable or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when the request is satisfied. | [scope async]
user_data | the data to pass to callback function. | [closure]

Since: 1.55

### snapd_client_logout_finish ()

    gboolean
    snapd_client_logout_finish (SnapdClient *client,
                                GAsyncResult *result,
                                GError **error);

Complete request started with `snapd_client_logout_async()`. See `snapd_client_logout_sync()` for more information.

#### Parameters

client | a SnapdClient. |
result | a GAsyncResult. |
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

`TRUE` on success or `FALSE` on error.

Since: 1.55

### snapd_client_set_user_agent ()

    void
    snapd_client_set_user_agent (SnapdClient *client,
                                 const gchar *user_agent);

Set the HTTP user-agent that is sent with each request to snapd. Defaults to "snapd-glib/VERSION".

#### Parameters

client | a SnapdClient |
user_agent | a user agent or `NULL`. | [allow-none]

Since: 1.16

### snapd_client_get_user_agent ()

    const gchar *
    snapd_client_get_user_agent (SnapdClient *client);

Get the HTTP user-agent that is sent with each request to snapd.

#### Parameters

client | a SnapdClient |

#### Returns

user agent or `NULL` if none set.

[allow-none]

Since: 1.16

### snapd_client_set_auth_data ()

    void
    snapd_client_set_auth_data (SnapdClient *client,
                                SnapdAuthData *auth_data);

Set the authorization data to use for requests. Authorization data can be obtained by:

- Logging into snapd using `snapd_client_login_sync()`

- Using an existing authorization with `snapd_auth_data_new()`.

#### Parameters

client | a SnapdClient. |
auth_data | a SnapdAuthData or `NULL`. | [allow-none]

Since: 1.0

### snapd_client_get_auth_data ()

    SnapdAuthData *
    snapd_client_get_auth_data (SnapdClient *client);

Get the authorization data that is used for requests.

#### Parameters

client | a SnapdClient. |

#### Returns

a SnapdAuthData or `NULL`.

[transfer none][allow-none]

Since: 1.0

### snapd_client_get_changes_sync ()

    GPtrArray *
    snapd_client_get_changes_sync (SnapdClient *client,
                                   SnapdChangeFilter filter,
                                   const gchar *snap_name,
                                   GCancellable *cancellable,
                                   GError **error);

Get changes that have occurred / are occurring on the snap daemon.

#### Parameters

client | a SnapdClient. |
filter | changes to filter on. |
snap_name | name of snap to filter on or `NULL` for changes for any snap. | [allow-none]
cancellable | a GCancellable or `NULL`. | [allow-none]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

an array of SnapdChange or `NULL` on error.

[transfer container][element-type SnapdChange]

Since: 1.29

### snapd_client_get_changes_async ()

    void
    snapd_client_get_changes_async (SnapdClient *client,
                                    SnapdChangeFilter filter,
                                    const gchar *snap_name,
                                    GCancellable *cancellable,
                                    GAsyncReadyCallback callback,
                                    gpointer user_data);

Asynchronously get changes that have occurred / are occurring on the snap daemon. See `snapd_client_get_changes_sync()` for more information.

#### Parameters

client | a SnapdClient. |
filter | changes to filter on. |
snap_name | name of snap to filter on or `NULL` for changes for any snap. | [allow-none]
cancellable | a GCancellable or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when the request is satisfied. | [scope async]
user_data | the data to pass to callback function. | [closure]

Since: 1.29

### snapd_client_get_changes_finish ()

    GPtrArray *
    snapd_client_get_changes_finish (SnapdClient *client,
                                     GAsyncResult *result,
                                     GError **error);

Complete request started with `snapd_client_get_changes_async()`. See `snapd_client_get_changes_sync()` for more information.

#### Parameters

client | a SnapdClient. |
result | a GAsyncResult. |
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

an array of SnapdChange or `NULL` on error.

[transfer container][element-type SnapdChange]

Since: 1.29

### snapd_client_get_change_sync ()

    SnapdChange *
    snapd_client_get_change_sync (SnapdClient *client,
                                  const gchar *id,
                                  GCancellable *cancellable,
                                  GError **error);

Get information on a change.

#### Parameters

client | a SnapdClient. |
id | a change ID to get information on. |
cancellable | a GCancellable or `NULL`. | [allow-none]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

a SnapdChange or `NULL` on error.

[transfer full]

Since: 1.29

### snapd_client_get_change_async ()

    void
    snapd_client_get_change_async (SnapdClient *client,
                                   const gchar *id,
                                   GCancellable *cancellable,
                                   GAsyncReadyCallback callback,
                                   gpointer user_data);

Asynchronously get information on a change. See `snapd_client_get_change_sync()` for more information.

#### Parameters

client | a SnapdClient. |
id | a change ID to get information on. |
cancellable | a GCancellable or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when the request is satisfied. | [scope async]
user_data | the data to pass to callback function. | [closure]

Since: 1.29

### snapd_client_get_change_finish ()

    SnapdChange *
    snapd_client_get_change_finish (SnapdClient *client,
                                    GAsyncResult *result,
                                    GError **error);

Complete request started with `snapd_client_get_change_async()`. See `snapd_client_get_change_sync()` for more information.

#### Parameters

client | a SnapdClient. |
result | a GAsyncResult. |
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

a SnapdChange or `NULL` on error.

[transfer full]

Since: 1.29

### snapd_client_abort_change_sync ()

    SnapdChange *
    snapd_client_abort_change_sync (SnapdClient *client,
                                    const gchar *id,
                                    GCancellable *cancellable,
                                    GError **error);

Get information on a change.

#### Parameters

client | a SnapdClient. |
id | a change ID to abort. |
cancellable | a GCancellable or `NULL`. | [allow-none]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

a SnapdChange or `NULL` on error.

[transfer full]

Since: 1.30

### snapd_client_abort_change_async ()

    void
    snapd_client_abort_change_async (SnapdClient *client,
                                     const gchar *id,
                                     GCancellable *cancellable,
                                     GAsyncReadyCallback callback,
                                     gpointer user_data);

Asynchronously abort a change. See `snapd_client_abort_change_sync()` for more information.

#### Parameters

client | a SnapdClient. |
id | a change ID to abort. |
cancellable | a GCancellable or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when the request is satisfied. | [scope async]
user_data | the data to pass to callback function. | [closure]

Since: 1.30

### snapd_client_abort_change_finish ()

    SnapdChange *
    snapd_client_abort_change_finish (SnapdClient *client,
                                      GAsyncResult *result,
                                      GError **error);

Complete request started with `snapd_client_abort_change_async()`. See `snapd_client_abort_change_sync()` for more information.

#### Parameters

client | a SnapdClient. |
result | a GAsyncResult. |
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

a SnapdChange or `NULL` on error.

[transfer full]

Since: 1.30

### snapd_client_get_system_information_sync ()

    SnapdSystemInformation *
    snapd_client_get_system_information_sync
                                   (SnapdClient *client,
                                    GCancellable *cancellable,
                                    GError **error);

Request system information from snapd. While this blocks, snapd is expected to return the information quickly.

#### Parameters

client | a SnapdClient. |
cancellable | a GCancellable or `NULL`. | [allow-none]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

a SnapdSystemInformation or `NULL` on error.

[transfer full]

Since: 1.0

### snapd_client_get_system_information_async ()

    void
    snapd_client_get_system_information_async
                                   (SnapdClient *client,
                                    GCancellable *cancellable,
                                    GAsyncReadyCallback callback,
                                    gpointer user_data);

Request system information asynchronously from snapd. See `snapd_client_get_system_information_sync()` for more information.

#### Parameters

client | a SnapdClient. |
cancellable | a GCancellable or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when the request is satisfied. | [scope async]
user_data | the data to pass to callback function. | [closure]

Since: 1.0

### snapd_client_get_system_information_finish ()

    SnapdSystemInformation *
    snapd_client_get_system_information_finish
                                   (SnapdClient *client,
                                    GAsyncResult *result,
                                    GError **error);

Complete request started with `snapd_client_get_system_information_async()`. See `snapd_client_get_system_information_sync()` for more information.

#### Parameters

client | a SnapdClient. |
result | a GAsyncResult. |
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

a SnapdSystemInformation or `NULL` on error.

[transfer full]

Since: 1.0

### snapd_client_list_sync ()

    GPtrArray *
    snapd_client_list_sync (SnapdClient *client,
                            GCancellable *cancellable,
                            GError **error);

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

Use `snapd_client_get_snaps_sync()`

Get information on all installed snaps.

#### Parameters

client | a SnapdClient. |
cancellable | a GCancellable or `NULL`. | [allow-none]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

an array of SnapdSnap or `NULL` on error.

[transfer container][element-type SnapdSnap]

Since: 1.0

### snapd_client_list_async ()

    void
    snapd_client_list_async (SnapdClient *client,
                             GCancellable *cancellable,
                             GAsyncReadyCallback callback,
                             gpointer user_data);

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

Use `snapd_client_get_snaps_async()`

Asynchronously get information on all installed snaps. See `snapd_client_list_sync()` for more information.

#### Parameters

client | a SnapdClient. |
cancellable | a GCancellable or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when the request is satisfied. | [scope async]
user_data | the data to pass to callback function. | [closure]

Since: 1.0

### snapd_client_list_finish ()

    GPtrArray *
    snapd_client_list_finish (SnapdClient *client,
                              GAsyncResult *result,
                              GError **error);

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

Use `snapd_client_get_snaps_finish()`

Complete request started with `snapd_client_list_async()`. See `snapd_client_list_sync()` for more information.

#### Parameters

client | a SnapdClient. |
result | a GAsyncResult. |
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

an array of SnapdSnap or `NULL` on error.

[transfer container][element-type SnapdSnap]

Since: 1.0

### snapd_client_get_snaps_sync ()

    GPtrArray *
    snapd_client_get_snaps_sync (SnapdClient *client,
                                 SnapdGetSnapsFlags flags,
                                 GStrv names,
                                 GCancellable *cancellable,
                                 GError **error);

Get information on installed snaps (snaps with status `SNAPD_SNAP_STATUS_ACTIVE`). If `flags` contains `SNAPD_GET_SNAPS_FLAGS_INCLUDE_INACTIVE` then also return snaps with status `SNAPD_SNAP_STATUS_INSTALLED`.

If `names` is not `NULL` and contains at least one name only snaps that match these names are returned. If a snap is not installed it is not returned (no error is generated).

#### Parameters

client | a SnapdClient. |
flags | a set of SnapdGetSnapsFlags to control what results are returned. |
names | A list of snap names or `NULL`. | [allow-none]
cancellable | a GCancellable or `NULL`. | [allow-none]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

an array of SnapdSnap or `NULL` on error.

[transfer container][element-type SnapdSnap]

Since: 1.42

### snapd_client_get_snaps_async ()

    void
    snapd_client_get_snaps_async (SnapdClient *client,
                                  SnapdGetSnapsFlags flags,
                                  GStrv names,
                                  GCancellable *cancellable,
                                  GAsyncReadyCallback callback,
                                  gpointer user_data);

Asynchronously get information on installed snaps. See `snapd_client_get_snaps_sync()` for more information.

#### Parameters

client | a SnapdClient. |
flags | a set of SnapdGetSnapsFlags to control what results are returned. |
names | A list of snap names to return results for. If `NULL` or empty then all installed snaps are returned. | [allow-none]
cancellable | a GCancellable or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when the request is satisfied. | [scope async]
user_data | the data to pass to callback function. | [closure]

Since: 1.42

### snapd_client_get_snaps_finish ()

    GPtrArray *
    snapd_client_get_snaps_finish (SnapdClient *client,
                                   GAsyncResult *result,
                                   GError **error);

Complete request started with `snapd_client_get_snaps_async()`. See `snapd_client_get_snaps_sync()` for more information.

#### Parameters

client | a SnapdClient. |
result | a GAsyncResult. |
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

an array of SnapdSnap or `NULL` on error.

[transfer container][element-type SnapdSnap]

Since: 1.42

### snapd_client_list_one_sync ()

    SnapdSnap *
    snapd_client_list_one_sync (SnapdClient *client,
                                const gchar *name,
                                GCancellable *cancellable,
                                GError **error);

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

Use `snapd_client_get_snap_sync()`

Get information of a single installed snap.

#### Parameters

client | a SnapdClient. |
name | name of snap to get. |
cancellable | a GCancellable or `NULL`. | [allow-none]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

a SnapdSnap or `NULL` on error.

[transfer full]

Since: 1.0

### snapd_client_list_one_async ()

    void
    snapd_client_list_one_async (SnapdClient *client,
                                 const gchar *name,
                                 GCancellable *cancellable,
                                 GAsyncReadyCallback callback,
                                 gpointer user_data);

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

Use `snapd_client_get_snap_async()`

Asynchronously get information of a single installed snap. See `snapd_client_list_one_sync()` for more information.

#### Parameters

client | a SnapdClient. |
name | name of snap to get. |
cancellable | a GCancellable or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when the request is satisfied. | [scope async]
user_data | the data to pass to callback function. | [closure]

Since: 1.0

### snapd_client_list_one_finish ()

    SnapdSnap *
    snapd_client_list_one_finish (SnapdClient *client,
                                  GAsyncResult *result,
                                  GError **error);

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

Use `snapd_client_get_snap_finish()`

Complete request started with `snapd_client_list_one_async()`. See `snapd_client_list_one_sync()` for more information.

#### Parameters

client | a SnapdClient. |
result | a GAsyncResult. |
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

a SnapdSnap or `NULL` on error.

[transfer full]

Since: 1.0

### snapd_client_get_snap_sync ()

    SnapdSnap *
    snapd_client_get_snap_sync (SnapdClient *client,
                                const gchar *name,
                                GCancellable *cancellable,
                                GError **error);

Get information of a single installed snap. If the snap does not exist an error occurs.

#### Parameters

client | a SnapdClient. |
name | name of snap to get. |
cancellable | a GCancellable or `NULL`. | [allow-none]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

a SnapdSnap or `NULL` on error.

[transfer full]

Since: 1.42

### snapd_client_get_snap_async ()

    void
    snapd_client_get_snap_async (SnapdClient *client,
                                 const gchar *name,
                                 GCancellable *cancellable,
                                 GAsyncReadyCallback callback,
                                 gpointer user_data);

Asynchronously get information of a single installed snap. See `snapd_client_get_snap_sync()` for more information.

#### Parameters

client | a SnapdClient. |
name | name of snap to get. |
cancellable | a GCancellable or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when the request is satisfied. | [scope async]
user_data | the data to pass to callback function. | [closure]

Since: 1.42

### snapd_client_get_snap_finish ()

    SnapdSnap *
    snapd_client_get_snap_finish (SnapdClient *client,
                                  GAsyncResult *result,
                                  GError **error);

Complete request started with `snapd_client_get_snap_async()`. See `snapd_client_get_snap_sync()` for more information.

#### Parameters

client | a SnapdClient. |
result | a GAsyncResult. |
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

a SnapdSnap or `NULL` on error.

[transfer full]

Since: 1.42

### snapd_client_get_snap_conf_sync ()

    GHashTable *
    snapd_client_get_snap_conf_sync (SnapdClient *client,
                                     const gchar *name,
                                     GStrv keys,
                                     GCancellable *cancellable,
                                     GError **error);

Get configuration for a snap. System configuration is stored using the name "system".

#### Parameters

client | a SnapdClient. |
name | name of snap to get configuration from. |
keys | keys to returns or `NULL` to return all. | [allow-none]
cancellable | a GCancellable or `NULL`. | [allow-none]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

a table of configuration values or `NULL` on error.

[transfer container][element-type utf8 GVariant]

Since: 1.48

### snapd_client_get_snap_conf_async ()

    void
    snapd_client_get_snap_conf_async (SnapdClient *client,
                                      const gchar *name,
                                      GStrv keys,
                                      GCancellable *cancellable,
                                      GAsyncReadyCallback callback,
                                      gpointer user_data);

Asynchronously get configuration for a snap. See `snapd_client_get_snap_conf_sync()` for more information.

#### Parameters

client | a SnapdClient. |
name | name of snap to get configuration from. |
keys | keys to returns or `NULL` to return all. | [allow-none]
cancellable | a GCancellable or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when the request is satisfied. | [scope async]
user_data | the data to pass to callback function. | [closure]

Since: 1.48

### snapd_client_get_snap_conf_finish ()

    GHashTable *
    snapd_client_get_snap_conf_finish (SnapdClient *client,
                                       GAsyncResult *result,
                                       GError **error);

Complete request started with `snapd_client_get_snap_conf_async()`. See `snapd_client_get_snap_conf_sync()` for more information.

#### Parameters

client | a SnapdClient. |
result | a GAsyncResult. |
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

a table of configuration values or `NULL` on error.

[transfer container][element-type utf8 GVariant]

Since: 1.48

### snapd_client_set_snap_conf_sync ()

    gboolean
    snapd_client_set_snap_conf_sync (SnapdClient *client,
                                     const gchar *name,
                                     GHashTable *key_values,
                                     GCancellable *cancellable,
                                     GError **error);

Set configuration for a snap. System configuration is stored using the name "system".

#### Parameters

client | a SnapdClient. |
name | name of snap to set configuration for. |
key_values | Keys to set. | [element-type utf8 GVariant]
cancellable | a GCancellable or `NULL`. | [allow-none]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

`TRUE` if configuration successfully applied.

Since: 1.48

### snapd_client_set_snap_conf_async ()

    void
    snapd_client_set_snap_conf_async (SnapdClient *client,
                                      const gchar *name,
                                      GHashTable *key_values,
                                      GCancellable *cancellable,
                                      GAsyncReadyCallback callback,
                                      gpointer user_data);

Asynchronously set configuration for a snap. See `snapd_client_set_snap_conf_sync()` for more information.

#### Parameters

client | a SnapdClient. |
name | name of snap to set configuration for. |
key_values | Keys to set. | [element-type utf8 GVariant]
cancellable | a GCancellable or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when the request is satisfied. | [scope async]
user_data | the data to pass to callback function. | [closure]

Since: 1.48

### snapd_client_set_snap_conf_finish ()

    gboolean
    snapd_client_set_snap_conf_finish (SnapdClient *client,
                                       GAsyncResult *result,
                                       GError **error);

Complete request started with `snapd_client_set_snap_conf_async()`. See `snapd_client_set_snap_conf_sync()` for more information.

#### Parameters

client | a SnapdClient. |
result | a GAsyncResult. |
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

`TRUE` if configuration successfully applied.

Since: 1.48

### snapd_client_get_apps_sync ()

    GPtrArray *
    snapd_client_get_apps_sync (SnapdClient *client,
                                SnapdGetAppsFlags flags,
                                GCancellable *cancellable,
                                GError **error);

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

Use `snapd_client_get_apps2_sync()`

Get information on installed apps.

#### Parameters

client | a SnapdClient. |
flags | a set of SnapdGetAppsFlags to control what results are returned. |
cancellable | a GCancellable or `NULL`. | [allow-none]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

an array of SnapdApp or `NULL` on error.

[transfer container][element-type SnapdApp]

Since: 1.25

### snapd_client_get_apps_async ()

    void
    snapd_client_get_apps_async (SnapdClient *client,
                                 SnapdGetAppsFlags flags,
                                 GCancellable *cancellable,
                                 GAsyncReadyCallback callback,
                                 gpointer user_data);

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

Use `snapd_client_get_apps2_async()`

Asynchronously get information on installed apps. See `snapd_client_get_apps_sync()` for more information.

#### Parameters

client | a SnapdClient. |
flags | a set of SnapdGetAppsFlags to control what results are returned. |
cancellable | a GCancellable or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when the request is satisfied. | [scope async]
user_data | the data to pass to callback function. | [closure]

Since: 1.25

### snapd_client_get_apps_finish ()

    GPtrArray *
    snapd_client_get_apps_finish (SnapdClient *client,
                                  GAsyncResult *result,
                                  GError **error);

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

Use `snapd_client_get_apps2_finish()`

Complete request started with `snapd_client_get_apps_async()`. See `snapd_client_get_apps_sync()` for more information.

#### Parameters

client | a SnapdClient. |
result | a GAsyncResult. |
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

an array of SnapdApp or `NULL` on error.

[transfer container][element-type SnapdApp]

Since: 1.25

### snapd_client_get_apps2_sync ()

    GPtrArray *
    snapd_client_get_apps2_sync (SnapdClient *client,
                                 SnapdGetAppsFlags flags,
                                 GStrv snaps,
                                 GCancellable *cancellable,
                                 GError **error);

Get information on installed apps.

#### Parameters

client | a SnapdClient. |
flags | a set of SnapdGetAppsFlags to control what results are returned. |
snaps | A list of snap names to return results for. If `NULL` or empty then apps for all installed snaps are returned. | [allow-none]
cancellable | a GCancellable or `NULL`. | [allow-none]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

an array of SnapdApp or `NULL` on error.

[transfer container][element-type SnapdApp]

Since: 1.45

### snapd_client_get_apps2_async ()

    void
    snapd_client_get_apps2_async (SnapdClient *client,
                                  SnapdGetAppsFlags flags,
                                  GStrv snaps,
                                  GCancellable *cancellable,
                                  GAsyncReadyCallback callback,
                                  gpointer user_data);

Asynchronously get information on installed apps. See `snapd_client_get_apps2_sync()` for more information.

#### Parameters

client | a SnapdClient. |
flags | a set of SnapdGetAppsFlags to control what results are returned. |
snaps | A list of snap names to return results for. If `NULL` or empty then apps for all installed snaps are returned. | [allow-none]
cancellable | a GCancellable or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when the request is satisfied. | [scope async]
user_data | the data to pass to callback function. | [closure]

Since: 1.45

### snapd_client_get_apps2_finish ()

    GPtrArray *
    snapd_client_get_apps2_finish (SnapdClient *client,
                                   GAsyncResult *result,
                                   GError **error);

Complete request started with `snapd_client_get_apps2_async()`. See `snapd_client_get_apps2_sync()` for more information.

#### Parameters

client | a SnapdClient. |
result | a GAsyncResult. |
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

an array of SnapdApp or `NULL` on error.

[transfer container][element-type SnapdApp]

Since: 1.45

### snapd_client_get_icon_sync ()

    SnapdIcon *
    snapd_client_get_icon_sync (SnapdClient *client,
                                const gchar *name,
                                GCancellable *cancellable,
                                GError **error);

Get the icon for an installed snap.

#### Parameters

client | a SnapdClient. |
name | name of snap to get icon for. |
cancellable | a GCancellable or `NULL`. | [allow-none]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

a SnapdIcon or `NULL` on error.

[transfer full]

Since: 1.0

### snapd_client_get_icon_async ()

    void
    snapd_client_get_icon_async (SnapdClient *client,
                                 const gchar *name,
                                 GCancellable *cancellable,
                                 GAsyncReadyCallback callback,
                                 gpointer user_data);

Asynchronously get the icon for an installed snap. See `snapd_client_get_icon_sync()` for more information.

#### Parameters

client | a SnapdClient. |
name | name of snap to get icon for. |
cancellable | a GCancellable or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when the request is satisfied. | [scope async]
user_data | the data to pass to callback function. | [closure]

Since: 1.0

### snapd_client_get_icon_finish ()

    SnapdIcon *
    snapd_client_get_icon_finish (SnapdClient *client,
                                  GAsyncResult *result,
                                  GError **error);

Complete request started with `snapd_client_get_icon_async()`. See `snapd_client_get_icon_sync()` for more information.

#### Parameters

client | a SnapdClient. |
result | a GAsyncResult. |
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

a SnapdIcon or `NULL` on error.

[transfer full]

Since: 1.0

### snapd_client_get_assertions_async ()

    void
    snapd_client_get_assertions_async (SnapdClient *client,
                                       const gchar *type,
                                       GCancellable *cancellable,
                                       GAsyncReadyCallback callback,
                                       gpointer user_data);

Asynchronously get assertions. See `snapd_client_get_assertions_sync()` for more information.

#### Parameters

client | a SnapdClient. |
type | assertion type to get. |
cancellable | a GCancellable or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when the request is satisfied. | [scope async]
user_data | the data to pass to callback function. | [closure]

Since: 1.8

### snapd_client_get_assertions_finish ()

    GStrv
    snapd_client_get_assertions_finish (SnapdClient *client,
                                        GAsyncResult *result,
                                        GError **error);

Complete request started with `snapd_client_get_assertions_async()`. See `snapd_client_get_assertions_sync()` for more information.

#### Parameters

client | a SnapdClient. |
result | a GAsyncResult. |
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

an array of assertions or `NULL` on error.

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

Since: 1.8

### snapd_client_get_assertions_sync ()

    GStrv
    snapd_client_get_assertions_sync (SnapdClient *client,
                                      const gchar *type,
                                      GCancellable *cancellable,
                                      GError **error);

Get assertions.

#### Parameters

client | a SnapdClient. |
type | assertion type to get. |
cancellable | a GCancellable or `NULL`. | [allow-none]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

an array of assertions or `NULL` on error.

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

Since: 1.8

### snapd_client_add_assertions_async ()

    void
    snapd_client_add_assertions_async (SnapdClient *client,
                                       GStrv assertions,
                                       GCancellable *cancellable,
                                       GAsyncReadyCallback callback,
                                       gpointer user_data);

Asynchronously add an assertion. See `snapd_client_add_assertions_sync()` for more information.

#### Parameters

client | a SnapdClient. |
assertions | assertions to add. |
cancellable | a GCancellable or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when the request is satisfied. | [scope async]
user_data | the data to pass to callback function. | [closure]

Since: 1.8

### snapd_client_add_assertions_finish ()

    gboolean
    snapd_client_add_assertions_finish (SnapdClient *client,
                                        GAsyncResult *result,
                                        GError **error);

Complete request started with `snapd_client_add_assertions_async()`. See `snapd_client_add_assertions_sync()` for more information.

#### Parameters

client | a SnapdClient. |
result | a GAsyncResult. |
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

`TRUE` on success or `FALSE` on error.

Since: 1.8

### snapd_client_add_assertions_sync ()

    gboolean
    snapd_client_add_assertions_sync (SnapdClient *client,
                                      GStrv assertions,
                                      GCancellable *cancellable,
                                      GError **error);

Add an assertion.

#### Parameters

client | a SnapdClient. |
assertions | assertions to add. |
cancellable | a GCancellable or `NULL`. | [allow-none]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

`TRUE` on success or `FALSE` on error.

Since: 1.8

### snapd_client_get_interfaces_sync ()

    gboolean
    snapd_client_get_interfaces_sync (SnapdClient *client,
                                      GPtrArray **plugs,
                                      GPtrArray **slots,
                                      GCancellable *cancellable,
                                      GError **error);

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

Use `snapd_client_get_connections_sync()`

Get the installed snap interfaces.

#### Parameters

client | a SnapdClient. |
plugs | the location to store the array of SnapdPlug or `NULL`. | [out][allow-none][transfer container][element-type SnapdPlug]
slots | the location to store the array of SnapdSlot or `NULL`. | [out][allow-none][transfer container][element-type SnapdSlot]
cancellable | a GCancellable or `NULL`. | [allow-none]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

`TRUE` on success or `FALSE` on error.

Since: 1.0

### snapd_client_get_interfaces_async ()

    void
    snapd_client_get_interfaces_async (SnapdClient *client,
                                       GCancellable *cancellable,
                                       GAsyncReadyCallback callback,
                                       gpointer user_data);

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

Use `snapd_client_get_connections2_async()`

Asynchronously get the installed snap interfaces. See `snapd_client_get_interfaces_sync()` for more information.

#### Parameters

client | a SnapdClient. |
cancellable | a GCancellable or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when the request is satisfied. | [scope async]
user_data | the data to pass to callback function. | [closure]

Since: 1.0

### snapd_client_get_interfaces_finish ()

    gboolean
    snapd_client_get_interfaces_finish (SnapdClient *client,
                                        GAsyncResult *result,
                                        GPtrArray **plugs,
                                        GPtrArray **slots,
                                        GError **error);

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

Use `snapd_client_get_connections2_finish()`

Complete request started with `snapd_client_get_interfaces_async()`. See `snapd_client_get_interfaces_sync()` for more information.

#### Parameters

client | a SnapdClient. |
result | a GAsyncResult. |
plugs | the location to store the array of SnapdPlug or `NULL`. | [out][allow-none][transfer container][element-type SnapdPlug]
slots | the location to store the array of SnapdSlot or `NULL`. | [out][allow-none][transfer container][element-type SnapdSlot]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

`TRUE` on success or `FALSE` on error.

Since: 1.0

### snapd_client_get_interfaces2_sync ()

    GPtrArray *
    snapd_client_get_interfaces2_sync (SnapdClient *client,
                                       SnapdGetInterfacesFlags flags,
                                       GStrv names,
                                       GCancellable *cancellable,
                                       GError **error);

Get information about the available snap interfaces.

#### Parameters

client | a SnapdClient. |
flags | a set of SnapdGetInterfacesFlags to control what information is returned about the interfaces. |
names | a null-terminated array of interface names or `NULL`. | [allow-none][array zero-terminated=1]
cancellable | a GCancellable or `NULL`. | [allow-none]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

the available interfaces.

[transfer container][element-type SnapdInterface]

Since: 1.48

### snapd_client_get_interfaces2_async ()

    void
    snapd_client_get_interfaces2_async (SnapdClient *client,
                                        SnapdGetInterfacesFlags flags,
                                        GStrv names,
                                        GCancellable *cancellable,
                                        GAsyncReadyCallback callback,
                                        gpointer user_data);

Asynchronously get the installed snap interfaces. See `snapd_client_get_interfaces2_sync()` for more information.

#### Parameters

client | a SnapdClient. |
flags | a set of SnapdGetInterfacesFlags to control what information is returned about the interfaces. |
names | a null-terminated array of interface names or `NULL`. | [allow-none][array zero-terminated=1]
cancellable | a GCancellable or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when the request is satisfied. | [scope async]
user_data | the data to pass to callback function. | [closure]

Since: 1.48

### snapd_client_get_interfaces2_finish ()

    GPtrArray *
    snapd_client_get_interfaces2_finish (SnapdClient *client,
                                         GAsyncResult *result,
                                         GError **error);

Complete request started with `snapd_client_get_interfaces2_async()`. See `snapd_client_get_interfaces2_sync()` for more information.

#### Parameters

client | a SnapdClient. |
result | a GAsyncResult. |
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

an array of SnapdInterface or `NULL` on error.

[transfer container][element-type SnapdInterface]

Since: 1.48

### snapd_client_get_connections_sync ()

    gboolean
    snapd_client_get_connections_sync (SnapdClient *client,
                                       GPtrArray **established,
                                       GPtrArray **undesired,
                                       GPtrArray **plugs,
                                       GPtrArray **slots,
                                       GCancellable *cancellable,
                                       GError **error);

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

Use `snapd_client_get_connections2_sync()`

Get the installed snap connections.

#### Parameters

client | a SnapdClient. |
established | the location to store the array of connections or `NULL`. | [out][allow-none][transfer container][element-type SnapdConnection]
undesired | the location to store the array of auto-connected connections that have been manually disconnected or `NULL`. | [out][allow-none][transfer container][element-type SnapdConnection]
plugs | the location to store the array of SnapdPlug or `NULL`. | [out][allow-none][transfer container][element-type SnapdPlug]
slots | the location to store the array of SnapdSlot or `NULL`. | [out][allow-none][transfer container][element-type SnapdSlot]
cancellable | a GCancellable or `NULL`. | [allow-none]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

`TRUE` on success or `FALSE` on error.

Since: 1.48

### snapd_client_get_connections_async ()

    void
    snapd_client_get_connections_async (SnapdClient *client,
                                        GCancellable *cancellable,
                                        GAsyncReadyCallback callback,
                                        gpointer user_data);

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

Use `snapd_client_get_connections2_async()`

Asynchronously get the installed snap connections. See `snapd_client_get_connections_sync()` for more information.

#### Parameters

client | a SnapdClient. |
cancellable | a GCancellable or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when the request is satisfied. | [scope async]
user_data | the data to pass to callback function. | [closure]

Since: 1.48

### snapd_client_get_connections_finish ()

    gboolean
    snapd_client_get_connections_finish (SnapdClient *client,
                                         GAsyncResult *result,
                                         GPtrArray **established,
                                         GPtrArray **undesired,
                                         GPtrArray **plugs,
                                         GPtrArray **slots,
                                         GError **error);

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

Use `snapd_client_get_connections2_finish()`

Complete request started with `snapd_client_get_connections_async()`. See `snapd_client_get_connections_sync()` for more information.

#### Parameters

client | a SnapdClient. |
result | a GAsyncResult. |
established | the location to store the array of connections or `NULL`. | [out][allow-none][transfer container][element-type SnapdConnection]
undesired | the location to store the array of auto-connected connections that have been manually disconnected or `NULL`. | [out][allow-none][transfer container][element-type SnapdConnection]
plugs | the location to store the array of SnapdPlug or `NULL`. | [out][allow-none][transfer container][element-type SnapdPlug]
slots | the location to store the array of SnapdSlot or `NULL`. | [out][allow-none][transfer container][element-type SnapdSlot]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

`TRUE` on success or `FALSE` on error.

Since: 1.48

### snapd_client_get_connections2_sync ()

    gboolean
    snapd_client_get_connections2_sync (SnapdClient *client,
                                        SnapdGetConnectionsFlags flags,
                                        const gchar *snap,
                                        const gchar *interface,
                                        GPtrArray **established,
                                        GPtrArray **undesired,
                                        GPtrArray **plugs,
                                        GPtrArray **slots,
                                        GCancellable *cancellable,
                                        GError **error);

Get the installed snap connections.

#### Parameters

client | a SnapdClient. |
flags | a set of SnapdGetConnectionsFlags to control what results are returned. |
snap | the name of the snap to get connections for or `NULL` for all snaps. | [allow-none]
interface | the name of the interface to get connections for or `NULL` for all interfaces. | [allow-none]
established | the location to store the array of connections or `NULL`. | [out][allow-none][transfer container][element-type SnapdConnection]
undesired | the location to store the array of auto-connected connections that have been manually disconnected or `NULL`. | [out][allow-none][transfer container][element-type SnapdConnection]
plugs | the location to store the array of SnapdPlug or `NULL`. | [out][allow-none][transfer container][element-type SnapdPlug]
slots | the location to store the array of SnapdSlot or `NULL`. | [out][allow-none][transfer container][element-type SnapdSlot]
cancellable | a GCancellable or `NULL`. | [allow-none]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

`TRUE` on success or `FALSE` on error.

Since: 1.49

### snapd_client_get_connections2_async ()

    void
    snapd_client_get_connections2_async (SnapdClient *client,
                                         SnapdGetConnectionsFlags flags,
                                         const gchar *snap,
                                         const gchar *interface,
                                         GCancellable *cancellable,
                                         GAsyncReadyCallback callback,
                                         gpointer user_data);

Asynchronously get the installed snap connections. See `snapd_client_get_connections_sync()` for more information.

#### Parameters

client | a SnapdClient. |
flags | a set of SnapdGetConnectionsFlags to control what results are returned. |
snap | the name of the snap to get connections for or `NULL` for all snaps. | [allow-none]
interface | the name of the interface to get connections for or `NULL` for all interfaces. | [allow-none]
cancellable | a GCancellable or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when the request is satisfied. | [scope async]
user_data | the data to pass to callback function. | [closure]

Since: 1.49

### snapd_client_get_connections2_finish ()

    gboolean
    snapd_client_get_connections2_finish (SnapdClient *client,
                                          GAsyncResult *result,
                                          GPtrArray **established,
                                          GPtrArray **undesired,
                                          GPtrArray **plugs,
                                          GPtrArray **slots,
                                          GError **error);

Complete request started with `snapd_client_get_connections_async()`. See `snapd_client_get_connections_sync()` for more information.

#### Parameters

client | a SnapdClient. |
result | a GAsyncResult. |
established | the location to store the array of connections or `NULL`. | [out][allow-none][transfer container][element-type SnapdConnection]
undesired | the location to store the array of auto-connected connections that have been manually disconnected or `NULL`. | [out][allow-none][transfer container][element-type SnapdConnection]
plugs | the location to store the array of SnapdPlug or `NULL`. | [out][allow-none][transfer container][element-type SnapdPlug]
slots | the location to store the array of SnapdSlot or `NULL`. | [out][allow-none][transfer container][element-type SnapdSlot]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

`TRUE` on success or `FALSE` on error.

Since: 1.49

### snapd_client_connect_interface_sync ()

    gboolean
    snapd_client_connect_interface_sync (SnapdClient *client,
                                         const gchar *plug_snap,
                                         const gchar *plug_name,
                                         const gchar *slot_snap,
                                         const gchar *slot_name,
                                         SnapdProgressCallback progress_callback,
                                         gpointer progress_callback_data,
                                         GCancellable *cancellable,
                                         GError **error);

Connect two interfaces together. An asynchronous version of this function is `snapd_client_connect_interface_async()`.

#### Parameters

client | a SnapdClient. |
plug_snap | name of snap containing plug. |
plug_name | name of plug to connect. |
slot_snap | name of snap containing socket. |
slot_name | name of slot to connect. |
progress_callback | function to callback with progress. | [allow-none][scope call]
progress_callback_data | user data to pass to `progress_callback` . | [closure]
cancellable | a GCancellable or `NULL`. | [allow-none]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

`TRUE` on success or `FALSE` on error.

Since: 1.0

### snapd_client_connect_interface_async ()

    void
    snapd_client_connect_interface_async (SnapdClient *client,
                                          const gchar *plug_snap,
                                          const gchar *plug_name,
                                          const gchar *slot_snap,
                                          const gchar *slot_name,
                                          SnapdProgressCallback progress_callback,
                                          gpointer progress_callback_data,
                                          GCancellable *cancellable,
                                          GAsyncReadyCallback callback,
                                          gpointer user_data);

Asynchronously connect two interfaces together. See `snapd_client_connect_interface_sync()` for more information.

#### Parameters

client | a SnapdClient. |
plug_snap | name of snap containing plug. |
plug_name | name of plug to connect. |
slot_snap | name of snap containing socket. |
slot_name | name of slot to connect. |
progress_callback | function to callback with progress. | [allow-none][scope call]
progress_callback_data | user data to pass to `progress_callback` . | [closure]
cancellable | a GCancellable or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when the request is satisfied. | [scope async]
user_data | the data to pass to callback function. | [closure]

Since: 1.0

### snapd_client_connect_interface_finish ()

    gboolean
    snapd_client_connect_interface_finish (SnapdClient *client,
                                           GAsyncResult *result,
                                           GError **error);

Complete request started with `snapd_client_connect_interface_async()`. See `snapd_client_connect_interface_sync()` for more information.

#### Parameters

client | a SnapdClient. |
result | a GAsyncResult. |
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

`TRUE` on success or `FALSE` on error.

Since: 1.0

### snapd_client_disconnect_interface_sync ()

    gboolean
    snapd_client_disconnect_interface_sync
                                   (SnapdClient *client,
                                    const gchar *plug_snap,
                                    const gchar *plug_name,
                                    const gchar *slot_snap,
                                    const gchar *slot_name,
                                    SnapdProgressCallback progress_callback,
                                    gpointer progress_callback_data,
                                    GCancellable *cancellable,
                                    GError **error);

Disconnect two interfaces.

#### Parameters

client | a SnapdClient. |
plug_snap | name of snap containing plug. |
plug_name | name of plug to disconnect. |
slot_snap | name of snap containing socket. |
slot_name | name of slot to disconnect. |
progress_callback | function to callback with progress. | [allow-none][scope call]
progress_callback_data | user data to pass to `progress_callback` . | [closure]
cancellable | a GCancellable or `NULL`. | [allow-none]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

`TRUE` on success or `FALSE` on error.

Since: 1.0

### snapd_client_disconnect_interface_async ()

    void
    snapd_client_disconnect_interface_async
                                   (SnapdClient *client,
                                    const gchar *plug_snap,
                                    const gchar *plug_name,
                                    const gchar *slot_snap,
                                    const gchar *slot_name,
                                    SnapdProgressCallback progress_callback,
                                    gpointer progress_callback_data,
                                    GCancellable *cancellable,
                                    GAsyncReadyCallback callback,
                                    gpointer user_data);

Asynchronously disconnect two interfaces. See `snapd_client_disconnect_interface_sync()` for more information.

#### Parameters

client | a SnapdClient. |
plug_snap | name of snap containing plug. |
plug_name | name of plug to disconnect. |
slot_snap | name of snap containing socket. |
slot_name | name of slot to disconnect. |
progress_callback | function to callback with progress. | [allow-none][scope call]
progress_callback_data | user data to pass to `progress_callback` . | [closure]
cancellable | a GCancellable or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when the request is satisfied. | [scope async]
user_data | the data to pass to callback function. | [closure]

Since: 1.0

### snapd_client_disconnect_interface_finish ()

    gboolean
    snapd_client_disconnect_interface_finish
                                   (SnapdClient *client,
                                    GAsyncResult *result,
                                    GError **error);

Complete request started with `snapd_client_disconnect_interface_async()`. See `snapd_client_disconnect_interface_sync()` for more information.

#### Parameters

client | a SnapdClient. |
result | a GAsyncResult. |
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

`TRUE` on success or `FALSE` on error.

Since: 1.0

### snapd_client_find_sync ()

    GPtrArray *
    snapd_client_find_sync (SnapdClient *client,
                            SnapdFindFlags flags,
                            const gchar *query,
                            gchar **suggested_currency,
                            GCancellable *cancellable,
                            GError **error);

Find snaps in the store.

#### Parameters

client | a SnapdClient. |
flags | a set of SnapdFindFlags to control how the find is performed. |
query | query string to send or `NULL` to return featured snaps. | [allow-none]
suggested_currency | location to store the ISO 4217 currency that is suggested to purchase with. | [out][allow-none]
cancellable | a GCancellable or `NULL`. | [allow-none]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

an array of SnapdSnap or `NULL` on error.

[transfer container][element-type SnapdSnap]

Since: 1.0

### snapd_client_find_async ()

    void
    snapd_client_find_async (SnapdClient *client,
                             SnapdFindFlags flags,
                             const gchar *query,
                             GCancellable *cancellable,
                             GAsyncReadyCallback callback,
                             gpointer user_data);

Asynchronously find snaps in the store. See `snapd_client_find_sync()` for more information.

#### Parameters

client | a SnapdClient. |
flags | a set of SnapdFindFlags to control how the find is performed. |
query | query string to send or `NULL` to return featured snaps. | [allow-none]
cancellable | a GCancellable or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when the request is satisfied. | [scope async]
user_data | the data to pass to callback function. | [closure]

Since: 1.0

### snapd_client_find_finish ()

    GPtrArray *
    snapd_client_find_finish (SnapdClient *client,
                              GAsyncResult *result,
                              gchar **suggested_currency,
                              GError **error);

Complete request started with `snapd_client_find_async()`. See `snapd_client_find_sync()` for more information.

#### Parameters

client | a SnapdClient. |
result | a GAsyncResult. |
suggested_currency | location to store the ISO 4217 currency that is suggested to purchase with. | [out][allow-none]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

an array of SnapdSnap or `NULL` on error.

[transfer container][element-type SnapdSnap]

Since: 1.0

### snapd_client_find_section_async ()

    void
    snapd_client_find_section_async (SnapdClient *client,
                                     SnapdFindFlags flags,
                                     const gchar *section,
                                     const gchar *query,
                                     GCancellable *cancellable,
                                     GAsyncReadyCallback callback,
                                     gpointer user_data);

Asynchronously find snaps in the store. See `snapd_client_find_section_sync()` for more information.

#### Parameters

client | a SnapdClient. |
flags | a set of SnapdFindFlags to control how the find is performed. |
section | store section to search in or `NULL` to search in all sections. | [allow-none]
query | query string to send or `NULL` to get all snaps from the given section. | [allow-none]
cancellable | a GCancellable or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when the request is satisfied. | [scope async]
user_data | the data to pass to callback function. | [closure]

Since: 1.7

### snapd_client_find_section_sync ()

    GPtrArray *
    snapd_client_find_section_sync (SnapdClient *client,
                                    SnapdFindFlags flags,
                                    const gchar *section,
                                    const gchar *query,
                                    gchar **suggested_currency,
                                    GCancellable *cancellable,
                                    GError **error);

Find snaps in the store.

#### Parameters

client | a SnapdClient. |
flags | a set of SnapdFindFlags to control how the find is performed. |
section | store section to search in or `NULL` to search in all sections. | [allow-none]
query | query string to send or `NULL` to get all snaps from the given section. | [allow-none]
suggested_currency | location to store the ISO 4217 currency that is suggested to purchase with. | [out][allow-none]
cancellable | a GCancellable or `NULL`. | [allow-none]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

an array of SnapdSnap or `NULL` on error.

[transfer container][element-type SnapdSnap]

Since: 1.7

### snapd_client_find_section_finish ()

    GPtrArray *
    snapd_client_find_section_finish (SnapdClient *client,
                                      GAsyncResult *result,
                                      gchar **suggested_currency,
                                      GError **error);

Complete request started with `snapd_client_find_async()`. See `snapd_client_find_sync()` for more information.

#### Parameters

client | a SnapdClient. |
result | a GAsyncResult. |
suggested_currency | location to store the ISO 4217 currency that is suggested to purchase with. | [out][allow-none]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

an array of SnapdSnap or `NULL` on error.

[transfer container][element-type SnapdSnap]

Since: 1.7

### snapd_client_find_refreshable_sync ()

    GPtrArray *
    snapd_client_find_refreshable_sync (SnapdClient *client,
                                        GCancellable *cancellable,
                                        GError **error);

Find snaps in store that are newer revisions than locally installed versions.

#### Parameters

client | a SnapdClient. |
cancellable | a GCancellable or `NULL`. | [allow-none]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

an array of SnapdSnap or `NULL` on error.

[transfer container][element-type SnapdSnap]

Since: 1.8

### snapd_client_find_refreshable_async ()

    void
    snapd_client_find_refreshable_async (SnapdClient *client,
                                         GCancellable *cancellable,
                                         GAsyncReadyCallback callback,
                                         gpointer user_data);

Asynchronously find snaps in store that are newer revisions than locally installed versions. See `snapd_client_find_refreshable_sync()` for more information.

#### Parameters

client | a SnapdClient. |
cancellable | a GCancellable or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when the request is satisfied. | [scope async]
user_data | the data to pass to callback function. | [closure]

Since: 1.8

### snapd_client_find_refreshable_finish ()

    GPtrArray *
    snapd_client_find_refreshable_finish (SnapdClient *client,
                                          GAsyncResult *result,
                                          GError **error);

Complete request started with `snapd_client_find_refreshable_async()`. See `snapd_client_find_refreshable_sync()` for more information.

#### Parameters

client | a SnapdClient. |
result | a GAsyncResult. |
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

an array of SnapdSnap or `NULL` on error.

[transfer container][element-type SnapdSnap]

Since: 1.5

### snapd_client_install_sync ()

    gboolean
    snapd_client_install_sync (SnapdClient *client,
                               const gchar *name,
                               const gchar *channel,
                               SnapdProgressCallback progress_callback,
                               gpointer progress_callback_data,
                               GCancellable *cancellable,
                               GError **error);

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

Use `snapd_client_install2_sync()`

Install a snap from the store.

#### Parameters

client | a SnapdClient. |
name | name of snap to install. |
channel | channel to install from or `NULL` for default. | [allow-none]
progress_callback | function to callback with progress. | [allow-none][scope call]
progress_callback_data | user data to pass to `progress_callback` . | [closure]
cancellable | a GCancellable or `NULL`. | [allow-none]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

`TRUE` on success or `FALSE` on error.

Since: 1.0

### snapd_client_install_async ()

    void
    snapd_client_install_async (SnapdClient *client,
                                const gchar *name,
                                const gchar *channel,
                                SnapdProgressCallback progress_callback,
                                gpointer progress_callback_data,
                                GCancellable *cancellable,
                                GAsyncReadyCallback callback,
                                gpointer user_data);

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

Use `snapd_client_install2_async()`

Asynchronously install a snap from the store. See `snapd_client_install_sync()` for more information.

#### Parameters

client | a SnapdClient. |
name | name of snap to install. |
channel | channel to install from or `NULL` for default. | [allow-none]
progress_callback | function to callback with progress. | [allow-none][scope call]
progress_callback_data | user data to pass to `progress_callback` . | [closure]
cancellable | a GCancellable or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when the request is satisfied. | [scope async]
user_data | the data to pass to callback function. | [closure]

Since: 1.0

### snapd_client_install_finish ()

    gboolean
    snapd_client_install_finish (SnapdClient *client,
                                 GAsyncResult *result,
                                 GError **error);

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

Use `snapd_client_install2_finish()`

Complete request started with `snapd_client_install_async()`. See `snapd_client_install_sync()` for more information.

#### Parameters

client | a SnapdClient. |
result | a GAsyncResult. |
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

`TRUE` on success or `FALSE` on error.

Since: 1.0

### snapd_client_install2_sync ()

    gboolean
    snapd_client_install2_sync (SnapdClient *client,
                                SnapdInstallFlags flags,
                                const gchar *name,
                                const gchar *channel,
                                const gchar *revision,
                                SnapdProgressCallback progress_callback,
                                gpointer progress_callback_data,
                                GCancellable *cancellable,
                                GError **error);

Install a snap from the store.

#### Parameters

client | a SnapdClient. |
flags | a set of SnapdInstallFlags to control install options. |
name | name of snap to install. |
channel | channel to install from or `NULL` for default. | [allow-none]
revision | revision to install or `NULL` for default. | [allow-none]
progress_callback | function to callback with progress. | [allow-none][scope call]
progress_callback_data | user data to pass to `progress_callback` . | [closure]
cancellable | a GCancellable or `NULL`. | [allow-none]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

`TRUE` on success or `FALSE` on error.

Since: 1.12

### snapd_client_install2_async ()

    void
    snapd_client_install2_async (SnapdClient *client,
                                 SnapdInstallFlags flags,
                                 const gchar *name,
                                 const gchar *channel,
                                 const gchar *revision,
                                 SnapdProgressCallback progress_callback,
                                 gpointer progress_callback_data,
                                 GCancellable *cancellable,
                                 GAsyncReadyCallback callback,
                                 gpointer user_data);

Asynchronously install a snap from the store. See `snapd_client_install2_sync()` for more information.

#### Parameters

client | a SnapdClient. |
flags | a set of SnapdInstallFlags to control install options. |
name | name of snap to install. |
channel | channel to install from or `NULL` for default. | [allow-none]
revision | revision to install or `NULL` for default. | [allow-none]
progress_callback | function to callback with progress. | [allow-none][scope call]
progress_callback_data | user data to pass to `progress_callback` . | [closure]
cancellable | a GCancellable or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when the request is satisfied. | [scope async]
user_data | the data to pass to callback function. | [closure]

Since: 1.12

### snapd_client_install2_finish ()

    gboolean
    snapd_client_install2_finish (SnapdClient *client,
                                  GAsyncResult *result,
                                  GError **error);

Complete request started with `snapd_client_install2_async()`. See `snapd_client_install2_sync()` for more information.

#### Parameters

client | a SnapdClient. |
result | a GAsyncResult. |
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

`TRUE` on success or `FALSE` on error.

Since: 1.12

### snapd_client_install_stream_async ()

    void
    snapd_client_install_stream_async (SnapdClient *client,
                                       SnapdInstallFlags flags,
                                       GInputStream *stream,
                                       SnapdProgressCallback progress_callback,
                                       gpointer progress_callback_data,
                                       GCancellable *cancellable,
                                       GAsyncReadyCallback callback,
                                       gpointer user_data);

Asynchronously install a snap. See `snapd_client_install_stream_sync()` for more information.

#### Parameters

client | a SnapdClient. |
flags | a set of SnapdInstallFlags to control install options. |
stream | a GInputStream containing the snap file contents to install. |
progress_callback | function to callback with progress. | [allow-none][scope call]
progress_callback_data | user data to pass to `progress_callback` . | [closure]
cancellable | a GCancellable or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when the request is satisfied. | [scope async]
user_data | the data to pass to callback function. | [closure]

Since: 1.9

### snapd_client_install_stream_finish ()

    gboolean
    snapd_client_install_stream_finish (SnapdClient *client,
                                        GAsyncResult *result,
                                        GError **error);

Complete request started with `snapd_client_install_stream_async()`. See `snapd_client_install_stream_sync()` for more information.

#### Parameters

client | a SnapdClient. |
result | a GAsyncResult. |
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

`TRUE` on success or `FALSE` on error.

Since: 1.9

### snapd_client_install_stream_sync ()

    gboolean
    snapd_client_install_stream_sync (SnapdClient *client,
                                      SnapdInstallFlags flags,
                                      GInputStream *stream,
                                      SnapdProgressCallback progress_callback,
                                      gpointer progress_callback_data,
                                      GCancellable *cancellable,
                                      GError **error);

Install a snap. The snap contents are provided in the form of an input stream. To install from a local file, do the following:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    g_autoptr(GFile) file = g_file_new_for_path (path_to_snap_file);
    g_autoptr(GInputStream) stream = g_file_read (file, cancellable, &error);
    snapd_client_install_stream_sync (self, stream, progress_cb, NULL, cancellable, &error);
    \]

    Or if you have the file in memory you can use:

    |[
    g_autoptr(GInputStream) stream = g_memory_input_stream_new_from_data (data, data_length, free_data);
    snapd_client_install_stream_sync (self, stream, progress_cb, NULL, cancellable, &error);
    \]

#### Parameters

client | a SnapdClient. |
flags | a set of SnapdInstallFlags to control install options. |
stream | a GInputStream containing the snap file contents to install. |
progress_callback | function to callback with progress. | [allow-none][scope call]
progress_callback_data | user data to pass to `progress_callback` . | [closure]
cancellable | a GCancellable or `NULL`. | [allow-none]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

`TRUE` on success or `FALSE` on error.

Since: 1.9

### snapd_client_try_async ()

    void
    snapd_client_try_async (SnapdClient *client,
                            const gchar *path,
                            SnapdProgressCallback progress_callback,
                            gpointer progress_callback_data,
                            GCancellable *cancellable,
                            GAsyncReadyCallback callback,
                            gpointer user_data);

Asynchronously try a snap. See `snapd_client_try_sync()` for more information.

#### Parameters

client | a SnapdClient. |
path | path to snap directory to try. |
progress_callback | function to callback with progress. | [allow-none][scope call]
progress_callback_data | user data to pass to `progress_callback` . | [closure]
cancellable | a GCancellable or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when the request is satisfied. | [scope async]
user_data | the data to pass to callback function. | [closure]

Since: 1.9

### snapd_client_try_finish ()

    gboolean
    snapd_client_try_finish (SnapdClient *client,
                             GAsyncResult *result,
                             GError **error);

Complete request started with `snapd_client_try_async()`. See `snapd_client_try_sync()` for more information.

#### Parameters

client | a SnapdClient. |
result | a GAsyncResult. |
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

`TRUE` on success or `FALSE` on error.

Since: 1.9

### snapd_client_try_sync ()

    gboolean
    snapd_client_try_sync (SnapdClient *client,
                           const gchar *path,
                           SnapdProgressCallback progress_callback,
                           gpointer progress_callback_data,
                           GCancellable *cancellable,
                           GError **error);

Try a snap.

#### Parameters

client | a SnapdClient. |
path | path to snap directory to try. |
progress_callback | function to callback with progress. | [allow-none][scope call]
progress_callback_data | user data to pass to `progress_callback` . | [closure]
cancellable | a GCancellable or `NULL`. | [allow-none]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

`TRUE` on success or `FALSE` on error.

Since: 1.9

### snapd_client_refresh_sync ()

    gboolean
    snapd_client_refresh_sync (SnapdClient *client,
                               const gchar *name,
                               const gchar *channel,
                               SnapdProgressCallback progress_callback,
                               gpointer progress_callback_data,
                               GCancellable *cancellable,
                               GError **error);

Ensure an installed snap is at the latest version.

#### Parameters

client | a SnapdClient. |
name | name of snap to refresh. |
channel | channel to refresh from or `NULL` for default. | [allow-none]
progress_callback | function to callback with progress. | [allow-none][scope call]
progress_callback_data | user data to pass to `progress_callback` . | [closure]
cancellable | a GCancellable or `NULL`. | [allow-none]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

`TRUE` on success or `FALSE` on error.

Since: 1.0

### snapd_client_refresh_async ()

    void
    snapd_client_refresh_async (SnapdClient *client,
                                const gchar *name,
                                const gchar *channel,
                                SnapdProgressCallback progress_callback,
                                gpointer progress_callback_data,
                                GCancellable *cancellable,
                                GAsyncReadyCallback callback,
                                gpointer user_data);

Asynchronously ensure an installed snap is at the latest version. See `snapd_client_refresh_sync()` for more information.

#### Parameters

client | a SnapdClient. |
name | name of snap to refresh. |
channel | channel to refresh from or `NULL` for default. | [allow-none]
progress_callback | function to callback with progress. | [allow-none][scope call]
progress_callback_data | user data to pass to `progress_callback` . | [closure]
cancellable | a GCancellable or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when the request is satisfied. | [scope async]
user_data | the data to pass to callback function. | [closure]

Since: 1.0

### snapd_client_refresh_finish ()

    gboolean
    snapd_client_refresh_finish (SnapdClient *client,
                                 GAsyncResult *result,
                                 GError **error);

Complete request started with `snapd_client_refresh_async()`. See `snapd_client_refresh_sync()` for more information.

#### Parameters

client | a SnapdClient. |
result | a GAsyncResult. |
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

`TRUE` on success or `FALSE` on error.

Since: 1.0

### snapd_client_refresh_all_sync ()

    GStrv
    snapd_client_refresh_all_sync (SnapdClient *client,
                                   SnapdProgressCallback progress_callback,
                                   gpointer progress_callback_data,
                                   GCancellable *cancellable,
                                   GError **error);

Update all installed snaps to their latest version.

#### Parameters

client | a SnapdClient. |
progress_callback | function to callback with progress. | [allow-none][scope call]
progress_callback_data | user data to pass to `progress_callback` . | [closure]
cancellable | a GCancellable or `NULL`. | [allow-none]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

a `NULL`-terminated array of the snap names refreshed or `NULL` on error.

[transfer full]

Since: 1.5

### snapd_client_refresh_all_async ()

    void
    snapd_client_refresh_all_async (SnapdClient *client,
                                    SnapdProgressCallback progress_callback,
                                    gpointer progress_callback_data,
                                    GCancellable *cancellable,
                                    GAsyncReadyCallback callback,
                                    gpointer user_data);

Asynchronously ensure all snaps are updated to their latest versions. See `snapd_client_refresh_all_sync()` for more information.

#### Parameters

client | a SnapdClient. |
progress_callback | function to callback with progress. | [allow-none][scope call]
progress_callback_data | user data to pass to `progress_callback` . | [closure]
cancellable | a GCancellable or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when the request is satisfied. | [scope async]
user_data | the data to pass to callback function. | [closure]

Since: 1.5

### snapd_client_refresh_all_finish ()

    GStrv
    snapd_client_refresh_all_finish (SnapdClient *client,
                                     GAsyncResult *result,
                                     GError **error);

Complete request started with `snapd_client_refresh_all_async()`. See `snapd_client_refresh_all_sync()` for more information.

#### Parameters

client | a SnapdClient. |
result | a GAsyncResult. |
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

a `NULL`-terminated array of the snap names refreshed or `NULL` on error.

[transfer full]

Since: 1.5

### snapd_client_remove_sync ()

    gboolean
    snapd_client_remove_sync (SnapdClient *client,
                              const gchar *name,
                              SnapdProgressCallback progress_callback,
                              gpointer progress_callback_data,
                              GCancellable *cancellable,
                              GError **error);

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

Use `snapd_client_remove2_sync()`

Uninstall a snap.

#### Parameters

client | a SnapdClient. |
name | name of snap to remove. |
progress_callback | function to callback with progress. | [allow-none][scope call]
progress_callback_data | user data to pass to `progress_callback` . | [closure]
cancellable | a GCancellable or `NULL`. | [allow-none]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

`TRUE` on success or `FALSE` on error.

Since: 1.0

### snapd_client_remove_async ()

    void
    snapd_client_remove_async (SnapdClient *client,
                               const gchar *name,
                               SnapdProgressCallback progress_callback,
                               gpointer progress_callback_data,
                               GCancellable *cancellable,
                               GAsyncReadyCallback callback,
                               gpointer user_data);

`snapd_client_remove_async` is deprecated and should not be used in newly-written code.

Asynchronously uninstall a snap. See `snapd_client_remove_sync()` for more information.

#### Parameters

client | a SnapdClient. |
name | name of snap to remove. |
progress_callback | function to callback with progress. | [allow-none][scope call]
progress_callback_data | user data to pass to `progress_callback` . | [closure]
cancellable | a GCancellable or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when the request is satisfied. | [scope async]
user_data | the data to pass to callback function. | [closure]

Since: 1.0

### snapd_client_remove_finish ()

    gboolean
    snapd_client_remove_finish (SnapdClient *client,
                                GAsyncResult *result,
                                GError **error);

`snapd_client_remove_finish` is deprecated and should not be used in newly-written code.

Complete request started with `snapd_client_remove_async()`. See `snapd_client_remove_sync()` for more information.

#### Parameters

client | a SnapdClient. |
result | a GAsyncResult. |
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

`TRUE` on success or `FALSE` on error.

Since: 1.0

### snapd_client_remove2_sync ()

    gboolean
    snapd_client_remove2_sync (SnapdClient *client,
                               SnapdRemoveFlags flags,
                               const gchar *name,
                               SnapdProgressCallback progress_callback,
                               gpointer progress_callback_data,
                               GCancellable *cancellable,
                               GError **error);

Uninstall a snap.

#### Parameters

client | a SnapdClient. |
flags | a set of SnapdRemoveFlags to control remove options. |
name | name of snap to remove. |
progress_callback | function to callback with progress. | [allow-none][scope call]
progress_callback_data | user data to pass to `progress_callback` . | [closure]
cancellable | a GCancellable or `NULL`. | [allow-none]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

`TRUE` on success or `FALSE` on error.

Since: 1.50

### snapd_client_remove2_async ()

    void
    snapd_client_remove2_async (SnapdClient *client,
                                SnapdRemoveFlags flags,
                                const gchar *name,
                                SnapdProgressCallback progress_callback,
                                gpointer progress_callback_data,
                                GCancellable *cancellable,
                                GAsyncReadyCallback callback,
                                gpointer user_data);

Asynchronously uninstall a snap. See `snapd_client_remove2_sync()` for more information.

#### Parameters

client | a SnapdClient. |
flags | a set of SnapdRemoveFlags to control remove options. |
name | name of snap to remove. |
progress_callback | function to callback with progress. | [allow-none][scope call]
progress_callback_data | user data to pass to `progress_callback` . | [closure]
cancellable | a GCancellable or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when the request is satisfied. | [scope async]
user_data | the data to pass to callback function. | [closure]

Since: 1.50

### snapd_client_remove2_finish ()

    gboolean
    snapd_client_remove2_finish (SnapdClient *client,
                                 GAsyncResult *result,
                                 GError **error);

Complete request started with `snapd_client_remove2_async()`. See `snapd_client_remove2_sync()` for more information.

#### Parameters

client | a SnapdClient. |
result | a GAsyncResult. |
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

`TRUE` on success or `FALSE` on error.

Since: 1.50

### snapd_client_enable_sync ()

    gboolean
    snapd_client_enable_sync (SnapdClient *client,
                              const gchar *name,
                              SnapdProgressCallback progress_callback,
                              gpointer progress_callback_data,
                              GCancellable *cancellable,
                              GError **error);

Enable an installed snap.

#### Parameters

client | a SnapdClient. |
name | name of snap to enable. |
progress_callback | function to callback with progress. | [allow-none][scope call]
progress_callback_data | user data to pass to `progress_callback` . | [closure]
cancellable | a GCancellable or `NULL`. | [allow-none]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

`TRUE` on success or `FALSE` on error.

Since: 1.0

### snapd_client_enable_async ()

    void
    snapd_client_enable_async (SnapdClient *client,
                               const gchar *name,
                               SnapdProgressCallback progress_callback,
                               gpointer progress_callback_data,
                               GCancellable *cancellable,
                               GAsyncReadyCallback callback,
                               gpointer user_data);

Asynchronously enable an installed snap. See `snapd_client_enable_sync()` for more information.

#### Parameters

client | a SnapdClient. |
name | name of snap to enable. |
progress_callback | function to callback with progress. | [allow-none][scope call]
progress_callback_data | user data to pass to `progress_callback` . | [closure]
cancellable | a GCancellable or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when the request is satisfied. | [scope async]
user_data | the data to pass to callback function. | [closure]

Since: 1.0

### snapd_client_enable_finish ()

    gboolean
    snapd_client_enable_finish (SnapdClient *client,
                                GAsyncResult *result,
                                GError **error);

Complete request started with `snapd_client_enable_async()`. See `snapd_client_enable_sync()` for more information.

#### Parameters

client | a SnapdClient. |
result | a GAsyncResult. |
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

`TRUE` on success or `FALSE` on error.

Since: 1.0

### snapd_client_disable_sync ()

    gboolean
    snapd_client_disable_sync (SnapdClient *client,
                               const gchar *name,
                               SnapdProgressCallback progress_callback,
                               gpointer progress_callback_data,
                               GCancellable *cancellable,
                               GError **error);

Disable an installed snap.

#### Parameters

client | a SnapdClient. |
name | name of snap to disable. |
progress_callback | function to callback with progress. | [allow-none][scope call]
progress_callback_data | user data to pass to `progress_callback` . | [closure]
cancellable | a GCancellable or `NULL`. | [allow-none]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

`TRUE` on success or `FALSE` on error.

Since: 1.0

### snapd_client_disable_async ()

    void
    snapd_client_disable_async (SnapdClient *client,
                                const gchar *name,
                                SnapdProgressCallback progress_callback,
                                gpointer progress_callback_data,
                                GCancellable *cancellable,
                                GAsyncReadyCallback callback,
                                gpointer user_data);

Asynchronously disable an installed snap. See `snapd_client_disable_sync()` for more information.

#### Parameters

client | a SnapdClient. |
name | name of snap to disable. |
progress_callback | function to callback with progress. | [allow-none][scope call]
progress_callback_data | user data to pass to `progress_callback` . | [closure]
cancellable | a GCancellable or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when the request is satisfied. | [scope async]
user_data | the data to pass to callback function. | [closure]

Since: 1.0

### snapd_client_disable_finish ()

    gboolean
    snapd_client_disable_finish (SnapdClient *client,
                                 GAsyncResult *result,
                                 GError **error);

Complete request started with `snapd_client_disable_async()`. See `snapd_client_disable_sync()` for more information.

#### Parameters

client | a SnapdClient. |
result | a GAsyncResult. |
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

`TRUE` on success or `FALSE` on error.

Since: 1.0

### snapd_client_switch_sync ()

    gboolean
    snapd_client_switch_sync (SnapdClient *client,
                              const gchar *name,
                              const gchar *channel,
                              SnapdProgressCallback progress_callback,
                              gpointer progress_callback_data,
                              GCancellable *cancellable,
                              GError **error);

Set the tracking channel on an installed snap.

#### Parameters

client | a SnapdClient. |
name | name of snap to switch channel. |
channel | channel to track. |
progress_callback | function to callback with progress. | [allow-none][scope call]
progress_callback_data | user data to pass to `progress_callback` . | [closure]
cancellable | a GCancellable or `NULL`. | [allow-none]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

`TRUE` on success or `FALSE` on error.

Since: 1.26

### snapd_client_switch_async ()

    void
    snapd_client_switch_async (SnapdClient *client,
                               const gchar *name,
                               const gchar *channel,
                               SnapdProgressCallback progress_callback,
                               gpointer progress_callback_data,
                               GCancellable *cancellable,
                               GAsyncReadyCallback callback,
                               gpointer user_data);

Asynchronously set the tracking channel on an installed snap. See `snapd_client_switch_sync()` for more information.

#### Parameters

client | a SnapdClient. |
name | name of snap to switch channel. |
channel | channel to track. |
progress_callback | function to callback with progress. | [allow-none][scope call]
progress_callback_data | user data to pass to `progress_callback` . | [closure]
cancellable | a GCancellable or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when the request is satisfied. | [scope async]
user_data | the data to pass to callback function. | [closure]

Since: 1.26

### snapd_client_switch_finish ()

    gboolean
    snapd_client_switch_finish (SnapdClient *client,
                                GAsyncResult *result,
                                GError **error);

Complete request started with `snapd_client_switch_async()`. See `snapd_client_switch_sync()` for more information.

#### Parameters

client | a SnapdClient. |
result | a GAsyncResult. |
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

`TRUE` on success or `FALSE` on error.

Since: 1.26

### snapd_client_check_buy_sync ()

    gboolean
    snapd_client_check_buy_sync (SnapdClient *client,
                                 GCancellable *cancellable,
                                 GError **error);

Check if able to buy snaps.

#### Parameters

client | a SnapdClient. |
cancellable | a GCancellable or `NULL`. | [allow-none]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

`TRUE` if able to buy snaps or `FALSE` on error.

Since: 1.3

### snapd_client_check_buy_async ()

    void
    snapd_client_check_buy_async (SnapdClient *client,
                                  GCancellable *cancellable,
                                  GAsyncReadyCallback callback,
                                  gpointer user_data);

Asynchronously check if able to buy snaps. See `snapd_client_check_buy_sync()` for more information.

#### Parameters

client | a SnapdClient. |
cancellable | a GCancellable or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when the request is satisfied. | [scope async]
user_data | the data to pass to callback function. | [closure]

Since: 1.3

### snapd_client_check_buy_finish ()

    gboolean
    snapd_client_check_buy_finish (SnapdClient *client,
                                   GAsyncResult *result,
                                   GError **error);

Complete request started with `snapd_client_check_buy_async()`. See `snapd_client_check_buy_sync()` for more information.

#### Parameters

client | a SnapdClient. |
result | a GAsyncResult. |
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

`TRUE` on success or `FALSE` on error.

Since: 1.3

### snapd_client_buy_sync ()

    gboolean
    snapd_client_buy_sync (SnapdClient *client,
                           const gchar *id,
                           gdouble amount,
                           const gchar *currency,
                           GCancellable *cancellable,
                           GError **error);

Buy a snap from the store. Once purchased, this snap can be installed with `snapd_client_install2_sync()`.

#### Parameters

client | a SnapdClient. |
id | id of snap to buy. |
amount | amount of currency to spend, e.g. 0.99. |
currency | the currency to buy with as an ISO 4217 currency code, e.g. "NZD". |
cancellable | a GCancellable or `NULL`. | [allow-none]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

`TRUE` on success or `FALSE` on error.

Since: 1.3

### snapd_client_buy_async ()

    void
    snapd_client_buy_async (SnapdClient *client,
                            const gchar *id,
                            gdouble amount,
                            const gchar *currency,
                            GCancellable *cancellable,
                            GAsyncReadyCallback callback,
                            gpointer user_data);

Asynchronously buy a snap from the store. See `snapd_client_buy_sync()` for more information.

#### Parameters

client | a SnapdClient. |
id | id of snap to buy. |
amount | amount of currency to spend, e.g. 0.99. |
currency | the currency to buy with as an ISO 4217 currency code, e.g. "NZD". |
cancellable | a GCancellable or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when the request is satisfied. | [scope async]
user_data | the data to pass to callback function. | [closure]

Since: 1.3

### snapd_client_buy_finish ()

    gboolean
    snapd_client_buy_finish (SnapdClient *client,
                             GAsyncResult *result,
                             GError **error);

Complete request started with `snapd_client_buy_async()`. See `snapd_client_buy_sync()` for more information.

#### Parameters

client | a SnapdClient. |
result | a GAsyncResult. |
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

`TRUE` on success or `FALSE` on error.

Since: 1.3

### snapd_client_create_user_sync ()

    SnapdUserInformation *
    snapd_client_create_user_sync (SnapdClient *client,
                                   const gchar *email,
                                   SnapdCreateUserFlags flags,
                                   GCancellable *cancellable,
                                   GError **error);

Create a local user account for the given user.

#### Parameters

client | a SnapdClient. |
email | the email of the user to create. |
flags | a set of SnapdCreateUserFlags to control how the user account is created. |
cancellable | a GCancellable or `NULL`. | [allow-none]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

a SnapdUserInformation or `NULL` on error.

[transfer full]

Since: 1.3

### snapd_client_create_user_async ()

    void
    snapd_client_create_user_async (SnapdClient *client,
                                    const gchar *email,
                                    SnapdCreateUserFlags flags,
                                    GCancellable *cancellable,
                                    GAsyncReadyCallback callback,
                                    gpointer user_data);

Asynchronously create a local user account. See `snapd_client_create_user_sync()` for more information.

#### Parameters

client | a SnapdClient. |
email | the email of the user to create. |
flags | a set of SnapdCreateUserFlags to control how the user account is created. |
cancellable | a GCancellable or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when the request is satisfied. | [scope async]
user_data | the data to pass to callback function. | [closure]

Since: 1.3

### snapd_client_create_user_finish ()

    SnapdUserInformation *
    snapd_client_create_user_finish (SnapdClient *client,
                                     GAsyncResult *result,
                                     GError **error);

Complete request started with `snapd_client_create_user_async()`. See `snapd_client_create_user_sync()` for more information.

#### Parameters

client | a SnapdClient. |
result | a GAsyncResult. |
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

a SnapdUserInformation or `NULL` on error.

[transfer full]

Since: 1.3

### snapd_client_create_users_sync ()

    GPtrArray *
    snapd_client_create_users_sync (SnapdClient *client,
                                    GCancellable *cancellable,
                                    GError **error);

Create local user accounts using the system-user assertions that are valid for this device.

#### Parameters

client | a SnapdClient. |
cancellable | a GCancellable or `NULL`. | [allow-none]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

an array of SnapdUserInformation or `NULL` on error.

[transfer container][element-type SnapdUserInformation]

Since: 1.3

### snapd_client_create_users_async ()

    void
    snapd_client_create_users_async (SnapdClient *client,
                                     GCancellable *cancellable,
                                     GAsyncReadyCallback callback,
                                     gpointer user_data);

Asynchronously create local user accounts using the system-user assertions that are valid for this device. See `snapd_client_create_users_sync()` for more information.

#### Parameters

client | a SnapdClient. |
cancellable | a GCancellable or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when the request is satisfied. | [scope async]
user_data | the data to pass to callback function. | [closure]

Since: 1.3

### snapd_client_create_users_finish ()

    GPtrArray *
    snapd_client_create_users_finish (SnapdClient *client,
                                      GAsyncResult *result,
                                      GError **error);

Complete request started with `snapd_client_create_users_async()`. See `snapd_client_create_users_sync()` for more information.

#### Parameters

client | a SnapdClient. |
result | a GAsyncResult. |
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

an array of SnapdUserInformation or `NULL` on error.

[transfer container][element-type SnapdUserInformation]

Since: 1.3

### snapd_client_get_users_sync ()

    GPtrArray *
    snapd_client_get_users_sync (SnapdClient *client,
                                 GCancellable *cancellable,
                                 GError **error);

Get user accounts that are valid for this device.

#### Parameters

client | a SnapdClient. |
cancellable | a GCancellable or `NULL`. | [allow-none]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

an array of SnapdUserInformation or `NULL` on error.

[transfer container][element-type SnapdUserInformation]

Since: 1.26

### snapd_client_get_users_async ()

    void
    snapd_client_get_users_async (SnapdClient *client,
                                  GCancellable *cancellable,
                                  GAsyncReadyCallback callback,
                                  gpointer user_data);

Asynchronously get user accounts that are valid for this device. See `snapd_client_get_users_sync()` for more information.

#### Parameters

client | a SnapdClient. |
cancellable | a GCancellable or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when the request is satisfied. | [scope async]
user_data | the data to pass to callback function. | [closure]

Since: 1.26

### snapd_client_get_users_finish ()

    GPtrArray *
    snapd_client_get_users_finish (SnapdClient *client,
                                   GAsyncResult *result,
                                   GError **error);

Complete request started with `snapd_client_get_users_async()`. See `snapd_client_get_users_sync()` for more information.

#### Parameters

client | a SnapdClient. |
result | a GAsyncResult. |
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

an array of SnapdUserInformation or `NULL` on error.

[transfer container][element-type SnapdUserInformation]

Since: 1.26

### snapd_client_get_sections_sync ()

    GStrv
    snapd_client_get_sections_sync (SnapdClient *client,
                                    GCancellable *cancellable,
                                    GError **error);

Get the store sections.

#### Parameters

client | a SnapdClient. |
cancellable | a GCancellable or `NULL`. | [allow-none]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

an array of section names or `NULL` on error.

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

Since: 1.7

### snapd_client_get_sections_async ()

    void
    snapd_client_get_sections_async (SnapdClient *client,
                                     GCancellable *cancellable,
                                     GAsyncReadyCallback callback,
                                     gpointer user_data);

Asynchronously get the store sections. See `snapd_client_get_sections_sync()` for more information.

#### Parameters

client | a SnapdClient. |
cancellable | a GCancellable or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when the request is satisfied. | [scope async]
user_data | the data to pass to callback function. | [closure]

Since: 1.7

### snapd_client_get_sections_finish ()

    GStrv
    snapd_client_get_sections_finish (SnapdClient *client,
                                      GAsyncResult *result,
                                      GError **error);

Complete request started with `snapd_client_get_sections_async()`. See `snapd_client_get_sections_sync()` for more information.

#### Parameters

client | a SnapdClient. |
result | a GAsyncResult. |
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

an array of section names or `NULL` on error.

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

Since: 1.7

### snapd_client_get_aliases_async ()

    void
    snapd_client_get_aliases_async (SnapdClient *client,
                                    GCancellable *cancellable,
                                    GAsyncReadyCallback callback,
                                    gpointer user_data);

Asynchronously get the available aliases. See `snapd_client_get_aliases_sync()` for more information.

#### Parameters

client | a SnapdClient. |
cancellable | a GCancellable or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when the request is satisfied. | [scope async]
user_data | the data to pass to callback function. | [closure]

Since: 1.8

### snapd_client_get_aliases_finish ()

    GPtrArray *
    snapd_client_get_aliases_finish (SnapdClient *client,
                                     GAsyncResult *result,
                                     GError **error);

Complete request started with `snapd_client_get_aliases_async()`. See `snapd_client_get_aliases_sync()` for more information.

#### Parameters

client | a SnapdClient. |
result | a GAsyncResult. |
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

an array of SnapdAlias or `NULL` on error.

[transfer container][element-type SnapdAlias]

Since: 1.8

### snapd_client_get_aliases_sync ()

    GPtrArray *
    snapd_client_get_aliases_sync (SnapdClient *client,
                                   GCancellable *cancellable,
                                   GError **error);

Get the available aliases.

#### Parameters

client | a SnapdClient. |
cancellable | a GCancellable or `NULL`. | [allow-none]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

an array of SnapdAlias or `NULL` on error.

[transfer container][element-type SnapdAlias]

Since: 1.8

### snapd_client_alias_async ()

    void
    snapd_client_alias_async (SnapdClient *client,
                              const gchar *snap,
                              const gchar *app,
                              const gchar *alias,
                              SnapdProgressCallback progress_callback,
                              gpointer progress_callback_data,
                              GCancellable *cancellable,
                              GAsyncReadyCallback callback,
                              gpointer user_data);

Asynchronously create an alias to an app. See `snapd_client_alias_sync()` for more information.

#### Parameters

client | a SnapdClient. |
snap | the name of the snap to modify. |
app | an app in the snap to make the alias to. |
alias | the name of the alias (i.e. the command that will run this app). |
progress_callback | function to callback with progress. | [allow-none][scope call]
progress_callback_data | user data to pass to `progress_callback` . | [closure]
cancellable | a GCancellable or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when the request is satisfied. | [scope async]
user_data | the data to pass to callback function. | [closure]

Since: 1.25

### snapd_client_alias_finish ()

    gboolean
    snapd_client_alias_finish (SnapdClient *client,
                               GAsyncResult *result,
                               GError **error);

Complete request started with `snapd_client_alias_async()`. See `snapd_client_alias_sync()` for more information.

#### Parameters

client | a SnapdClient. |
result | a GAsyncResult. |
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

`TRUE` on success or `FALSE` on error.

Since: 1.25

### snapd_client_alias_sync ()

    gboolean
    snapd_client_alias_sync (SnapdClient *client,
                             const gchar *snap,
                             const gchar *app,
                             const gchar *alias,
                             SnapdProgressCallback progress_callback,
                             gpointer progress_callback_data,
                             GCancellable *cancellable,
                             GError **error);

Create an alias to an app.

#### Parameters

client | a SnapdClient. |
snap | the name of the snap to modify. |
app | an app in the snap to make the alias to. |
alias | the name of the alias (i.e. the command that will run this app). |
progress_callback | function to callback with progress. | [allow-none][scope call]
progress_callback_data | user data to pass to `progress_callback` . | [closure]
cancellable | a GCancellable or `NULL`. | [allow-none]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

Since: 1.25

### snapd_client_unalias_async ()

    void
    snapd_client_unalias_async (SnapdClient *client,
                                const gchar *snap,
                                const gchar *alias,
                                SnapdProgressCallback progress_callback,
                                gpointer progress_callback_data,
                                GCancellable *cancellable,
                                GAsyncReadyCallback callback,
                                gpointer user_data);

Asynchronously remove an alias from an app. See `snapd_client_unalias_sync()` for more information.

#### Parameters

client | a SnapdClient. |
snap | the name of the snap to modify or `NULL`. | [allow-none]
alias | the name of the alias to remove or `NULL` to remove all aliases for the given snap. | [allow-none]
progress_callback | function to callback with progress. | [allow-none][scope call]
progress_callback_data | user data to pass to `progress_callback` . | [closure]
cancellable | a GCancellable or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when the request is satisfied. | [scope async]
user_data | the data to pass to callback function. | [closure]

Since: 1.25

### snapd_client_unalias_finish ()

    gboolean
    snapd_client_unalias_finish (SnapdClient *client,
                                 GAsyncResult *result,
                                 GError **error);

Complete request started with `snapd_client_unalias_async()`. See `snapd_client_unalias_sync()` for more information.

#### Parameters

client | a SnapdClient. |
result | a GAsyncResult. |
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

`TRUE` on success or `FALSE` on error.

Since: 1.25

### snapd_client_unalias_sync ()

    gboolean
    snapd_client_unalias_sync (SnapdClient *client,
                               const gchar *snap,
                               const gchar *alias,
                               SnapdProgressCallback progress_callback,
                               gpointer progress_callback_data,
                               GCancellable *cancellable,
                               GError **error);

Remove an alias from an app.

#### Parameters

client | a SnapdClient. |
snap | the name of the snap to modify or `NULL`. | [allow-none]
alias | the name of the alias to remove or `NULL` to remove all aliases for the given snap. | [allow-none]
progress_callback | function to callback with progress. | [allow-none][scope call]
progress_callback_data | user data to pass to `progress_callback` . | [closure]
cancellable | a GCancellable or `NULL`. | [allow-none]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

Since: 1.25

### snapd_client_prefer_async ()

    void
    snapd_client_prefer_async (SnapdClient *client,
                               const gchar *snap,
                               SnapdProgressCallback progress_callback,
                               gpointer progress_callback_data,
                               GCancellable *cancellable,
                               GAsyncReadyCallback callback,
                               gpointer user_data);

Asynchronously ???. See `snapd_client_prefer_sync()` for more information.

#### Parameters

client | a SnapdClient. |
snap | the name of the snap to modify. |
progress_callback | function to callback with progress. | [allow-none][scope call]
progress_callback_data | user data to pass to `progress_callback` . | [closure]
cancellable | a GCancellable or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when the request is satisfied. | [scope async]
user_data | the data to pass to callback function. | [closure]

Since: 1.25

### snapd_client_prefer_finish ()

    gboolean
    snapd_client_prefer_finish (SnapdClient *client,
                                GAsyncResult *result,
                                GError **error);

Complete request started with `snapd_client_prefer_async()`. See `snapd_client_prefer_sync()` for more information.

#### Parameters

client | a SnapdClient. |
result | a GAsyncResult. |
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

`TRUE` on success or `FALSE` on error.

Since: 1.25

### snapd_client_prefer_sync ()

    gboolean
    snapd_client_prefer_sync (SnapdClient *client,
                              const gchar *snap,
                              SnapdProgressCallback progress_callback,
                              gpointer progress_callback_data,
                              GCancellable *cancellable,
                              GError **error);

???

#### Parameters

client | a SnapdClient. |
snap | the name of the snap to modify. |
progress_callback | function to callback with progress. | [allow-none][scope call]
progress_callback_data | user data to pass to `progress_callback` . | [closure]
cancellable | a GCancellable or `NULL`. | [allow-none]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

Since: 1.25

### snapd_client_enable_aliases_async ()

    void
    snapd_client_enable_aliases_async (SnapdClient *client,
                                       const gchar *snap,
                                       GStrv aliases,
                                       SnapdProgressCallback progress_callback,
                                       gpointer progress_callback_data,
                                       GCancellable *cancellable,
                                       GAsyncReadyCallback callback,
                                       gpointer user_data);

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

Use `snapd_client_alias_async()`

Asynchronously change the state of aliases. See `snapd_client_enable_aliases_sync()` for more information.

#### Parameters

client | a SnapdClient. |
snap | the name of the snap to modify. |
aliases | the aliases to modify. |
progress_callback | function to callback with progress. | [allow-none][scope call]
progress_callback_data | user data to pass to `progress_callback` . | [closure]
cancellable | a GCancellable or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when the request is satisfied. | [scope async]
user_data | the data to pass to callback function. | [closure]

Since: 1.8

### snapd_client_enable_aliases_finish ()

    gboolean
    snapd_client_enable_aliases_finish (SnapdClient *client,
                                        GAsyncResult *result,
                                        GError **error);

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

Use `snapd_client_unalias_finish()`

Complete request started with `snapd_client_enable_aliases_async()`. See `snapd_client_enable_aliases_sync()` for more information.

#### Parameters

client | a SnapdClient. |
result | a GAsyncResult. |
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

`TRUE` on success or `FALSE` on error.

Since: 1.8

### snapd_client_enable_aliases_sync ()

    gboolean
    snapd_client_enable_aliases_sync (SnapdClient *client,
                                      const gchar *snap,
                                      GStrv aliases,
                                      SnapdProgressCallback progress_callback,
                                      gpointer progress_callback_data,
                                      GCancellable *cancellable,
                                      GError **error);

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

Use `snapd_client_alias_sync()`

Change the state of aliases.

#### Parameters

client | a SnapdClient. |
snap | the name of the snap to modify. |
aliases | the aliases to modify. |
progress_callback | function to callback with progress. | [allow-none][scope call]
progress_callback_data | user data to pass to `progress_callback` . | [closure]
cancellable | a GCancellable or `NULL`. | [allow-none]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

`TRUE` on success or `FALSE` on error.

Since: 1.8

### snapd_client_disable_aliases_async ()

    void
    snapd_client_disable_aliases_async (SnapdClient *client,
                                        const gchar *snap,
                                        GStrv aliases,
                                        SnapdProgressCallback progress_callback,
                                        gpointer progress_callback_data,
                                        GCancellable *cancellable,
                                        GAsyncReadyCallback callback,
                                        gpointer user_data);

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

Use `snapd_client_unalias_async()`

Asynchronously change the state of aliases. See `snapd_client_disable_aliases_sync()` for more information.

#### Parameters

client | a SnapdClient. |
snap | the name of the snap to modify. |
aliases | the aliases to modify. |
progress_callback | function to callback with progress. | [allow-none][scope call]
progress_callback_data | user data to pass to `progress_callback` . | [closure]
cancellable | a GCancellable or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when the request is satisfied. | [scope async]
user_data | the data to pass to callback function. | [closure]

Since: 1.8

### snapd_client_disable_aliases_finish ()

    gboolean
    snapd_client_disable_aliases_finish (SnapdClient *client,
                                         GAsyncResult *result,
                                         GError **error);

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

Use `snapd_client_unalias_finish()`

Complete request started with `snapd_client_disable_aliases_async()`. See `snapd_client_disable_aliases_sync()` for more information.

#### Parameters

client | a SnapdClient. |
result | a GAsyncResult. |
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

`TRUE` on success or `FALSE` on error.

Since: 1.8

### snapd_client_disable_aliases_sync ()

    gboolean
    snapd_client_disable_aliases_sync (SnapdClient *client,
                                       const gchar *snap,
                                       GStrv aliases,
                                       SnapdProgressCallback progress_callback,
                                       gpointer progress_callback_data,
                                       GCancellable *cancellable,
                                       GError **error);

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

Use `snapd_client_unalias_sync()`

Change the state of aliases.

#### Parameters

client | a SnapdClient. |
snap | the name of the snap to modify. |
aliases | the aliases to modify. |
progress_callback | function to callback with progress. | [allow-none][scope call]
progress_callback_data | user data to pass to `progress_callback` . | [closure]
cancellable | a GCancellable or `NULL`. | [allow-none]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

`TRUE` on success or `FALSE` on error.

Since: 1.8

### snapd_client_reset_aliases_async ()

    void
    snapd_client_reset_aliases_async (SnapdClient *client,
                                      const gchar *snap,
                                      GStrv aliases,
                                      SnapdProgressCallback progress_callback,
                                      gpointer progress_callback_data,
                                      GCancellable *cancellable,
                                      GAsyncReadyCallback callback,
                                      gpointer user_data);

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

Use `snapd_client_disable_aliases_async()`

Asynchronously change the state of aliases. See `snapd_client_reset_aliases_sync()` for more information.

#### Parameters

client | a SnapdClient. |
snap | the name of the snap to modify. |
aliases | the aliases to modify. |
progress_callback | function to callback with progress. | [allow-none][scope call]
progress_callback_data | user data to pass to `progress_callback` . | [closure]
cancellable | a GCancellable or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when the request is satisfied. | [scope async]
user_data | the data to pass to callback function. | [closure]

Since: 1.8

### snapd_client_reset_aliases_finish ()

    gboolean
    snapd_client_reset_aliases_finish (SnapdClient *client,
                                       GAsyncResult *result,
                                       GError **error);

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

Use `snapd_client_disable_aliases_finish()`

Complete request started with `snapd_client_reset_aliases_async()`. See `snapd_client_reset_aliases_sync()` for more information.

#### Parameters

client | a SnapdClient. |
result | a GAsyncResult. |
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

`TRUE` on success or `FALSE` on error.

Since: 1.8

### snapd_client_reset_aliases_sync ()

    gboolean
    snapd_client_reset_aliases_sync (SnapdClient *client,
                                     const gchar *snap,
                                     GStrv aliases,
                                     SnapdProgressCallback progress_callback,
                                     gpointer progress_callback_data,
                                     GCancellable *cancellable,
                                     GError **error);

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

Use `snapd_client_disable_aliases_sync()`

Change the state of aliases.

#### Parameters

client | a SnapdClient. |
snap | the name of the snap to modify. |
aliases | the aliases to modify. |
progress_callback | function to callback with progress. | [allow-none][scope call]
progress_callback_data | user data to pass to `progress_callback` . | [closure]
cancellable | a GCancellable or `NULL`. | [allow-none]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

`TRUE` on success or `FALSE` on error.

Since: 1.8

### snapd_client_download_async ()

    void
    snapd_client_download_async (SnapdClient *client,
                                 const gchar *name,
                                 const gchar *channel,
                                 const gchar *revision,
                                 GCancellable *cancellable,
                                 GAsyncReadyCallback callback,
                                 gpointer user_data);

Asynchronously download a snap. See `snapd_client_download_sync()` for more information.

#### Parameters

client | a SnapdClient. |
name | name of snap to download. |
channel | channel to download from. | [allow-none]
revision | revision to download. | [allow-none]
cancellable | a GCancellable or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when the request is satisfied. | [scope async]
user_data | the data to pass to callback function. | [closure]

Since: 1.54

### snapd_client_download_finish ()

    GBytes *
    snapd_client_download_finish (SnapdClient *client,
                                  GAsyncResult *result,
                                  GError **error);

Complete request started with `snapd_client_download_async()`. See `snapd_client_download_sync()` for more information.

#### Parameters

client | a SnapdClient. |
result | a GAsyncResult. |
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

the snap contents or `NULL` on error.

Since: 1.54

### snapd_client_download_sync ()

    GBytes *
    snapd_client_download_sync (SnapdClient *client,
                                const gchar *name,
                                const gchar *channel,
                                const gchar *revision,
                                GCancellable *cancellable,
                                GError **error);

Download the given snap.

#### Parameters

client | a SnapdClient. |
name | name of snap to download. |
channel | channel to download from. | [allow-none]
revision | revision to download. | [allow-none]
cancellable | a GCancellable or `NULL`. | [allow-none]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

the snap contents or `NULL` on error.

Since: 1.54

### snapd_client_run_snapctl_async ()

    void
    snapd_client_run_snapctl_async (SnapdClient *client,
                                    const gchar *context_id,
                                    GStrv args,
                                    GCancellable *cancellable,
                                    GAsyncReadyCallback callback,
                                    gpointer user_data);

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

Use `snapd_client_run_snapctl2_async()`

Asynchronously run a snapctl command. See `snapd_client_run_snapctl_sync()` for more information.

#### Parameters

client | a SnapdClient. |
context_id | context for this call. |
args | the arguments to pass to snapctl. |
cancellable | a GCancellable or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when the request is satisfied. | [scope async]
user_data | the data to pass to callback function. | [closure]

Since: 1.8

### snapd_client_run_snapctl_finish ()

    gboolean
    snapd_client_run_snapctl_finish (SnapdClient *client,
                                     GAsyncResult *result,
                                     gchar **stdout_output,
                                     gchar **stderr_output,
                                     GError **error);

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

Use `snapd_client_run_snapctl2_finish()`

Complete request started with `snapd_client_run_snapctl_async()`. See `snapd_client_run_snapctl_sync()` for more information.

#### Parameters

client | a SnapdClient. |
result | a GAsyncResult. |
stdout_output | the location to write the stdout from the command or `NULL`. | [out][allow-none]
stderr_output | the location to write the stderr from the command or `NULL`. | [out][allow-none]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

`TRUE` on success or `FALSE` on error.

Since: 1.8

### snapd_client_run_snapctl_sync ()

    gboolean
    snapd_client_run_snapctl_sync (SnapdClient *client,
                                   const gchar *context_id,
                                   GStrv args,
                                   gchar **stdout_output,
                                   gchar **stderr_output,
                                   GCancellable *cancellable,
                                   GError **error);

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

Use `snapd_client_run_snapctl2_async()`

Run a snapctl command.

#### Parameters

client | a SnapdClient. |
context_id | context for this call. |
args | the arguments to pass to snapctl. |
stdout_output | the location to write the stdout from the command or `NULL`. | [out][allow-none]
stderr_output | the location to write the stderr from the command or `NULL`. | [out][allow-none]
cancellable | a GCancellable or `NULL`. | [allow-none]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

`TRUE` on success or `FALSE` on error.

Since: 1.8

### snapd_client_run_snapctl2_async ()

    void
    snapd_client_run_snapctl2_async (SnapdClient *client,
                                     const gchar *context_id,
                                     GStrv args,
                                     GCancellable *cancellable,
                                     GAsyncReadyCallback callback,
                                     gpointer user_data);

Asynchronously run a snapctl command. See `snapd_client_run_snapctl_sync()` for more information.

#### Parameters

client | a SnapdClient. |
context_id | context for this call. |
args | the arguments to pass to snapctl. |
cancellable | a GCancellable or `NULL`. | [allow-none]
callback | a GAsyncReadyCallback to call when the request is satisfied. | [scope async]
user_data | the data to pass to callback function. | [closure]

Since: 1.59

### snapd_client_run_snapctl2_finish ()

    gboolean
    snapd_client_run_snapctl2_finish (SnapdClient *client,
                                      GAsyncResult *result,
                                      gchar **stdout_output,
                                      gchar **stderr_output,
                                      int *exit_code,
                                      GError **error);

Complete request started with `snapd_client_run_snapctl2_async()`. See `snapd_client_run_snapctl2_sync()` for more information.

#### Parameters

client | a SnapdClient. |
result | a GAsyncResult. |
stdout_output | the location to write the stdout from the command or `NULL`. | [out][allow-none]
stderr_output | the location to write the stderr from the command or `NULL`. | [out][allow-none]
exit_code | the location to write the exit code of the command or `NULL`. | [out][allow-none]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

`TRUE` on success or `FALSE` on error.

Since: 1.59

### snapd_client_run_snapctl2_sync ()

    gboolean
    snapd_client_run_snapctl2_sync (SnapdClient *client,
                                    const gchar *context_id,
                                    GStrv args,
                                    gchar **stdout_output,
                                    gchar **stderr_output,
                                    int *exit_code,
                                    GCancellable *cancellable,
                                    GError **error);

Run a snapctl command.

#### Parameters

client | a SnapdClient. |
context_id | context for this call. |
args | the arguments to pass to snapctl. |
stdout_output | the location to write the stdout from the command or `NULL`. | [out][allow-none]
stderr_output | the location to write the stderr from the command or `NULL`. | [out][allow-none]
exit_code | the location to write the exit code of the command or `NULL`. | [out][allow-none]
cancellable | a GCancellable or `NULL`. | [allow-none]
error | GError location to store the error occurring, or `NULL` to ignore. | [allow-none]

#### Returns

`TRUE` on success or `FALSE` on error.

Since: 1.59

## Types and Values

### SnapdClient

    typedef struct _SnapdClient SnapdClient;

SnapdClient contains connection state with snapd.

Since: 1.0

### struct SnapdClientClass

    struct SnapdClientClass {
    };

Class structure for SnapdClient.

### enum SnapdChangeFilter

Filter to apply to changes.

#### Members

SNAPD_CHANGE_FILTER_ALL | Return all changes. |
SNAPD_CHANGE_FILTER_IN_PROGRESS | Return only changes that are in-progress. |
SNAPD_CHANGE_FILTER_READY | Return only changes that are ready. |

Since: 1.29

### enum SnapdGetSnapsFlags

Flag to change which snaps are returned.

#### Members

SNAPD_GET_SNAPS_FLAGS_NONE | No flags, default behaviour. |
SNAPD_GET_SNAPS_FLAGS_INCLUDE_INACTIVE | Return snaps that are installed but not active. |

Since: 1.42

### enum SnapdGetAppsFlags

Flag to change which apps are returned.

#### Members

SNAPD_GET_APPS_FLAGS_NONE | No flags, default behaviour. |
SNAPD_GET_APPS_FLAGS_SELECT_SERVICES | Select services only. |

Since: 1.25

### enum SnapdGetConnectionsFlags

Flag to change how connections are returned.

#### Members

SNAPD_GET_CONNECTIONS_FLAGS_NONE | No flags, default behaviour. |
SNAPD_GET_CONNECTIONS_FLAGS_SELECT_ALL | Select all connections, not just connected ones. |

Since: 1.49

### enum SnapdFindFlags

Flag to change how a find is performed.

#### Members

SNAPD_FIND_FLAGS_NONE | No flags, default behaviour. |
SNAPD_FIND_FLAGS_MATCH_NAME | Search for snaps whose name matches the given string. The match is exact unless the string ends in *. |
SNAPD_FIND_FLAGS_SELECT_PRIVATE | Search private snaps. |
SNAPD_FIND_FLAGS_SELECT_REFRESH | Deprecated, do not use. |
SNAPD_FIND_FLAGS_SCOPE_WIDE | Search for snaps from any architecture or branch. |
SNAPD_FIND_FLAGS_MATCH_COMMON_ID | Search for snaps whose common ID matches the given string. |

Since: 1.0

### enum SnapdInstallFlags

Flags to control install options.

#### Members

SNAPD_INSTALL_FLAGS_NONE | No flags, default behaviour. |
SNAPD_INSTALL_FLAGS_CLASSIC | Put snap in classic mode and disable security confinement. |
SNAPD_INSTALL_FLAGS_DANGEROUS | Install the given snap file even if there are no pre-acknowledged signatures for it, meaning it was not verified and could be dangerous (implied by SNAPD_INSTALL_FLAGS_DEVMODE). |
SNAPD_INSTALL_FLAGS_DEVMODE | Put snap in development mode and disable security confinement. |
SNAPD_INSTALL_FLAGS_JAILMODE | Put snap in enforced confinement mode. |

Since: 1.12

### enum SnapdRemoveFlags

Flags to control remove options.

#### Members

SNAPD_REMOVE_FLAGS_NONE | No flags, default behaviour. |
SNAPD_REMOVE_FLAGS_PURGE | Don't save a snapshot the snap's data when removing. |

Since: 1.50

### enum SnapdCreateUserFlags

Flag to control when a user accounts is created.

#### Members

SNAPD_CREATE_USER_FLAGS_NONE | No flags, default behaviour. |
SNAPD_CREATE_USER_FLAGS_SUDO | Gives sudo access to created user. |
SNAPD_CREATE_USER_FLAGS_KNOWN | Use the local system-user assertions to create the user. |

Since: 1.3

### enum SnapdGetInterfacesFlags

Flags to control how interface information is returned.

#### Members

SNAPD_GET_INTERFACES_FLAGS_NONE | No flags, default behaviour. |
SNAPD_GET_INTERFACES_FLAGS_INCLUDE_DOCS | Include interface documentation. |
SNAPD_GET_INTERFACES_FLAGS_INCLUDE_PLUGS | Include associated plugs. |
SNAPD_GET_INTERFACES_FLAGS_INCLUDE_SLOTS | Include associated slots. |
SNAPD_GET_INTERFACES_FLAGS_ONLY_CONNECTED | Only return connected interfaces. |

Since: 1.48

## Property Details

### The `“cancellable”` property

      “cancellable”              GCancellable *

Cancellable.

Owner: SnapdRequest

Flags: Write / Construct Only

### The `“ready-callback”` property

      “ready-callback”           gpointer

Ready callback.

Owner: SnapdRequest

Flags: Write / Construct Only

### The `“ready-callback-data”` property

      “ready-callback-data”      gpointer

Ready callback data.

Owner: SnapdRequest

Flags: Write / Construct Only

### The `“source-object”` property

      “source-object”            GObject *

Source object.

Owner: SnapdRequest

Flags: Write / Construct Only

### The `“change-api-path”` property

      “change-api-path”          char *

change-api-path.

Owner: SnapdRequestAsync

Flags: Write / Construct Only

Default value: NULL

### The `“progress-callback”` property

      “progress-callback”        gpointer

Progress callback.

Owner: SnapdRequestAsync

Flags: Write / Construct Only

### The `“progress-callback-data”` property

      “progress-callback-data”   gpointer

Data for progress callback.

Owner: SnapdRequestAsync

Flags: Write / Construct Only