Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:00:00

0001 /* GIO - GLib Input, Output and Streaming Library
0002  *
0003  * Copyright (C) 2011 Collabora, Ltd.
0004  *
0005  * SPDX-License-Identifier: LGPL-2.1-or-later
0006  *
0007  * This library is free software; you can redistribute it and/or
0008  * modify it under the terms of the GNU Lesser General Public
0009  * License as published by the Free Software Foundation; either
0010  * version 2.1 of the License, or (at your option) any later version.
0011  *
0012  * This library is distributed in the hope that it will be useful,
0013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0015  * Lesser General Public License for more details.
0016  *
0017  * You should have received a copy of the GNU Lesser General
0018  * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
0019  *
0020  * Author: Stef Walter <stefw@collabora.co.uk>
0021  */
0022 
0023 #ifndef __G_TLS_INTERACTION_H__
0024 #define __G_TLS_INTERACTION_H__
0025 
0026 #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
0027 #error "Only <gio/gio.h> can be included directly."
0028 #endif
0029 
0030 #include <gio/giotypes.h>
0031 
0032 G_BEGIN_DECLS
0033 
0034 #define G_TYPE_TLS_INTERACTION         (g_tls_interaction_get_type ())
0035 #define G_TLS_INTERACTION(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_TLS_INTERACTION, GTlsInteraction))
0036 #define G_TLS_INTERACTION_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_TLS_INTERACTION, GTlsInteractionClass))
0037 #define G_IS_TLS_INTERACTION(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_TLS_INTERACTION))
0038 #define G_IS_TLS_INTERACTION_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_TLS_INTERACTION))
0039 #define G_TLS_INTERACTION_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_TLS_INTERACTION, GTlsInteractionClass))
0040 
0041 typedef struct _GTlsInteractionClass   GTlsInteractionClass;
0042 typedef struct _GTlsInteractionPrivate GTlsInteractionPrivate;
0043 
0044 struct _GTlsInteraction
0045 {
0046   /*< private >*/
0047   GObject parent_instance;
0048   GTlsInteractionPrivate *priv;
0049 };
0050 
0051 struct _GTlsInteractionClass
0052 {
0053   /*< private >*/
0054   GObjectClass parent_class;
0055 
0056   /*< public >*/
0057   GTlsInteractionResult  (* ask_password)        (GTlsInteraction    *interaction,
0058                                                   GTlsPassword       *password,
0059                                                   GCancellable       *cancellable,
0060                                                   GError            **error);
0061 
0062   void                   (* ask_password_async)  (GTlsInteraction    *interaction,
0063                                                   GTlsPassword       *password,
0064                                                   GCancellable       *cancellable,
0065                                                   GAsyncReadyCallback callback,
0066                                                   gpointer            user_data);
0067 
0068   GTlsInteractionResult  (* ask_password_finish) (GTlsInteraction    *interaction,
0069                                                   GAsyncResult       *result,
0070                                                   GError            **error);
0071 
0072   GTlsInteractionResult  (* request_certificate)        (GTlsInteraction              *interaction,
0073                                                          GTlsConnection               *connection,
0074                                                          GTlsCertificateRequestFlags   flags,
0075                                                          GCancellable                 *cancellable,
0076                                                          GError                      **error);
0077 
0078   void                   (* request_certificate_async)  (GTlsInteraction              *interaction,
0079                                                          GTlsConnection               *connection,
0080                                                          GTlsCertificateRequestFlags   flags,
0081                                                          GCancellable                 *cancellable,
0082                                                          GAsyncReadyCallback           callback,
0083                                                          gpointer                      user_data);
0084 
0085   GTlsInteractionResult  (* request_certificate_finish) (GTlsInteraction              *interaction,
0086                                                          GAsyncResult                 *result,
0087                                                          GError                      **error);
0088 
0089   /*< private >*/
0090   /* Padding for future expansion */
0091   gpointer padding[21];
0092 };
0093 
0094 GIO_AVAILABLE_IN_ALL
0095 GType                  g_tls_interaction_get_type            (void) G_GNUC_CONST;
0096 
0097 GIO_AVAILABLE_IN_ALL
0098 GTlsInteractionResult  g_tls_interaction_invoke_ask_password (GTlsInteraction    *interaction,
0099                                                               GTlsPassword       *password,
0100                                                               GCancellable       *cancellable,
0101                                                               GError            **error);
0102 
0103 GIO_AVAILABLE_IN_ALL
0104 GTlsInteractionResult  g_tls_interaction_ask_password        (GTlsInteraction    *interaction,
0105                                                               GTlsPassword       *password,
0106                                                               GCancellable       *cancellable,
0107                                                               GError            **error);
0108 
0109 GIO_AVAILABLE_IN_ALL
0110 void                   g_tls_interaction_ask_password_async  (GTlsInteraction    *interaction,
0111                                                               GTlsPassword       *password,
0112                                                               GCancellable       *cancellable,
0113                                                               GAsyncReadyCallback callback,
0114                                                               gpointer            user_data);
0115 
0116 GIO_AVAILABLE_IN_ALL
0117 GTlsInteractionResult  g_tls_interaction_ask_password_finish (GTlsInteraction    *interaction,
0118                                                               GAsyncResult       *result,
0119                                                               GError            **error);
0120 
0121 GIO_AVAILABLE_IN_2_40
0122 GTlsInteractionResult  g_tls_interaction_invoke_request_certificate (GTlsInteraction              *interaction,
0123                                                                      GTlsConnection               *connection,
0124                                                                      GTlsCertificateRequestFlags   flags,
0125                                                                      GCancellable                 *cancellable,
0126                                                                      GError                      **error);
0127 
0128 GIO_AVAILABLE_IN_2_40
0129 GTlsInteractionResult  g_tls_interaction_request_certificate        (GTlsInteraction              *interaction,
0130                                                                      GTlsConnection               *connection,
0131                                                                      GTlsCertificateRequestFlags   flags,
0132                                                                      GCancellable                 *cancellable,
0133                                                                      GError                      **error);
0134 
0135 GIO_AVAILABLE_IN_2_40
0136 void                   g_tls_interaction_request_certificate_async  (GTlsInteraction              *interaction,
0137                                                                      GTlsConnection               *connection,
0138                                                                      GTlsCertificateRequestFlags   flags,
0139                                                                      GCancellable                 *cancellable,
0140                                                                      GAsyncReadyCallback           callback,
0141                                                                      gpointer                      user_data);
0142 
0143 GIO_AVAILABLE_IN_2_40
0144 GTlsInteractionResult  g_tls_interaction_request_certificate_finish (GTlsInteraction              *interaction,
0145                                                                      GAsyncResult                 *result,
0146                                                                      GError                      **error);
0147 
0148 G_END_DECLS
0149 
0150 #endif /* __G_TLS_INTERACTION_H__ */