caa1e9b314285b0ccb31064d38bc77adcc7c4448
[platform/upstream/glib-networking.git] / tls / openssl / gtlsbio.h
1 /*
2  * gtlsbio.h
3  *
4  * Copyright (C) 2015 NICE s.r.l.
5  *
6  * This file is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This file is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public License
17  * along with this program. If not, see <http://www.gnu.org/licenses/>.
18  *
19  * In addition, when the library is used with OpenSSL, a special
20  * exception applies. Refer to the LICENSE_EXCEPTION file for details.
21  *
22  * Authors: Ignacio Casal Quinteiro
23  */
24
25 #ifndef __G_TLS_BIO_H__
26 #define __G_TLS_BIO_H__
27
28 #include <gio/gio.h>
29 #include "openssl-include.h"
30
31 G_BEGIN_DECLS
32
33 BIO       *g_tls_bio_new                   (GIOStream    *io_stream);
34
35 void       g_tls_bio_set_read_cancellable  (BIO          *bio,
36                                             GCancellable *cancellable);
37
38 void       g_tls_bio_set_read_blocking     (BIO          *bio,
39                                             gboolean      blocking);
40
41 void       g_tls_bio_set_read_error        (BIO          *bio,
42                                             GError      **error);
43
44 void       g_tls_bio_set_write_cancellable (BIO          *bio,
45                                             GCancellable *cancellable);
46
47 void       g_tls_bio_set_write_blocking    (BIO          *bio,
48                                             gboolean      blocking);
49
50 void       g_tls_bio_set_write_error       (BIO          *bio,
51                                             GError      **error);
52
53 G_END_DECLS
54
55 #endif /* __G_TLS_BIO_H__ */