Functions¶
|
|
|
|
|
|
|
Details¶
- Snapd.error_quark()¶
- Returns:
a #GQuark.
- Return type:
Gets the Snapd Error Quark.
New in version 1.0.
- Snapd.login_async(username, password, otp, cancellable, callback, *user_data)¶
- Parameters:
username (
str
) – username to log in with.password (
str
) – password to log in with.otp (
str
orNone
) – response to one-time password challenge.cancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
orNone
.callback (
Gio.AsyncReadyCallback
orNone
) – aGio.AsyncReadyCallback
to call when the request is satisfied.user_data (
object
orNone
) – the data to pass to callback function.
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
) – aGio.AsyncResult
.- Raises:
- Returns:
a
Snapd.AuthData
orNone
on error.- Return type:
Complete login started with
Snapd.login_async
(). SeeSnapd.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:
username (
str
) – username to log in with.password (
str
) – password to log in with.otp (
str
orNone
) – response to one-time password challenge.cancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
orNone
.
- Raises:
- Returns:
a
Snapd.AuthData
orNone
on error.- Return type:
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
()