c9d2244a3dbe26b71fcc09cefebb99c0f14e5b80
[platform/upstream/glib-networking.git] / tls / gnutls / gtlsbackend-gnutls.h
1 /* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /*
3  * GIO - GLib Input, Output and Streaming Library
4  *
5  * Copyright 2010 Red Hat, Inc.
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General
18  * Public License along with this library; if not, see
19  * <http://www.gnu.org/licenses/>.
20  *
21  * In addition, when the library is used with OpenSSL, a special
22  * exception applies. Refer to the LICENSE_EXCEPTION file for details.
23  */
24
25 #ifndef __G_TLS_BACKEND_GNUTLS_H__
26 #define __G_TLS_BACKEND_GNUTLS_H__
27
28 #include <gio/gio.h>
29 #include <gnutls/gnutls.h>
30
31 G_BEGIN_DECLS
32
33 #define G_TYPE_TLS_BACKEND_GNUTLS            (g_tls_backend_gnutls_get_type ())
34
35 G_DECLARE_FINAL_TYPE (GTlsBackendGnutls, g_tls_backend_gnutls, G, TLS_BACKEND_GNUTLS, GObject)
36
37 void  g_tls_backend_gnutls_register (GIOModule *module);
38
39 void    g_tls_backend_gnutls_store_session  (unsigned int             type,
40                                              GBytes                  *session_id,
41                                              GBytes                  *session_data);
42 void    g_tls_backend_gnutls_remove_session (unsigned int             type,
43                                              GBytes                  *session_id);
44 GBytes *g_tls_backend_gnutls_lookup_session (unsigned int             type,
45                                              GBytes                  *session_id);
46
47 G_END_DECLS
48
49 #endif /* __G_TLS_BACKEND_GNUTLS_H___ */