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. 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. 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 * Checks if DTLS is supported. DTLS support may not be available even if TLS 144 * support is available, and vice-versa. 145 * 146 * Returns: whether DTLS is supported 147 * 148 * Since: 2.48 149 */ 150 public bool supportsDtls(); 151 152 /** 153 * Checks if TLS is supported; if this returns %FALSE for the default 154 * #GTlsBackend, it means no "real" TLS backend is available. 155 * 156 * Returns: whether or not TLS is supported 157 * 158 * Since: 2.28 159 */ 160 public bool supportsTls(); 161 }