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.DtlsClientConnectionIF;
26 
27 private import gio.DatagramBasedIF;
28 private import gio.SocketConnectableIF;
29 private import gio.c.functions;
30 public  import gio.c.types;
31 private import glib.ConstructionException;
32 private import glib.ErrorG;
33 private import glib.GException;
34 private import glib.ListG;
35 private import gobject.ObjectG;
36 public  import gtkc.giotypes;
37 
38 
39 /**
40  * #GDtlsClientConnection is the client-side subclass of
41  * #GDtlsConnection, representing a client-side DTLS connection.
42  *
43  * Since: 2.48
44  */
45 public interface DtlsClientConnectionIF{
46 	/** Get the main Gtk struct */
47 	public GDtlsClientConnection* getDtlsClientConnectionStruct(bool transferOwnership = false);
48 
49 	/** the main Gtk struct as a void* */
50 	protected void* getStruct();
51 
52 
53 	/** */
54 	public static GType getType()
55 	{
56 		return g_dtls_client_connection_get_type();
57 	}
58 
59 	/**
60 	 * Gets the list of distinguished names of the Certificate Authorities
61 	 * that the server will accept certificates from. This will be set
62 	 * during the TLS handshake if the server requests a certificate.
63 	 * Otherwise, it will be %NULL.
64 	 *
65 	 * Each item in the list is a #GByteArray which contains the complete
66 	 * subject DN of the certificate authority.
67 	 *
68 	 * Returns: the list of
69 	 *     CA DNs. You should unref each element with g_byte_array_unref() and then
70 	 *     the free the list with g_list_free().
71 	 *
72 	 * Since: 2.48
73 	 */
74 	public ListG getAcceptedCas();
75 
76 	/**
77 	 * Gets @conn's expected server identity
78 	 *
79 	 * Returns: a #GSocketConnectable describing the
80 	 *     expected server identity, or %NULL if the expected identity is not
81 	 *     known.
82 	 *
83 	 * Since: 2.48
84 	 */
85 	public SocketConnectableIF getServerIdentity();
86 
87 	/**
88 	 * Gets @conn's validation flags
89 	 *
90 	 * Returns: the validation flags
91 	 *
92 	 * Since: 2.48
93 	 */
94 	public GTlsCertificateFlags getValidationFlags();
95 
96 	/**
97 	 * Sets @conn's expected server identity, which is used both to tell
98 	 * servers on virtual hosts which certificate to present, and also
99 	 * to let @conn know what name to look for in the certificate when
100 	 * performing %G_TLS_CERTIFICATE_BAD_IDENTITY validation, if enabled.
101 	 *
102 	 * Params:
103 	 *     identity = a #GSocketConnectable describing the expected server identity
104 	 *
105 	 * Since: 2.48
106 	 */
107 	public void setServerIdentity(SocketConnectableIF identity);
108 
109 	/**
110 	 * Sets @conn's validation flags, to override the default set of
111 	 * checks performed when validating a server certificate. By default,
112 	 * %G_TLS_CERTIFICATE_VALIDATE_ALL is used.
113 	 *
114 	 * Params:
115 	 *     flags = the #GTlsCertificateFlags to use
116 	 *
117 	 * Since: 2.48
118 	 */
119 	public void setValidationFlags(GTlsCertificateFlags flags);
120 }