1 /* GIO - GLib Input, Output and Streaming Library
3 * Copyright (C) 2011 Collabora, Ltd.
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General
16 * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
18 * Author: Stef Walter <stefw@collabora.co.uk>
21 #ifndef __G_TLS_INTERACTION_H__
22 #define __G_TLS_INTERACTION_H__
24 #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
25 #error "Only <gio/gio.h> can be included directly."
28 #include <gio/giotypes.h>
32 #define G_TYPE_TLS_INTERACTION (g_tls_interaction_get_type ())
33 #define G_TLS_INTERACTION(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_TLS_INTERACTION, GTlsInteraction))
34 #define G_TLS_INTERACTION_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_TLS_INTERACTION, GTlsInteractionClass))
35 #define G_IS_TLS_INTERACTION(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_TLS_INTERACTION))
36 #define G_IS_TLS_INTERACTION_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_TLS_INTERACTION))
37 #define G_TLS_INTERACTION_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_TLS_INTERACTION, GTlsInteractionClass))
39 typedef struct _GTlsInteractionClass GTlsInteractionClass;
40 typedef struct _GTlsInteractionPrivate GTlsInteractionPrivate;
42 struct _GTlsInteraction
45 GObject parent_instance;
46 GTlsInteractionPrivate *priv;
49 struct _GTlsInteractionClass
52 GObjectClass parent_class;
55 GTlsInteractionResult (* ask_password) (GTlsInteraction *interaction,
56 GTlsPassword *password,
57 GCancellable *cancellable,
60 void (* ask_password_async) (GTlsInteraction *interaction,
61 GTlsPassword *password,
62 GCancellable *cancellable,
63 GAsyncReadyCallback callback,
66 GTlsInteractionResult (* ask_password_finish) (GTlsInteraction *interaction,
70 GTlsInteractionResult (* request_certificate) (GTlsInteraction *interaction,
71 GTlsConnection *connection,
72 GTlsCertificateRequestFlags flags,
73 GCancellable *cancellable,
76 void (* request_certificate_async) (GTlsInteraction *interaction,
77 GTlsConnection *connection,
78 GTlsCertificateRequestFlags flags,
79 GCancellable *cancellable,
80 GAsyncReadyCallback callback,
83 GTlsInteractionResult (* request_certificate_finish) (GTlsInteraction *interaction,
88 /* Padding for future expansion */
93 GType g_tls_interaction_get_type (void) G_GNUC_CONST;
96 GTlsInteractionResult g_tls_interaction_invoke_ask_password (GTlsInteraction *interaction,
97 GTlsPassword *password,
98 GCancellable *cancellable,
101 GLIB_AVAILABLE_IN_ALL
102 GTlsInteractionResult g_tls_interaction_ask_password (GTlsInteraction *interaction,
103 GTlsPassword *password,
104 GCancellable *cancellable,
107 GLIB_AVAILABLE_IN_ALL
108 void g_tls_interaction_ask_password_async (GTlsInteraction *interaction,
109 GTlsPassword *password,
110 GCancellable *cancellable,
111 GAsyncReadyCallback callback,
114 GLIB_AVAILABLE_IN_ALL
115 GTlsInteractionResult g_tls_interaction_ask_password_finish (GTlsInteraction *interaction,
116 GAsyncResult *result,
119 GLIB_AVAILABLE_IN_2_40
120 GTlsInteractionResult g_tls_interaction_invoke_request_certificate (GTlsInteraction *interaction,
121 GTlsConnection *connection,
122 GTlsCertificateRequestFlags flags,
123 GCancellable *cancellable,
126 GLIB_AVAILABLE_IN_2_40
127 GTlsInteractionResult g_tls_interaction_request_certificate (GTlsInteraction *interaction,
128 GTlsConnection *connection,
129 GTlsCertificateRequestFlags flags,
130 GCancellable *cancellable,
133 GLIB_AVAILABLE_IN_2_40
134 void g_tls_interaction_request_certificate_async (GTlsInteraction *interaction,
135 GTlsConnection *connection,
136 GTlsCertificateRequestFlags flags,
137 GCancellable *cancellable,
138 GAsyncReadyCallback callback,
141 GLIB_AVAILABLE_IN_2_40
142 GTlsInteractionResult g_tls_interaction_request_certificate_finish (GTlsInteraction *interaction,
143 GAsyncResult *result,
148 #endif /* __G_TLS_INTERACTION_H__ */