Top |
GCancellable * | cancellable | Write / Construct Only |
gpointer | ready-callback | Write / Construct Only |
gpointer | ready-callback-data | Write / Construct Only |
GObject * | source-object | Write / Construct Only |
gpointer | progress-callback | Write / Construct Only |
gpointer | progress-callback-data | Write / Construct Only |
SnapdClient | |
struct | SnapdClientClass |
enum | SnapdChangeFilter |
enum | SnapdGetSnapsFlags |
enum | SnapdGetAppsFlags |
enum | SnapdGetConnectionsFlags |
enum | SnapdFindFlags |
enum | SnapdInstallFlags |
enum | SnapdCreateUserFlags |
enum | SnapdGetInterfacesFlags |
GEnum ╰── SnapdChangeFilter GFlags ├── SnapdCreateUserFlags ├── SnapdFindFlags ├── SnapdGetAppsFlags ├── SnapdGetConnectionsFlags ├── SnapdGetInterfacesFlags ├── SnapdGetSnapsFlags ╰── SnapdInstallFlags 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 │ ├── SnapdPostLogin │ ├── SnapdPostSnapctl │ ├── SnapdPostAssertions │ ├── SnapdPostBuy │ ├── SnapdPostChange │ ├── SnapdPostCreateUser │ ├── SnapdPostCreateUsers │ ├── SnapdPostLogin │ ├── 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
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()
.
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_remove_sync()
,
snapd_client_enable_sync()
and
snapd_client_disable_sync()
.
client |
||
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
SnapdClient *
snapd_client_new (void
);
Create a new client to talk to snapd.
Since: 1.0
SnapdClient *
snapd_client_new_from_socket (GSocket *socket
);
Create a new client to talk on an existing socket.
Since: 1.5
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.
Since: 1.24
const gchar *
snapd_client_get_socket_path (SnapdClient *client
);
Get the unix socket path to connect to snapd with.
Since: 1.24
gboolean
snapd_client_get_allow_interaction (SnapdClient *client
);
Get whether snapd operations are allowed to interact with the user.
Since: 1.19
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.
Since: 1.19
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.
Since: 1.45
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.
client |
||
cancellable |
a GCancellable or |
[allow-none] |
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.0
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.
client |
||
cancellable |
a GCancellable or |
[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
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.
client |
||
result |
a GAsyncResult. |
|
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.3
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.
Log in to snapd and get authorization to install/remove snaps.
client |
a SnapdClient. |
|
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 |
[allow-none] |
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.0
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.
Asynchronously get authorization to install/remove snaps.
See snapd_client_login_sync()
for more information.
client |
a SnapdClient. |
|
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 |
[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
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.
Complete request started with snapd_client_login_async()
.
See snapd_client_login_sync()
for more information.
client |
a SnapdClient. |
|
result |
a GAsyncResult. |
|
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.0
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.
client |
a SnapdClient. |
|
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 |
[allow-none] |
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.26
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.
client |
a SnapdClient. |
|
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 |
[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
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.
client |
a SnapdClient. |
|
result |
a GAsyncResult. |
|
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.26
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".
Since: 1.16
const gchar *
snapd_client_get_user_agent (SnapdClient *client
);
Get the HTTP user-agent that is sent with each request to snapd.
Since: 1.16
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()
.
Since: 1.0
SnapdAuthData *
snapd_client_get_auth_data (SnapdClient *client
);
Get the authorization data that is used for requests.
Since: 1.0
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.
client |
a SnapdClient. |
|
filter |
changes to filter on. |
|
snap_name |
name of snap to filter on or |
[allow-none] |
cancellable |
a GCancellable or |
[allow-none] |
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.29
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.
client |
a SnapdClient. |
|
filter |
changes to filter on. |
|
snap_name |
name of snap to filter on or |
[allow-none] |
cancellable |
a GCancellable or |
[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
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.
client |
a SnapdClient. |
|
result |
a GAsyncResult. |
|
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.29
SnapdChange * snapd_client_get_change_sync (SnapdClient *client
,const gchar *id
,GCancellable *cancellable
,GError **error
);
Get information on a change.
client |
a SnapdClient. |
|
id |
a change ID to get information on. |
|
cancellable |
a GCancellable or |
[allow-none] |
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.29
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.
client |
a SnapdClient. |
|
id |
a change ID to get information on. |
|
cancellable |
a GCancellable or |
[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
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.
client |
a SnapdClient. |
|
result |
a GAsyncResult. |
|
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.29
SnapdChange * snapd_client_abort_change_sync (SnapdClient *client
,const gchar *id
,GCancellable *cancellable
,GError **error
);
Get information on a change.
client |
a SnapdClient. |
|
id |
a change ID to abort. |
|
cancellable |
a GCancellable or |
[allow-none] |
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.30
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.
client |
a SnapdClient. |
|
id |
a change ID to abort. |
|
cancellable |
a GCancellable or |
[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
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.
client |
a SnapdClient. |
|
result |
a GAsyncResult. |
|
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.30
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.
client |
a SnapdClient. |
|
cancellable |
a GCancellable or |
[allow-none] |
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.0
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.
client |
a SnapdClient. |
|
cancellable |
a GCancellable or |
[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
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.
client |
a SnapdClient. |
|
result |
a GAsyncResult. |
|
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.0
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.
Get information on all installed snaps.
client |
a SnapdClient. |
|
cancellable |
a GCancellable or |
[allow-none] |
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.0
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.
Asynchronously get information on all installed snaps.
See snapd_client_list_sync()
for more information.
client |
a SnapdClient. |
|
cancellable |
a GCancellable or |
[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
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.
Complete request started with snapd_client_list_async()
.
See snapd_client_list_sync()
for more information.
client |
a SnapdClient. |
|
result |
a GAsyncResult. |
|
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.0
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).
client |
a SnapdClient. |
|
flags |
a set of SnapdGetSnapsFlags to control what results are returned. |
|
names |
A list of snap names or |
[allow-none] |
cancellable |
a GCancellable or |
[allow-none] |
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.42
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.
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 |
[allow-none] |
cancellable |
a GCancellable or |
[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
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.
client |
a SnapdClient. |
|
result |
a GAsyncResult. |
|
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.42
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.
Get information of a single installed snap.
client |
a SnapdClient. |
|
name |
name of snap to get. |
|
cancellable |
a GCancellable or |
[allow-none] |
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.0
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.
Asynchronously get information of a single installed snap.
See snapd_client_list_one_sync()
for more information.
client |
a SnapdClient. |
|
name |
name of snap to get. |
|
cancellable |
a GCancellable or |
[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
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.
Complete request started with snapd_client_list_one_async()
.
See snapd_client_list_one_sync()
for more information.
client |
a SnapdClient. |
|
result |
a GAsyncResult. |
|
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.0
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.
client |
a SnapdClient. |
|
name |
name of snap to get. |
|
cancellable |
a GCancellable or |
[allow-none] |
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.42
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.
client |
a SnapdClient. |
|
name |
name of snap to get. |
|
cancellable |
a GCancellable or |
[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
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.
client |
a SnapdClient. |
|
result |
a GAsyncResult. |
|
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.42
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".
client |
a SnapdClient. |
|
name |
name of snap to get configuration from. |
|
keys |
keys to returns or |
[allow-none] |
cancellable |
a GCancellable or |
[allow-none] |
error |
GError location to store the error occurring, or |
[allow-none] |
a table of configuration values or NULL
on error.
[transfer full][element-type utf8 GVariant]
Since: 1.48
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.
client |
a SnapdClient. |
|
name |
name of snap to get configuration from. |
|
keys |
keys to returns or |
[allow-none] |
cancellable |
a GCancellable or |
[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
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.
client |
a SnapdClient. |
|
result |
a GAsyncResult. |
|
error |
GError location to store the error occurring, or |
[allow-none] |
a table of configuration values or NULL
on error.
[transfer full][element-type utf8 GVariant]
Since: 1.48
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".
client |
a SnapdClient. |
|
name |
name of snap to set configuration for. |
|
key_values |
Keys to set. |
[element-type utf8 GVariant] |
cancellable |
a GCancellable or |
[allow-none] |
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.48
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.
client |
a SnapdClient. |
|
name |
name of snap to set configuration for. |
|
key_values |
Keys to set. |
[element-type utf8 GVariant] |
cancellable |
a GCancellable or |
[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
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.
client |
a SnapdClient. |
|
result |
a GAsyncResult. |
|
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.48
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.
Get information on installed apps.
client |
a SnapdClient. |
|
flags |
a set of SnapdGetAppsFlags to control what results are returned. |
|
cancellable |
a GCancellable or |
[allow-none] |
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.25
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.
Asynchronously get information on installed apps.
See snapd_client_get_apps_sync()
for more information.
client |
a SnapdClient. |
|
flags |
a set of SnapdGetAppsFlags to control what results are returned. |
|
cancellable |
a GCancellable or |
[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
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.
Complete request started with snapd_client_get_apps_async()
.
See snapd_client_get_apps_sync()
for more information.
client |
a SnapdClient. |
|
result |
a GAsyncResult. |
|
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.25
GPtrArray * snapd_client_get_apps2_sync (SnapdClient *client
,SnapdGetAppsFlags flags
,GStrv snaps
,GCancellable *cancellable
,GError **error
);
Get information on installed apps.
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 |
[allow-none] |
cancellable |
a GCancellable or |
[allow-none] |
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.45
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.
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 |
[allow-none] |
cancellable |
a GCancellable or |
[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
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.
client |
a SnapdClient. |
|
result |
a GAsyncResult. |
|
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.45
SnapdIcon * snapd_client_get_icon_sync (SnapdClient *client
,const gchar *name
,GCancellable *cancellable
,GError **error
);
Get the icon for an installed snap.
client |
a SnapdClient. |
|
name |
name of snap to get icon for. |
|
cancellable |
a GCancellable or |
[allow-none] |
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.0
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.
client |
a SnapdClient. |
|
name |
name of snap to get icon for. |
|
cancellable |
a GCancellable or |
[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
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.
client |
a SnapdClient. |
|
result |
a GAsyncResult. |
|
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.0
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.
client |
a SnapdClient. |
|
type |
assertion type to get. |
|
cancellable |
a GCancellable or |
[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
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.
client |
a SnapdClient. |
|
result |
a GAsyncResult. |
|
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.8
GStrv snapd_client_get_assertions_sync (SnapdClient *client
,const gchar *type
,GCancellable *cancellable
,GError **error
);
Get assertions.
client |
a SnapdClient. |
|
type |
assertion type to get. |
|
cancellable |
a GCancellable or |
[allow-none] |
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.8
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.
client |
a SnapdClient. |
|
assertions |
assertions to add. |
|
cancellable |
a GCancellable or |
[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
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.
client |
a SnapdClient. |
|
result |
a GAsyncResult. |
|
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.8
gboolean snapd_client_add_assertions_sync (SnapdClient *client
,GStrv assertions
,GCancellable *cancellable
,GError **error
);
Add an assertion.
client |
a SnapdClient. |
|
assertions |
assertions to add. |
|
cancellable |
a GCancellable or |
[allow-none] |
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.8
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.
Get the installed snap interfaces.
client |
a SnapdClient. |
|
plugs |
[out][allow-none][transfer container][element-type SnapdPlug] | |
slots |
[out][allow-none][transfer container][element-type SnapdSlot] | |
cancellable |
a GCancellable or |
[allow-none] |
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.0
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.
Asynchronously get the installed snap interfaces.
See snapd_client_get_interfaces_sync()
for more information.
client |
a SnapdClient. |
|
cancellable |
a GCancellable or |
[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
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.
Complete request started with snapd_client_get_interfaces_async()
.
See snapd_client_get_interfaces_sync()
for more information.
client |
a SnapdClient. |
|
result |
a GAsyncResult. |
|
plugs |
[out][allow-none][transfer container][element-type SnapdPlug] | |
slots |
[out][allow-none][transfer container][element-type SnapdSlot] | |
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.0
GPtrArray * snapd_client_get_interfaces2_sync (SnapdClient *client
,SnapdGetInterfacesFlags flags
,GStrv names
,GCancellable *cancellable
,GError **error
);
Get information about the available snap interfaces.
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 |
[allow-none][array zero-terminated=1] |
cancellable |
a GCancellable or |
[allow-none] |
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.48
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.
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 |
[allow-none][array zero-terminated=1] |
cancellable |
a GCancellable or |
[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
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.
client |
a SnapdClient. |
|
result |
a GAsyncResult. |
|
error |
GError location to store the error occurring, or |
[allow-none] |
an array of SnapdInterface or NULL
on error.
[transfer container][element-type SnapdInterface]
Since: 1.48
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.
Get the installed snap connections.
client |
a SnapdClient. |
|
established |
the location to store the array of connections or |
[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 |
[out][allow-none][transfer container][element-type SnapdConnection] |
plugs |
[out][allow-none][transfer container][element-type SnapdPlug] | |
slots |
[out][allow-none][transfer container][element-type SnapdSlot] | |
cancellable |
a GCancellable or |
[allow-none] |
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.48
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.
Asynchronously get the installed snap connections.
See snapd_client_get_connections_sync()
for more information.
client |
a SnapdClient. |
|
cancellable |
a GCancellable or |
[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
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.
Complete request started with snapd_client_get_connections_async()
.
See snapd_client_get_connections_sync()
for more information.
client |
a SnapdClient. |
|
result |
a GAsyncResult. |
|
established |
the location to store the array of connections or |
[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 |
[out][allow-none][transfer container][element-type SnapdConnection] |
plugs |
[out][allow-none][transfer container][element-type SnapdPlug] | |
slots |
[out][allow-none][transfer container][element-type SnapdSlot] | |
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.48
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.
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 |
[allow-none] |
interface |
the name of the interface to get connections for or |
[allow-none] |
established |
the location to store the array of connections or |
[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 |
[out][allow-none][transfer container][element-type SnapdConnection] |
plugs |
[out][allow-none][transfer container][element-type SnapdPlug] | |
slots |
[out][allow-none][transfer container][element-type SnapdSlot] | |
cancellable |
a GCancellable or |
[allow-none] |
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.49
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.
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 |
[allow-none] |
interface |
the name of the interface to get connections for or |
[allow-none] |
cancellable |
a GCancellable or |
[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
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.
client |
a SnapdClient. |
|
result |
a GAsyncResult. |
|
established |
the location to store the array of connections or |
[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 |
[out][allow-none][transfer container][element-type SnapdConnection] |
plugs |
[out][allow-none][transfer container][element-type SnapdPlug] | |
slots |
[out][allow-none][transfer container][element-type SnapdSlot] | |
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.49
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()
.
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 |
[closure] |
cancellable |
a GCancellable or |
[allow-none] |
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.0
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.
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 |
[closure] |
cancellable |
a GCancellable or |
[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
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.
client |
a SnapdClient. |
|
result |
a GAsyncResult. |
|
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.0
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.
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 |
[closure] |
cancellable |
a GCancellable or |
[allow-none] |
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.0
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.
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 |
[closure] |
cancellable |
a GCancellable or |
[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
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.
client |
a SnapdClient. |
|
result |
a GAsyncResult. |
|
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.0
GPtrArray * snapd_client_find_sync (SnapdClient *client
,SnapdFindFlags flags
,const gchar *query
,gchar **suggested_currency
,GCancellable *cancellable
,GError **error
);
Find snaps in the store.
client |
a SnapdClient. |
|
flags |
a set of SnapdFindFlags to control how the find is performed. |
|
query |
query string to send. |
|
suggested_currency |
location to store the ISO 4217 currency that is suggested to purchase with. |
[out][allow-none] |
cancellable |
a GCancellable or |
[allow-none] |
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.0
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.
client |
a SnapdClient. |
|
flags |
a set of SnapdFindFlags to control how the find is performed. |
|
query |
query string to send. |
|
cancellable |
a GCancellable or |
[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
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.
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 |
[allow-none] |
Since: 1.0
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.
client |
a SnapdClient. |
|
flags |
a set of SnapdFindFlags to control how the find is performed. |
|
section |
store section to search in or |
[allow-none] |
query |
query string to send or |
[allow-none] |
cancellable |
a GCancellable or |
[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
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.
client |
a SnapdClient. |
|
flags |
a set of SnapdFindFlags to control how the find is performed. |
|
section |
store section to search in or |
[allow-none] |
query |
query string to send or |
[allow-none] |
suggested_currency |
location to store the ISO 4217 currency that is suggested to purchase with. |
[out][allow-none] |
cancellable |
a GCancellable or |
[allow-none] |
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.7
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.
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 |
[allow-none] |
Since: 1.7
GPtrArray * snapd_client_find_refreshable_sync (SnapdClient *client
,GCancellable *cancellable
,GError **error
);
Find snaps in store that are newer revisions than locally installed versions.
client |
a SnapdClient. |
|
cancellable |
a GCancellable or |
[allow-none] |
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.8
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.
client |
a SnapdClient. |
|
cancellable |
a GCancellable or |
[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
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.
client |
a SnapdClient. |
|
result |
a GAsyncResult. |
|
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.5
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.
Install a snap from the store.
client |
a SnapdClient. |
|
name |
name of snap to install. |
|
channel |
channel to install from or |
[allow-none] |
progress_callback |
function to callback with progress. |
[allow-none][scope call] |
progress_callback_data |
user data to pass to |
[closure] |
cancellable |
a GCancellable or |
[allow-none] |
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.0
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.
Asynchronously install a snap from the store.
See snapd_client_install_sync()
for more information.
client |
a SnapdClient. |
|
name |
name of snap to install. |
|
channel |
channel to install from or |
[allow-none] |
progress_callback |
function to callback with progress. |
[allow-none][scope call] |
progress_callback_data |
user data to pass to |
[closure] |
cancellable |
a GCancellable or |
[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
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.
Complete request started with snapd_client_install_async()
.
See snapd_client_install_sync()
for more information.
client |
a SnapdClient. |
|
result |
a GAsyncResult. |
|
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.0
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.
client |
a SnapdClient. |
|
flags |
a set of SnapdInstallFlags to control install options. |
|
name |
name of snap to install. |
|
channel |
channel to install from or |
[allow-none] |
revision |
revision to install or |
[allow-none] |
progress_callback |
function to callback with progress. |
[allow-none][scope call] |
progress_callback_data |
user data to pass to |
[closure] |
cancellable |
a GCancellable or |
[allow-none] |
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.12
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.
client |
a SnapdClient. |
|
flags |
a set of SnapdInstallFlags to control install options. |
|
name |
name of snap to install. |
|
channel |
channel to install from or |
[allow-none] |
revision |
revision to install or |
[allow-none] |
progress_callback |
function to callback with progress. |
[allow-none][scope call] |
progress_callback_data |
user data to pass to |
[closure] |
cancellable |
a GCancellable or |
[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
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.
client |
a SnapdClient. |
|
result |
a GAsyncResult. |
|
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.12
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.
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 |
[closure] |
cancellable |
a GCancellable or |
[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
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.
client |
a SnapdClient. |
|
result |
a GAsyncResult. |
|
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.9
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); \] |
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 |
[closure] |
cancellable |
a GCancellable or |
[allow-none] |
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.9
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.
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 |
[closure] |
cancellable |
a GCancellable or |
[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
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.
client |
a SnapdClient. |
|
result |
a GAsyncResult. |
|
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.9
gboolean snapd_client_try_sync (SnapdClient *client
,const gchar *path
,SnapdProgressCallback progress_callback
,gpointer progress_callback_data
,GCancellable *cancellable
,GError **error
);
Try a snap.
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 |
[closure] |
cancellable |
a GCancellable or |
[allow-none] |
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.9
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.
client |
a SnapdClient. |
|
name |
name of snap to refresh. |
|
channel |
channel to refresh from or |
[allow-none] |
progress_callback |
function to callback with progress. |
[allow-none][scope call] |
progress_callback_data |
user data to pass to |
[closure] |
cancellable |
a GCancellable or |
[allow-none] |
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.0
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.
client |
a SnapdClient. |
|
name |
name of snap to refresh. |
|
channel |
channel to refresh from or |
[allow-none] |
progress_callback |
function to callback with progress. |
[allow-none][scope call] |
progress_callback_data |
user data to pass to |
[closure] |
cancellable |
a GCancellable or |
[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
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.
client |
a SnapdClient. |
|
result |
a GAsyncResult. |
|
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.0
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.
client |
a SnapdClient. |
|
progress_callback |
function to callback with progress. |
[allow-none][scope call] |
progress_callback_data |
user data to pass to |
[closure] |
cancellable |
a GCancellable or |
[allow-none] |
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.5
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.
client |
a SnapdClient. |
|
progress_callback |
function to callback with progress. |
[allow-none][scope call] |
progress_callback_data |
user data to pass to |
[closure] |
cancellable |
a GCancellable or |
[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
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.
client |
a SnapdClient. |
|
result |
a GAsyncResult. |
|
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.5
gboolean snapd_client_remove_sync (SnapdClient *client
,const gchar *name
,SnapdProgressCallback progress_callback
,gpointer progress_callback_data
,GCancellable *cancellable
,GError **error
);
Uninstall a snap.
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 |
[closure] |
cancellable |
a GCancellable or |
[allow-none] |
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.0
void snapd_client_remove_async (SnapdClient *client
,const gchar *name
,SnapdProgressCallback progress_callback
,gpointer progress_callback_data
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously uninstall a snap.
See snapd_client_remove_sync()
for more information.
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 |
[closure] |
cancellable |
a GCancellable or |
[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
gboolean snapd_client_remove_finish (SnapdClient *client
,GAsyncResult *result
,GError **error
);
Complete request started with snapd_client_remove_async()
.
See snapd_client_remove_sync()
for more information.
client |
a SnapdClient. |
|
result |
a GAsyncResult. |
|
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.0
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.
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 |
[closure] |
cancellable |
a GCancellable or |
[allow-none] |
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.0
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.
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 |
[closure] |
cancellable |
a GCancellable or |
[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
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.
client |
a SnapdClient. |
|
result |
a GAsyncResult. |
|
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.0
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.
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 |
[closure] |
cancellable |
a GCancellable or |
[allow-none] |
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.0
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.
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 |
[closure] |
cancellable |
a GCancellable or |
[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
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.
client |
a SnapdClient. |
|
result |
a GAsyncResult. |
|
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.0
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.
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 |
[closure] |
cancellable |
a GCancellable or |
[allow-none] |
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.26
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.
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 |
[closure] |
cancellable |
a GCancellable or |
[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
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.
client |
a SnapdClient. |
|
result |
a GAsyncResult. |
|
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.26
gboolean snapd_client_check_buy_sync (SnapdClient *client
,GCancellable *cancellable
,GError **error
);
Check if able to buy snaps.
client |
a SnapdClient. |
|
cancellable |
a GCancellable or |
[allow-none] |
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.3
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.
client |
a SnapdClient. |
|
cancellable |
a GCancellable or |
[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
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.
client |
a SnapdClient. |
|
result |
a GAsyncResult. |
|
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.3
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()
.
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 |
[allow-none] |
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.3
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.
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 |
[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
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.
client |
a SnapdClient. |
|
result |
a GAsyncResult. |
|
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.3
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.
client |
a SnapdClient. |
|
the email of the user to create. |
||
flags |
a set of SnapdCreateUserFlags to control how the user account is created. |
|
cancellable |
a GCancellable or |
[allow-none] |
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.3
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.
client |
a SnapdClient. |
|
the email of the user to create. |
||
flags |
a set of SnapdCreateUserFlags to control how the user account is created. |
|
cancellable |
a GCancellable or |
[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
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.
client |
a SnapdClient. |
|
result |
a GAsyncResult. |
|
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.3
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.
client |
a SnapdClient. |
|
cancellable |
a GCancellable or |
[allow-none] |
error |
GError location to store the error occurring, or |
[allow-none] |
an array of SnapdUserInformation or NULL
on error.
[transfer container][element-type SnapdUserInformation]
Since: 1.3
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.
client |
a SnapdClient. |
|
cancellable |
a GCancellable or |
[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
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.
client |
a SnapdClient. |
|
result |
a GAsyncResult. |
|
error |
GError location to store the error occurring, or |
[allow-none] |
an array of SnapdUserInformation or NULL
on error.
[transfer container][element-type SnapdUserInformation]
Since: 1.3
GPtrArray * snapd_client_get_users_sync (SnapdClient *client
,GCancellable *cancellable
,GError **error
);
Get user accounts that are valid for this device.
client |
a SnapdClient. |
|
cancellable |
a GCancellable or |
[allow-none] |
error |
GError location to store the error occurring, or |
[allow-none] |
an array of SnapdUserInformation or NULL
on error.
[transfer container][element-type SnapdUserInformation]
Since: 1.26
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.
client |
a SnapdClient. |
|
cancellable |
a GCancellable or |
[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
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.
client |
a SnapdClient. |
|
result |
a GAsyncResult. |
|
error |
GError location to store the error occurring, or |
[allow-none] |
an array of SnapdUserInformation or NULL
on error.
[transfer container][element-type SnapdUserInformation]
Since: 1.26
GStrv snapd_client_get_sections_sync (SnapdClient *client
,GCancellable *cancellable
,GError **error
);
Get the store sections.
client |
a SnapdClient. |
|
cancellable |
a GCancellable or |
[allow-none] |
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.7
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.
client |
a SnapdClient. |
|
cancellable |
a GCancellable or |
[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
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.
client |
a SnapdClient. |
|
result |
a GAsyncResult. |
|
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.7
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.
client |
a SnapdClient. |
|
cancellable |
a GCancellable or |
[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
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.
client |
a SnapdClient. |
|
result |
a GAsyncResult. |
|
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.8
GPtrArray * snapd_client_get_aliases_sync (SnapdClient *client
,GCancellable *cancellable
,GError **error
);
Get the available aliases.
client |
a SnapdClient. |
|
cancellable |
a GCancellable or |
[allow-none] |
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.8
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.
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 |
[closure] |
cancellable |
a GCancellable or |
[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
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.
client |
a SnapdClient. |
|
result |
a GAsyncResult. |
|
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.25
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.
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 |
[closure] |
cancellable |
a GCancellable or |
[allow-none] |
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.25
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.
client |
a SnapdClient. |
|
snap |
the name of the snap to modify or |
[allow-none] |
alias |
the name of the alias to remove or |
[allow-none] |
progress_callback |
function to callback with progress. |
[allow-none][scope call] |
progress_callback_data |
user data to pass to |
[closure] |
cancellable |
a GCancellable or |
[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
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.
client |
a SnapdClient. |
|
result |
a GAsyncResult. |
|
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.25
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.
client |
a SnapdClient. |
|
snap |
the name of the snap to modify or |
[allow-none] |
alias |
the name of the alias to remove or |
[allow-none] |
progress_callback |
function to callback with progress. |
[allow-none][scope call] |
progress_callback_data |
user data to pass to |
[closure] |
cancellable |
a GCancellable or |
[allow-none] |
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.25
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.
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 |
[closure] |
cancellable |
a GCancellable or |
[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
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.
client |
a SnapdClient. |
|
result |
a GAsyncResult. |
|
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.25
gboolean snapd_client_prefer_sync (SnapdClient *client
,const gchar *snap
,SnapdProgressCallback progress_callback
,gpointer progress_callback_data
,GCancellable *cancellable
,GError **error
);
???
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 |
[closure] |
cancellable |
a GCancellable or |
[allow-none] |
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.25
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.
Asynchronously change the state of aliases.
See snapd_client_enable_aliases_sync()
for more information.
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 |
[closure] |
cancellable |
a GCancellable or |
[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
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.
Complete request started with snapd_client_enable_aliases_async()
.
See snapd_client_enable_aliases_sync()
for more information.
client |
a SnapdClient. |
|
result |
a GAsyncResult. |
|
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.8
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.
Change the state of aliases.
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 |
[closure] |
cancellable |
a GCancellable or |
[allow-none] |
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.8
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.
Asynchronously change the state of aliases.
See snapd_client_disable_aliases_sync()
for more information.
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 |
[closure] |
cancellable |
a GCancellable or |
[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
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.
Complete request started with snapd_client_disable_aliases_async()
.
See snapd_client_disable_aliases_sync()
for more information.
client |
a SnapdClient. |
|
result |
a GAsyncResult. |
|
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.8
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.
Change the state of aliases.
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 |
[closure] |
cancellable |
a GCancellable or |
[allow-none] |
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.8
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.
Asynchronously change the state of aliases.
See snapd_client_reset_aliases_sync()
for more information.
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 |
[closure] |
cancellable |
a GCancellable or |
[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
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.
Complete request started with snapd_client_reset_aliases_async()
.
See snapd_client_reset_aliases_sync()
for more information.
client |
a SnapdClient. |
|
result |
a GAsyncResult. |
|
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.8
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.
Change the state of aliases.
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 |
[closure] |
cancellable |
a GCancellable or |
[allow-none] |
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.8
void snapd_client_run_snapctl_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.
client |
a SnapdClient. |
|
context_id |
context for this call. |
|
args |
the arguments to pass to snapctl. |
|
cancellable |
a GCancellable or |
[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
gboolean snapd_client_run_snapctl_finish (SnapdClient *client
,GAsyncResult *result
,gchar **stdout_output
,gchar **stderr_output
,GError **error
);
Complete request started with snapd_client_run_snapctl_async()
.
See snapd_client_run_snapctl_sync()
for more information.
client |
a SnapdClient. |
|
result |
a GAsyncResult. |
|
stdout_output |
the location to write the stdout from the command or |
[out][allow-none] |
stderr_output |
the location to write the stderr from the command or |
[out][allow-none] |
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.8
gboolean snapd_client_run_snapctl_sync (SnapdClient *client
,const gchar *context_id
,GStrv args
,GStrv stdout_output
,GStrv stderr_output
,GCancellable *cancellable
,GError **error
);
Run a snapctl command.
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 |
[out][allow-none] |
stderr_output |
the location to write the stderr from the command or |
[out][allow-none] |
cancellable |
a GCancellable or |
[allow-none] |
error |
GError location to store the error occurring, or |
[allow-none] |
Since: 1.8
typedef struct _SnapdClient SnapdClient;
SnapdClient contains connection state with snapd.
Since: 1.0
Flag to change how a find is performed.
No flags, default behaviour. |
||
Search for snaps whose name matches the given string. The match is exact unless the string ends in *. |
||
Search private snaps. |
||
Deprecated, do not use. |
||
Search for snaps from any architecture or branch. |
||
Search for snaps whose common ID matches the given string. |
Since: 1.0
Flags to control install options.
No flags, default behaviour. |
||
Put snap in classic mode and disable security confinement. |
||
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). |
||
Put snap in development mode and disable security confinement. |
||
Put snap in enforced confinement mode. |
Since: 1.12
Flags to control how interface information is returned.
No flags, default behaviour. |
||
Include interface documentation. |
||
Include associated plugs. |
||
Include associated slots. |
||
Only return connected interfaces. |
Since: 1.48
“ready-callback”
property“ready-callback” gpointer
Ready callback.
Flags: Write / Construct Only
“ready-callback-data”
property“ready-callback-data” gpointer
Ready callback data.
Flags: Write / Construct Only
“progress-callback”
property“progress-callback” gpointer
Progress callback.
Flags: Write / Construct Only
“progress-callback-data”
property“progress-callback-data” gpointer
Data for progress callback.
Flags: Write / Construct Only