Functions

error_quark ()

login_async (username, password, otp, cancellable, callback, *user_data)

login_finish (result)

login_sync (username, password, otp, cancellable)

Details

Snapd.error_quark()
Returns:

a #GQuark.

Return type:

int

Gets the Snapd Error Quark.

New in version 1.0.

Snapd.login_async(username, password, otp, cancellable, callback, *user_data)
Parameters:

Asynchronously get authorization to install/remove snaps. See Snapd.login_sync() for more information.

New in version 1.0.

Deprecated since version 1.34: Use Snapd.Client.login2_async()

Snapd.login_finish(result)
Parameters:

result (Gio.AsyncResult) – a Gio.AsyncResult.

Raises:

GLib.Error

Returns:

a Snapd.AuthData or None on error.

Return type:

Snapd.AuthData

Complete login started with Snapd.login_async(). See Snapd.login_sync() for more information.

New in version 1.0.

Deprecated since version 1.34: Use Snapd.Client.login2_finish()

Snapd.login_sync(username, password, otp, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

a Snapd.AuthData or None on error.

Return type:

Snapd.AuthData

This call used to contact a D-Bus service to perform snapd authentication using Polkit. This now just creates a Snapd.Client and does the call directly.

New in version 1.0.

Deprecated since version 1.34: Use Snapd.Client.login2_sync()