source: appstream-generator/build/girepo/gio/TlsBackendT.d @ 4841

Last change on this file since 4841 was 4841, checked in by Juanma, 2 years ago

Initial release

File size: 3.4 KB
Line 
1/*
2 * Licensed under the GNU Lesser General Public License Version 3
3 *
4 * This library is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation, either version 3 of the license, or
7 * (at your option) any later version.
8 *
9 * This software is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 * GNU Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with this library.  If not, see <http://www.gnu.org/licenses/>.
16 */
17
18// generated automatically - do not change
19
20
21module gio.TlsBackendT;
22
23public  import gi.gio;
24public  import gi.giotypes;
25public  import gio.TlsBackend;
26public  import gio.TlsBackendIF;
27public  import gio.TlsDatabase;
28public  import gobject.ObjectG;
29
30
31/**
32 * TLS (Transport Layer Security, aka SSL) backend
33 *
34 * Since: 2.28
35 */
36public template TlsBackendT(TStruct)
37{
38        /** Get the main Gtk struct */
39        public GTlsBackend* getTlsBackendStruct()
40        {
41                return cast(GTlsBackend*)getStruct();
42        }
43
44
45        /**
46         * Gets the default #GTlsBackend for the system.
47         *
48         * Returns: a #GTlsBackend
49         *
50         * Since: 2.28
51         */
52        public static TlsBackendIF getDefault()
53        {
54                auto p = g_tls_backend_get_default();
55               
56                if(p is null)
57                {
58                        return null;
59                }
60               
61                return ObjectG.getDObject!(TlsBackend, TlsBackendIF)(cast(GTlsBackend*) p);
62        }
63
64        /**
65         * Gets the #GType of @backend's #GTlsCertificate implementation.
66         *
67         * Returns: the #GType of @backend's #GTlsCertificate
68         *     implementation.
69         *
70         * Since: 2.28
71         */
72        public GType getCertificateType()
73        {
74                return g_tls_backend_get_certificate_type(getTlsBackendStruct());
75        }
76
77        /**
78         * Gets the #GType of @backend's #GTlsClientConnection implementation.
79         *
80         * Returns: the #GType of @backend's #GTlsClientConnection
81         *     implementation.
82         *
83         * Since: 2.28
84         */
85        public GType getClientConnectionType()
86        {
87                return g_tls_backend_get_client_connection_type(getTlsBackendStruct());
88        }
89
90        /**
91         * Gets the default #GTlsDatabase used to verify TLS connections.
92         *
93         * Returns: the default database, which should be
94         *     unreffed when done.
95         *
96         * Since: 2.30
97         */
98        public TlsDatabase getDefaultDatabase()
99        {
100                auto p = g_tls_backend_get_default_database(getTlsBackendStruct());
101               
102                if(p is null)
103                {
104                        return null;
105                }
106               
107                return ObjectG.getDObject!(TlsDatabase)(cast(GTlsDatabase*) p, true);
108        }
109
110        /**
111         * Gets the #GType of @backend's #GTlsFileDatabase implementation.
112         *
113         * Returns: the #GType of backend's #GTlsFileDatabase implementation.
114         *
115         * Since: 2.30
116         */
117        public GType getFileDatabaseType()
118        {
119                return g_tls_backend_get_file_database_type(getTlsBackendStruct());
120        }
121
122        /**
123         * Gets the #GType of @backend's #GTlsServerConnection implementation.
124         *
125         * Returns: the #GType of @backend's #GTlsServerConnection
126         *     implementation.
127         *
128         * Since: 2.28
129         */
130        public GType getServerConnectionType()
131        {
132                return g_tls_backend_get_server_connection_type(getTlsBackendStruct());
133        }
134
135        /**
136         * Checks if TLS is supported; if this returns %FALSE for the default
137         * #GTlsBackend, it means no "real" TLS backend is available.
138         *
139         * Returns: whether or not TLS is supported
140         *
141         * Since: 2.28
142         */
143        public bool supportsTls()
144        {
145                return g_tls_backend_supports_tls(getTlsBackendStruct()) != 0;
146        }
147}
Note: See TracBrowser for help on using the repository browser.