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  * Conversion parameters:
26  * inFile  = GTlsBackend.html
27  * outPack = gio
28  * outFile = TlsBackend
29  * strct   = GTlsBackend
30  * realStrct=
31  * ctorStrct=
32  * clss    = TlsBackend
33  * interf  = 
34  * class Code: No
35  * interface Code: No
36  * template for:
37  * extend  = 
38  * implements:
39  * prefixes:
40  * 	- g_tls_backend_
41  * omit structs:
42  * omit prefixes:
43  * omit code:
44  * omit signals:
45  * imports:
46  * structWrap:
47  * 	- GTlsBackend* -> TlsBackend
48  * module aliases:
49  * local aliases:
50  * overrides:
51  */
52 
53 module gio.TlsBackend;
54 
55 public  import gtkc.giotypes;
56 
57 private import gtkc.gio;
58 private import glib.ConstructionException;
59 private import gobject.ObjectG;
60 
61 
62 
63 
64 
65 
66 /**
67  * Description
68  */
69 public class TlsBackend
70 {
71 	
72 	/** the main Gtk struct */
73 	protected GTlsBackend* gTlsBackend;
74 	
75 	
76 	public GTlsBackend* getTlsBackendStruct()
77 	{
78 		return gTlsBackend;
79 	}
80 	
81 	
82 	/** the main Gtk struct as a void* */
83 	protected void* getStruct()
84 	{
85 		return cast(void*)gTlsBackend;
86 	}
87 	
88 	/**
89 	 * Sets our main struct and passes it to the parent class
90 	 */
91 	public this (GTlsBackend* gTlsBackend)
92 	{
93 		this.gTlsBackend = gTlsBackend;
94 	}
95 	
96 	/**
97 	 */
98 	
99 	/**
100 	 * Gets the default GTlsBackend for the system.
101 	 * Since 2.28
102 	 * Returns: a GTlsBackend
103 	 */
104 	public static TlsBackend getDefault()
105 	{
106 		// GTlsBackend * g_tls_backend_get_default (void);
107 		auto p = g_tls_backend_get_default();
108 		
109 		if(p is null)
110 		{
111 			return null;
112 		}
113 		
114 		return ObjectG.getDObject!(TlsBackend)(cast(GTlsBackend*) p);
115 	}
116 	
117 	/**
118 	 * Checks if TLS is supported; if this returns FALSE for the default
119 	 * GTlsBackend, it means no "real" TLS backend is available.
120 	 * Since 2.28
121 	 * Returns: whether or not TLS is supported
122 	 */
123 	public int supportsTls()
124 	{
125 		// gboolean g_tls_backend_supports_tls (GTlsBackend *backend);
126 		return g_tls_backend_supports_tls(gTlsBackend);
127 	}
128 	
129 	/**
130 	 * Gets the GType of backend's GTlsCertificate implementation.
131 	 * Since 2.28
132 	 * Returns: the GType of backend's GTlsCertificate implementation.
133 	 */
134 	public GType getCertificateType()
135 	{
136 		// GType g_tls_backend_get_certificate_type (GTlsBackend *backend);
137 		return g_tls_backend_get_certificate_type(gTlsBackend);
138 	}
139 	
140 	/**
141 	 * Gets the GType of backend's GTlsClientConnection implementation.
142 	 * Since 2.28
143 	 * Returns: the GType of backend's GTlsClientConnection implementation.
144 	 */
145 	public GType getClientConnectionType()
146 	{
147 		// GType g_tls_backend_get_client_connection_type  (GTlsBackend *backend);
148 		return g_tls_backend_get_client_connection_type(gTlsBackend);
149 	}
150 	
151 	/**
152 	 * Gets the GType of backend's GTlsServerConnection implementation.
153 	 * Since 2.28
154 	 * Returns: the GType of backend's GTlsServerConnection implementation.
155 	 */
156 	public GType getServerConnectionType()
157 	{
158 		// GType g_tls_backend_get_server_connection_type  (GTlsBackend *backend);
159 		return g_tls_backend_get_server_connection_type(gTlsBackend);
160 	}
161 }