:right-sidebar: True SystemPrompt =================================================================== .. currentmodule:: gi.repository.Gcr .. class:: SystemPrompt(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.GObject.Object` Implemented Interfaces: :class:`~gi.repository.Gcr.Prompt`, :class:`~gi.repository.Gio.AsyncInitable`, :class:`~gi.repository.Gio.Initable` :Constructors: :: SystemPrompt(**properties) Methods ------- .. rst-class:: interim-class .. class:: SystemPrompt :no-index: .. method:: close(cancellable: ~gi.repository.Gio.Cancellable | None = None) -> bool Close this prompt. After calling this function, no further prompts will succeed on this object. The prompt object is not unreferenced by this function, and you must unreference it once done. This call may block, use the :func:`~gi.repository.Gcr.SystemPrompt.close_async` to perform this action indefinitely. Whether or not this function returns :const:`True`, the system prompt object is still closed and may not be further used. :param cancellable: an optional cancellation object .. method:: close_async(cancellable: ~gi.repository.Gio.Cancellable | None = None, callback: ~typing.Callable[[...], None] | None = None, *user_data: ~typing.Any) -> None Close this prompt asynchronously. After calling this function, no further methods may be called on this object. The prompt object is not unreferenced by this function, and you must unreference it once done. This call returns immediately and completes asynchronously. :param cancellable: an optional cancellation object :param callback: called when the operation completes :param user_data: data to pass to the callback .. method:: close_finish(result: ~gi.repository.Gio.AsyncResult) -> bool Complete operation to close this prompt. Whether or not this function returns :const:`True`, the system prompt object is still closed and may not be further used. :param result: asynchronous operation result .. method:: error_get_domain() -> int .. method:: get_secret_exchange() -> ~gi.repository.Gcr.SecretExchange Get the current :obj:`~gi.repository.Gcr.SecretExchange` used to transfer secrets in this prompt. .. method:: open(timeout_seconds: int, cancellable: ~gi.repository.Gio.Cancellable | None = None) -> ~gi.repository.Gcr.SystemPrompt Opens a system prompt with the default prompter. Most system prompters only allow showing one prompt at a time, and if another prompt is shown then this method will block for up to ``timeout_seconds`` seconds. If ``timeout_seconds`` is equal to -1, then this will block indefinitely until the prompt can be opened. If ``timeout_seconds`` expires, then this function will fail with a :const:`~gi.repository.Gcr.SystemPromptError.SYSTEM_PROMPT_IN_PROGRESS` error. :param timeout_seconds: the number of seconds to wait to access the prompt, or -1 :param cancellable: optional cancellation object .. method:: open_async(timeout_seconds: int, cancellable: ~gi.repository.Gio.Cancellable | None = None, callback: ~typing.Callable[[...], None] | None = None, *user_data: ~typing.Any) -> None Asynchronously open a system prompt with the default system prompter. Most system prompters only allow showing one prompt at a time, and if another prompt is shown then this method will block for up to ``timeout_seconds`` seconds. If ``timeout_seconds`` is equal to -1, then this will block indefinitely until the prompt can be opened. If ``timeout_seconds`` expires, then this operation will fail with a :const:`~gi.repository.Gcr.SystemPromptError.SYSTEM_PROMPT_IN_PROGRESS` error. :param timeout_seconds: the number of seconds to wait to access the prompt, or -1 :param cancellable: optional cancellation object :param callback: called when the operation completes :param user_data: data to pass the callback .. method:: open_finish(result: ~gi.repository.Gio.AsyncResult) -> ~gi.repository.Gcr.SystemPrompt Complete an operation to asynchronously open a system prompt. :param result: the asynchronous result .. method:: open_for_prompter(prompter_name: str | None, timeout_seconds: int, cancellable: ~gi.repository.Gio.Cancellable | None = None) -> ~gi.repository.Gcr.SystemPrompt Opens a system prompt. If prompter_name is :const:`None`, then the default system prompter is used. Most system prompters only allow showing one prompt at a time, and if another prompt is shown then this method will block for up to ``timeout_seconds`` seconds. If ``timeout_seconds`` is equal to -1, then this will block indefinitely until the prompt can be opened. If ``timeout_seconds`` expires, then this function will fail with a :const:`~gi.repository.Gcr.SystemPromptError.SYSTEM_PROMPT_IN_PROGRESS` error. :param prompter_name: the prompter dbus name :param timeout_seconds: the number of seconds to wait to access the prompt, or -1 :param cancellable: optional cancellation object .. method:: open_for_prompter_async(prompter_name: str | None, timeout_seconds: int, cancellable: ~gi.repository.Gio.Cancellable | None = None, callback: ~typing.Callable[[...], None] | None = None, *user_data: ~typing.Any) -> None Opens a system prompt asynchronously. If prompter_name is :const:`None`, then the default system prompter is used. Most system prompters only allow showing one prompt at a time, and if another prompt is shown then this method will block for up to ``timeout_seconds`` seconds. If ``timeout_seconds`` is equal to -1, then this will block indefinitely until the prompt can be opened. If ``timeout_seconds`` expires, then this operation will fail with a :const:`~gi.repository.Gcr.SystemPromptError.SYSTEM_PROMPT_IN_PROGRESS` error. :param prompter_name: the prompter D-Bus name :param timeout_seconds: the number of seconds to wait to access the prompt, or -1 :param cancellable: optional cancellation object :param callback: called when the operation completes :param user_data: data to pass the callback Properties ---------- .. rst-class:: interim-class .. class:: SystemPrompt :no-index: .. attribute:: props.bus_name :type: str The DBus bus name of the prompter to use for prompting, or :const:`None` for the default prompter. .. attribute:: props.secret_exchange :type: ~gi.repository.Gcr.SecretExchange The :obj:`~gi.repository.Gcr.SecretExchange` to use when transferring passwords. A default secret exchange will be used if this is not set. .. attribute:: props.timeout_seconds :type: int The timeout in seconds to wait when opening the prompt. Fields ------ .. rst-class:: interim-class .. class:: SystemPrompt :no-index: .. attribute:: parent .. attribute:: pv