Secret.Prompt¶
- Subclasses:
None
Methods¶
- Inherited:
Gio.DBusProxy (25), GObject.Object (37), Gio.AsyncInitable (4), Gio.DBusInterface (3), Gio.Initable (2)
- Structs:
|
|
|
|
|
|
|
Virtual Methods¶
Properties¶
- Inherited:
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
|---|---|---|---|
parent_instance |
r |
Class Details¶
- class Secret.Prompt(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
A prompt in the Service
A proxy object representing a prompt that the Secret Service will display to the user.
Certain actions on the Secret Service require user prompting to complete, such as creating a collection, or unlocking a collection. When such a prompt is necessary, then a
Secret.Promptobject is created by this library, and passed to the [method`Service`.prompt] method. In this way it is handled automatically.In order to customize prompt handling, override the [vfunc`Service`.prompt_async] and [vfunc`Service`.prompt_finish] virtual methods of the [class`Service`] class.
- perform(window_id, return_type, cancellable, callback, *user_data)¶
- Parameters:
window_id (
strorNone) – string form of XWindow id for parent window to be transient forreturn_type (
GLib.VariantType) – the variant type of the prompt resultcancellable (
Gio.CancellableorNone) – optional cancellation objectcallback (
Gio.AsyncReadyCallbackorNone) – called when the operation completesuser_data (
objectorNone) – data to be passed to the callback
Runs a prompt and performs the prompting.
Returns
Trueif the prompt was completed and not dismissed.If window_id is non-null then it is used as an XWindow id on Linux. The API expects this id to be converted to a string using the
%dprintf format. The Secret Service can make its prompt transient for the window with this id. In some Secret Service implementations this is not possible, so the behavior depending on this should degrade gracefully.This method will return immediately and complete asynchronously.
- perform_finish(result)¶
- Parameters:
result (
Gio.AsyncResult) – the asynchronous result passed to the callback- Raises:
- Returns:
Noneif the prompt was dismissed or an error occurred, a variant result if the prompt was successful- Return type:
Complete asynchronous operation to run a prompt and perform the prompting.
Returns a variant result if the prompt was completed and not dismissed. The type of result depends on the action the prompt is completing, and is defined in the Secret Service DBus API specification.
- perform_sync(window_id, cancellable, return_type)¶
- Parameters:
window_id (
strorNone) – string form of XWindow id for parent window to be transient forcancellable (
Gio.CancellableorNone) – optional cancellation objectreturn_type (
GLib.VariantType) – the variant type of the prompt result
- Raises:
- Returns:
Noneif the prompt was dismissed or an error occurred- Return type:
Runs a prompt and performs the prompting.
Returns a variant result if the prompt was completed and not dismissed. The type of result depends on the action the prompt is completing, and is defined in the Secret Service DBus API specification.
If window_id is non-null then it is used as an XWindow id on Linux. The API expects this id to be converted to a string using the
%dprintf format. The Secret Service can make its prompt transient for the window with this id. In some Secret Service implementations this is not possible, so the behavior depending on this should degrade gracefully.This method may block indefinitely and should not be used in user interface threads.
- run(window_id, cancellable, return_type)¶
- Parameters:
window_id (
strorNone) – string form of XWindow id for parent window to be transient forcancellable (
Gio.CancellableorNone) – optional cancellation objectreturn_type (
GLib.VariantType) – the variant type of the prompt result
- Raises:
- Returns:
Noneif the prompt was dismissed or an error occurred- Return type:
Runs a prompt and performs the prompting.
Returns a variant result if the prompt was completed and not dismissed. The type of result depends on the action the prompt is completing, and is defined in the Secret Service DBus API specification.
If window_id is non-null then it is used as an XWindow id on Linux. The API expects this id to be converted to a string using the
%dprintf format. The Secret Service can make its prompt transient for the window with this id. In some Secret Service implementations this is not possible, so the behavior depending on this should degrade gracefully.This runs the dialog in a recursive mainloop. When run from a user interface thread, this means the user interface will remain responsive. Care should be taken that appropriate user interface actions are disabled while running the prompt.