gio.tls_interaction
Module for [TlsInteraction] class
Types 3
[gio.tls_interaction.TlsInteraction] provides a mechanism for the TLS connection and database code to interact with the user. It can be used to ask the user for passwords.
To use a [gio.tls_interaction.TlsInteraction] with a TLS connection use [gio.tls_connection.TlsConnection.setInteraction].
Callers should instantiate a derived class that implements the various interaction methods to show the required dialogs.
Callers should use the 'invoke' functions like [gio.tls_interaction.TlsInteraction.invokeAskPassword] to run interaction methods. These functions make sure that the interaction is invoked in the main loop and not in the current thread, if the current thread is not running the main loop.
Derived classes can choose to implement whichever interactions methods they’d like to support by overriding those virtual methods in their class initialization function. Any interactions not implemented will return [gio.types.TlsInteractionResult.Unhandled]. If a derived class implements an async method, it must also implement the corresponding finish method.
TlsInteraction self()Returns `this`, for use in `with` statements.TlsInteractionGidBuilder builder()Get builder for [gio.tls_interaction.TlsInteraction] Returns: New builder objectgio.types.TlsInteractionResult askPassword(gio.tls_password.TlsPassword password, gio.cancellable.Cancellable cancellable = null)Run synchronous interaction to ask the user for a password. In general, [gio.tls_interaction.TlsInteraction.invokeAskPassword] should be used instead of this function.void askPasswordAsync(gio.tls_password.TlsPassword password, gio.cancellable.Cancellable cancellable = null, gio.types.AsyncReadyCallback callback = null)Run asynchronous interaction to ask the user for a password. In general, [gio.tls_interaction.TlsInteraction.invokeAskPassword] should be used instead of this function.gio.types.TlsInteractionResult askPasswordFinish(gio.async_result.AsyncResult result)Complete an ask password user interaction request. This should be once the [gio.tls_interaction.TlsInteraction.askPasswordAsync] completion callback is called.gio.types.TlsInteractionResult invokeAskPassword(gio.tls_password.TlsPassword password, gio.cancellable.Cancellable cancellable = null)Invoke the interaction to ask the user for a password. It invokes this interaction in the main loop, specifically the #GMainContext returned by [glib.main_context.MainContext.getThreadDefault] when...gio.types.TlsInteractionResult invokeRequestCertificate(gio.tls_connection.TlsConnection connection, gio.types.TlsCertificateRequestFlags flags, gio.cancellable.Cancellable cancellable = null)Invoke the interaction to ask the user to choose a certificate to use with the connection. It invokes this interaction in the main loop, specifically the #GMainContext returned by [glib.main_contex...gio.types.TlsInteractionResult requestCertificate(gio.tls_connection.TlsConnection connection, gio.types.TlsCertificateRequestFlags flags, gio.cancellable.Cancellable cancellable = null)Run synchronous interaction to ask the user to choose a certificate to use with the connection. In general, [gio.tls_interaction.TlsInteraction.invokeRequestCertificate] should be used instead of t...void requestCertificateAsync(gio.tls_connection.TlsConnection connection, gio.types.TlsCertificateRequestFlags flags, gio.cancellable.Cancellable cancellable = null, gio.types.AsyncReadyCallback callback = null)Run asynchronous interaction to ask the user for a certificate to use with the connection. In general, [gio.tls_interaction.TlsInteraction.invokeRequestCertificate] should be used instead of this f...gio.types.TlsInteractionResult requestCertificateFinish(gio.async_result.AsyncResult result)Complete a request certificate user interaction request. This should be once the [gio.tls_interaction.TlsInteraction.requestCertificateAsync] completion callback is called.Fluent builder for [gio.tls_interaction.TlsInteraction]