It derives from <GObject>.
<GTlsInteraction> 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 <GTlsInteraction> with a TLS
connection use tls-connection:set-interaction.
Callers should instantiate a derived class that implements the various interaction methods to show the required dialogs.
Callers should use the ’invoke’ functions like tls-interaction:invoke-ask-password 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 unhandled. If a derived class
implements an async method, it must also implement the corresponding
finish method.
Run synchronous interaction to ask the user for a password. In general,
tls-interaction:invoke-ask-password should be
used instead of this function.
Derived subclasses usually implement a password prompt, although they may also choose to provide a password from elsewhere. The password value will be filled in and then callback will be called. Alternatively the user may abort this password request, which will usually abort the TLS connection.
If the interaction is cancelled by the cancellation object, or by the
user then failed will be returned
with an error that contains a cancelled error
code. Certain implementations may not support immediate cancellation.
Passed: a <GTlsInteraction>.
a <GTlsInteraction> object
Passed: a <GTlsPassword>.
a <GTlsPassword> object
Passed, or left out: a <GCancellable>, or
#f.
an optional <GCancellable> cancellation object
Returned: a <GTlsInteractionResult>.
The status of the ask password interaction.
Run asynchronous interaction to ask the user for a password. In
general, tls-interaction:invoke-ask-password should be
used instead of this function.
Derived subclasses usually implement a password prompt, although they may also choose to provide a password from elsewhere. The password value will be filled in and then callback will be called. Alternatively the user may abort this password request, which will usually abort the TLS connection.
If the interaction is cancelled by the cancellation object, or by the
user then failed will be returned
with an error that contains a cancelled error
code. Certain implementations may not support immediate cancellation.
Certain implementations may not support immediate cancellation.
Passed: a <GTlsInteraction>.
a <GTlsInteraction> object
Passed: a <GTlsPassword>.
a <GTlsPassword> object
Passed, or left out: a <GCancellable>, or
#f.
an optional <GCancellable> cancellation object
Passed, or left out: a procedure, or #f.
will be called when the interaction completes
See GAsyncReadyCallback for how it is
called.
Not passed: guile-gi supplies it.
data to pass to the callback
Complete an ask password user interaction request. This should be once
the tls-interaction:ask-password-async completion
callback is called.
If handled is returned, then the
<GTlsPassword> passed to
tls-interaction:ask-password
will have its password filled in.
If the interaction is cancelled by the cancellation object, or by the
user then failed will be returned
with an error that contains a cancelled error
code.
Passed: a <GTlsInteraction>.
a <GTlsInteraction> object
Passed: a <GAsyncResult>.
the result passed to the callback
Returned: a <GTlsInteractionResult>.
The status of the ask password interaction.
Invoke the interaction to ask the user for a password. It invokes this
interaction in the main loop, specifically the
<GMainContext> returned by
main-context-get-thread-default
when the interaction is created. This is called by called by
<GTlsConnection> or
<GTlsDatabase> to ask the user for a password.
Derived subclasses usually implement a password prompt, although they may also choose to provide a password from elsewhere. The password value will be filled in and then callback will be called. Alternatively the user may abort this password request, which will usually abort the TLS connection.
The implementation can either be a synchronous (eg: modal dialog) or an asynchronous one (eg: modeless dialog). This function will take care of calling which ever one correctly.
If the interaction is cancelled by the cancellation object, or by the
user then failed will be returned
with an error that contains a cancelled error
code. Certain implementations may not support immediate cancellation.
Passed: a <GTlsInteraction>.
a <GTlsInteraction> object
Passed: a <GTlsPassword>.
a <GTlsPassword> object
Passed, or left out: a <GCancellable>, or
#f.
an optional <GCancellable> cancellation object
Returned: a <GTlsInteractionResult>.
The status of the ask password interaction.
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
main-context-get-thread-default
when the interaction is created. This is called by called by
<GTlsConnection> when the peer requests a
certificate during the handshake.
Derived subclasses usually implement a certificate selector, although they may also choose to provide a certificate from elsewhere. Alternatively the user may abort this certificate request, which may or may not abort the TLS connection.
The implementation can either be a synchronous (eg: modal dialog) or an asynchronous one (eg: modeless dialog). This function will take care of calling which ever one correctly.
If the interaction is cancelled by the cancellation object, or by the
user then failed will be returned
with an error that contains a cancelled error
code. Certain implementations may not support immediate cancellation.
Passed: a <GTlsInteraction>.
a <GTlsInteraction> object
Passed: a <GTlsConnection>.
a <GTlsConnection> object
Passed: a
<GTlsCertificateRequestFlags>,
or a list of its symbols, or one of them.
flags providing more information about the request
Passed, or left out: a <GCancellable>, or
#f.
an optional <GCancellable> cancellation object
Returned: a <GTlsInteractionResult>.
The status of the certificate request interaction.
Run synchronous interaction to ask the user to choose a certificate to
use with the connection. In general, tls-interaction:invoke-request-certificate
should be used instead of this function.
Derived subclasses usually implement a certificate selector, although they may also choose to provide a certificate from elsewhere. Alternatively the user may abort this certificate request, which will usually abort the TLS connection.
If handled is returned, then the
<GTlsConnection> passed to
tls-interaction:request-certificate will have had
its tls-connection:certificate filled in.
If the interaction is cancelled by the cancellation object, or by the
user then failed will be returned
with an error that contains a cancelled error
code. Certain implementations may not support immediate cancellation.
Passed: a <GTlsInteraction>.
a <GTlsInteraction> object
Passed: a <GTlsConnection>.
a <GTlsConnection> object
Passed: a
<GTlsCertificateRequestFlags>,
or a list of its symbols, or one of them.
flags providing more information about the request
Passed, or left out: a <GCancellable>, or
#f.
an optional <GCancellable> cancellation object
Returned: a <GTlsInteractionResult>.
The status of the request certificate interaction.
Run asynchronous interaction to ask the user for a certificate to use
with the connection. In general, tls-interaction:invoke-request-certificate
should be used instead of this function.
Derived subclasses usually implement a certificate selector, although they may also choose to provide a certificate from elsewhere. callback will be called when the operation completes. Alternatively the user may abort this certificate request, which will usually abort the TLS connection.
Passed: a <GTlsInteraction>.
a <GTlsInteraction> object
Passed: a <GTlsConnection>.
a <GTlsConnection> object
Passed: a
<GTlsCertificateRequestFlags>,
or a list of its symbols, or one of them.
flags providing more information about the request
Passed, or left out: a <GCancellable>, or
#f.
an optional <GCancellable> cancellation object
Passed, or left out: a procedure, or #f.
will be called when the interaction completes
See GAsyncReadyCallback for how it is
called.
Not passed: guile-gi supplies it.
data to pass to the callback
Complete a request certificate user interaction request. This should be
once the tls-interaction:request-certificate-async
completion callback is called.
If handled is returned, then the
<GTlsConnection> passed to
tls-interaction:request-certificate-async
will have had its tls-connection:certificate filled in.
If the interaction is cancelled by the cancellation object, or by the
user then failed will be returned
with an error that contains a cancelled error
code.
Passed: a <GTlsInteraction>.
a <GTlsInteraction> object
Passed: a <GAsyncResult>.
the result passed to the callback
Returned: a <GTlsInteractionResult>.
The status of the request certificate interaction.
Run synchronous interaction to ask the user for a password. In general,
tls-interaction:invoke-ask-password should be
used instead of this function.
Derived subclasses usually implement a password prompt, although they may also choose to provide a password from elsewhere. The password value will be filled in and then callback will be called. Alternatively the user may abort this password request, which will usually abort the TLS connection.
If the interaction is cancelled by the cancellation object, or by the
user then failed will be returned
with an error that contains a cancelled error
code. Certain implementations may not support immediate cancellation.
To override it in a new class, give register-type #:vfuncs
`((ask-password . ,procedure)). The procedure is called as
(procedure self password cancellable) ⇒ %return.
Passed: the class whose implementation to call:
<GTlsInteraction>, or a class that derives
from it, or its GType number.
Passed: a <GTlsInteraction>.
a <GTlsInteraction> object
Passed: a <GTlsPassword>.
a <GTlsPassword> object
Passed, or left out: a <GCancellable>, or
#f.
an optional <GCancellable> cancellation object
Returned: a <GTlsInteractionResult>.
The status of the ask password interaction.
Run asynchronous interaction to ask the user for a password. In
general, tls-interaction:invoke-ask-password should be
used instead of this function.
Derived subclasses usually implement a password prompt, although they may also choose to provide a password from elsewhere. The password value will be filled in and then callback will be called. Alternatively the user may abort this password request, which will usually abort the TLS connection.
If the interaction is cancelled by the cancellation object, or by the
user then failed will be returned
with an error that contains a cancelled error
code. Certain implementations may not support immediate cancellation.
Certain implementations may not support immediate cancellation.
To override it in a new class, give register-type #:vfuncs
`((ask-password-async . ,procedure)). The procedure is called as
(procedure self password cancellable callback user-data).
Passed: the class whose implementation to call:
<GTlsInteraction>, or a class that derives
from it, or its GType number.
Passed: a <GTlsInteraction>.
a <GTlsInteraction> object
Passed: a <GTlsPassword>.
a <GTlsPassword> object
Passed, or left out: a <GCancellable>, or
#f.
an optional <GCancellable> cancellation object
Passed, or left out: a procedure, or #f.
will be called when the interaction completes
See GAsyncReadyCallback for how it is
called.
Not passed: guile-gi supplies it.
data to pass to the callback
Complete an ask password user interaction request. This should be once
the tls-interaction:ask-password-async completion
callback is called.
If handled is returned, then the
<GTlsPassword> passed to
tls-interaction:ask-password
will have its password filled in.
If the interaction is cancelled by the cancellation object, or by the
user then failed will be returned
with an error that contains a cancelled error
code.
To override it in a new class, give register-type #:vfuncs
`((ask-password-finish . ,procedure)). The procedure is called as
(procedure self result) ⇒ %return.
Passed: the class whose implementation to call:
<GTlsInteraction>, or a class that derives
from it, or its GType number.
Passed: a <GTlsInteraction>.
a <GTlsInteraction> object
Passed: a <GAsyncResult>.
the result passed to the callback
Returned: a <GTlsInteractionResult>.
The status of the ask password interaction.
Run synchronous interaction to ask the user to choose a certificate to
use with the connection. In general, tls-interaction:invoke-request-certificate
should be used instead of this function.
Derived subclasses usually implement a certificate selector, although they may also choose to provide a certificate from elsewhere. Alternatively the user may abort this certificate request, which will usually abort the TLS connection.
If handled is returned, then the
<GTlsConnection> passed to
tls-interaction:request-certificate will have had
its tls-connection:certificate filled in.
If the interaction is cancelled by the cancellation object, or by the
user then failed will be returned
with an error that contains a cancelled error
code. Certain implementations may not support immediate cancellation.
To override it in a new class, give register-type #:vfuncs
`((request-certificate . ,procedure)). The procedure is called as
(procedure self connection flags cancellable) ⇒ %return.
Passed: the class whose implementation to call:
<GTlsInteraction>, or a class that derives
from it, or its GType number.
Passed: a <GTlsInteraction>.
a <GTlsInteraction> object
Passed: a <GTlsConnection>.
a <GTlsConnection> object
Passed: a
<GTlsCertificateRequestFlags>,
or a list of its symbols, or one of them.
flags providing more information about the request
Passed, or left out: a <GCancellable>, or
#f.
an optional <GCancellable> cancellation object
Returned: a <GTlsInteractionResult>.
The status of the request certificate interaction.
Run asynchronous interaction to ask the user for a certificate to use
with the connection. In general, tls-interaction:invoke-request-certificate
should be used instead of this function.
Derived subclasses usually implement a certificate selector, although they may also choose to provide a certificate from elsewhere. callback will be called when the operation completes. Alternatively the user may abort this certificate request, which will usually abort the TLS connection.
To override it in a new class, give register-type #:vfuncs
`((request-certificate-async . ,procedure)). The procedure is called
as (procedure self connection flags cancellable callback
user-data).
Passed: the class whose implementation to call:
<GTlsInteraction>, or a class that derives
from it, or its GType number.
Passed: a <GTlsInteraction>.
a <GTlsInteraction> object
Passed: a <GTlsConnection>.
a <GTlsConnection> object
Passed: a
<GTlsCertificateRequestFlags>,
or a list of its symbols, or one of them.
flags providing more information about the request
Passed, or left out: a <GCancellable>, or
#f.
an optional <GCancellable> cancellation object
Passed, or left out: a procedure, or #f.
will be called when the interaction completes
See GAsyncReadyCallback for how it is
called.
Not passed: guile-gi supplies it.
data to pass to the callback
Complete a request certificate user interaction request. This should be
once the tls-interaction:request-certificate-async
completion callback is called.
If handled is returned, then the
<GTlsConnection> passed to
tls-interaction:request-certificate-async
will have had its tls-connection:certificate filled in.
If the interaction is cancelled by the cancellation object, or by the
user then failed will be returned
with an error that contains a cancelled error
code.
To override it in a new class, give register-type #:vfuncs
`((request-certificate-finish . ,procedure)). The procedure is called
as (procedure self result) ⇒ %return.
Passed: the class whose implementation to call:
<GTlsInteraction>, or a class that derives
from it, or its GType number.
Passed: a <GTlsInteraction>.
a <GTlsInteraction> object
Passed: a <GAsyncResult>.
the result passed to the callback
Returned: a <GTlsInteractionResult>.
The status of the request certificate interaction.