Make GTlsInteraction virtual methods cancellable

* Add cancellable argument to g_tls_interaction_ask_password
   and g_tls_interaction_ask_password_async.
 * This is API breakage, but this API has not yet been released
   in a stable release (and very unlikely used yet).
 * Since we're breaking unreleased API, expand amount of padding
   on GTlsInteractionClass because we're going to need it.

https://bugzilla.gnome.org/show_bug.cgi?id=656443
This commit is contained in:
Stef Walter
2011-08-13 14:03:53 +02:00
parent 7d679717f0
commit 41432cb375
4 changed files with 87 additions and 25 deletions

View File

@@ -55,33 +55,41 @@ struct _GTlsInteractionClass
/* virtual methods: */
GTlsInteractionResult (* ask_password) (GTlsInteraction *interaction,
GTlsPassword *password);
GTlsPassword *password,
GCancellable *cancellable,
GError **error);
void (* ask_password_async) (GTlsInteraction *interaction,
GTlsPassword *password,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
GTlsInteractionResult (* ask_password_finish) (GTlsInteraction *interaction,
GAsyncResult *result);
GAsyncResult *result,
GError **error);
/*< private >*/
/* Padding for future expansion */
gpointer padding[16];
gpointer padding[24];
};
GType g_tls_interaction_get_type (void) G_GNUC_CONST;
GTlsInteractionResult g_tls_interaction_ask_password (GTlsInteraction *interaction,
GTlsPassword *password);
GTlsPassword *password,
GCancellable *cancellable,
GError **error);
void g_tls_interaction_ask_password_async (GTlsInteraction *interaction,
GTlsPassword *password,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
GTlsInteractionResult g_tls_interaction_ask_password_finish (GTlsInteraction *interaction,
GAsyncResult *result);
GAsyncResult *result,
GError **error);
G_END_DECLS