mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 15:33:39 +02:00
gio: Add GTlsInteraction interaction method invocation guarantees
* Add 'invoke' style method, which can be used to call an interaction from any thread. The interaction will be run in the appropriate #GMainContext * Sync methods can be called whether main loop is running or not. * Derived classes can choose to implement only sync or async interaction method, and the invoke method will fill in the blanks. * Documentation for the above. * Tests for the above. https://bugzilla.gnome.org/show_bug.cgi?id=657567
This commit is contained in:
@@ -43,17 +43,17 @@ typedef struct _GTlsInteractionPrivate GTlsInteractionPrivate;
|
||||
|
||||
struct _GTlsInteraction
|
||||
{
|
||||
/*< private >*/
|
||||
GObject parent_instance;
|
||||
|
||||
GTlsInteractionPrivate *priv;
|
||||
};
|
||||
|
||||
struct _GTlsInteractionClass
|
||||
{
|
||||
/*< private >*/
|
||||
GObjectClass parent_class;
|
||||
|
||||
/* virtual methods: */
|
||||
|
||||
/*< public >*/
|
||||
GTlsInteractionResult (* ask_password) (GTlsInteraction *interaction,
|
||||
GTlsPassword *password,
|
||||
GCancellable *cancellable,
|
||||
@@ -76,6 +76,12 @@ struct _GTlsInteractionClass
|
||||
|
||||
GType g_tls_interaction_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GTlsInteractionResult g_tls_interaction_invoke_ask_password (GTlsInteraction *interaction,
|
||||
GTlsPassword *password,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
|
||||
GTlsInteractionResult g_tls_interaction_ask_password (GTlsInteraction *interaction,
|
||||
GTlsPassword *password,
|
||||
GCancellable *cancellable,
|
||||
|
Reference in New Issue
Block a user