1 /*
2  * This file is part of gtkD.
3  *
4  * gtkD is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License
6  * as published by the Free Software Foundation; either version 3
7  * of the License, or (at your option) any later version, with
8  * some exceptions, please read the COPYING file.
9  *
10  * gtkD 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
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with gtkD; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
18  */
19 
20 // generated automatically - do not change
21 // find conversion definition on APILookup.txt
22 // implement new conversion functionalities on the wrap.utils pakage
23 
24 
25 module gio.TlsBackendIF;
26 
27 private import gio.TlsBackendIF;
28 private import gio.TlsDatabase;
29 private import gio.c.functions;
30 public  import gio.c.types;
31 private import gobject.ObjectG;
32 public  import gtkc.giotypes;
33 
34 
35 /**
36  * TLS (Transport Layer Security, aka SSL) and DTLS backend.
37  *
38  * Since: 2.28
39  */
40 public interface TlsBackendIF{
41 	/** Get the main Gtk struct */
42 	public GTlsBackend* getTlsBackendStruct(bool transferOwnership = false);
43 
44 	/** the main Gtk struct as a void* */
45 	protected void* getStruct();
46 
47 
48 	/** */
49 	public static GType getType()
50 	{
51 		return g_tls_backend_get_type();
52 	}
53 
54 	/**
55 	 * Gets the default #GTlsBackend for the system.
56 	 *
57 	 * Returns: a #GTlsBackend
58 	 *
59 	 * Since: 2.28
60 	 */
61 	public static TlsBackendIF getDefault()
62 	{
63 		auto __p = g_tls_backend_get_default();
64 
65 		if(__p is null)
66 		{
67 			return null;
68 		}
69 
70 		return ObjectG.getDObject!(TlsBackendIF)(cast(GTlsBackend*) __p);
71 	}
72 
73 	/**
74 	 * Gets the #GType of @backend's #GTlsCertificate implementation.
75 	 *
76 	 * Returns: the #GType of @backend's #GTlsCertificate
77 	 *     implementation.
78 	 *
79 	 * Since: 2.28
80 	 */
81 	public GType getCertificateType();
82 
83 	/**
84 	 * Gets the #GType of @backend's #GTlsClientConnection implementation.
85 	 *
86 	 * Returns: the #GType of @backend's #GTlsClientConnection
87 	 *     implementation.
88 	 *
89 	 * Since: 2.28
90 	 */
91 	public GType getClientConnectionType();
92 
93 	/**
94 	 * Gets the default #GTlsDatabase used to verify TLS connections.
95 	 *
96 	 * Returns: the default database, which should be
97 	 *     unreffed when done.
98 	 *
99 	 * Since: 2.30
100 	 */
101 	public TlsDatabase getDefaultDatabase();
102 
103 	/**
104 	 * Gets the #GType of @backend’s #GDtlsClientConnection implementation.
105 	 *
106 	 * Returns: the #GType of @backend’s #GDtlsClientConnection
107 	 *     implementation, or %G_TYPE_INVALID if this backend doesn’t support DTLS.
108 	 *
109 	 * Since: 2.48
110 	 */
111 	public GType getDtlsClientConnectionType();
112 
113 	/**
114 	 * Gets the #GType of @backend’s #GDtlsServerConnection implementation.
115 	 *
116 	 * Returns: the #GType of @backend’s #GDtlsServerConnection
117 	 *     implementation, or %G_TYPE_INVALID if this backend doesn’t support DTLS.
118 	 *
119 	 * Since: 2.48
120 	 */
121 	public GType getDtlsServerConnectionType();
122 
123 	/**
124 	 * Gets the #GType of @backend's #GTlsFileDatabase implementation.
125 	 *
126 	 * Returns: the #GType of backend's #GTlsFileDatabase implementation.
127 	 *
128 	 * Since: 2.30
129 	 */
130 	public GType getFileDatabaseType();
131 
132 	/**
133 	 * Gets the #GType of @backend's #GTlsServerConnection implementation.
134 	 *
135 	 * Returns: the #GType of @backend's #GTlsServerConnection
136 	 *     implementation.
137 	 *
138 	 * Since: 2.28
139 	 */
140 	public GType getServerConnectionType();
141 
142 	/**
143 	 * Set the default #GTlsDatabase used to verify TLS connections
144 	 *
145 	 * Any subsequent call to g_tls_backend_get_default_database() will return
146 	 * the database set in this call.  Existing databases and connections are not
147 	 * modified.
148 	 *
149 	 * Setting a %NULL default database will reset to using the system default
150 	 * database as if g_tls_backend_set_default_database() had never been called.
151 	 *
152 	 * Params:
153 	 *     database = the #GTlsDatabase
154 	 *
155 	 * Since: 2.60
156 	 */
157 	public void setDefaultDatabase(TlsDatabase database);
158 
159 	/**
160 	 * Checks if DTLS is supported. DTLS support may not be available even if TLS
161 	 * support is available, and vice-versa.
162 	 *
163 	 * Returns: whether DTLS is supported
164 	 *
165 	 * Since: 2.48
166 	 */
167 	public bool supportsDtls();
168 
169 	/**
170 	 * Checks if TLS is supported; if this returns %FALSE for the default
171 	 * #GTlsBackend, it means no "real" TLS backend is available.
172 	 *
173 	 * Returns: whether or not TLS is supported
174 	 *
175 	 * Since: 2.28
176 	 */
177 	public bool supportsTls();
178 }