2
// Generated by gtkmmproc -- DO NOT MODIFY!
3
#ifndef _GIOMM_TLSCLIENTCONNECTION_H
4
#define _GIOMM_TLSCLIENTCONNECTION_H
7
#include <glibmm/ustring.h>
8
#include <sigc++/sigc++.h>
10
/* Copyright (C) 2013 The giomm Development Team
12
* This library is free software; you can redistribute it and/or
13
* modify it under the terms of the GNU Lesser General Public
14
* License as published by the Free Software Foundation; either
15
* version 2.1 of the License, or (at your option) any later version.
17
* This library is distributed in the hope that it will be useful,
18
* but WITHOUT ANY WARRANTY; without even the implied warranty of
19
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20
* Lesser General Public License for more details.
22
* You should have received a copy of the GNU Lesser General Public
23
* License along with this library; if not, write to the Free
24
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27
#include <glibmm/interface.h>
28
#include <giomm/enums.h>
31
#ifndef DOXYGEN_SHOULD_SKIP_THIS
32
typedef struct _GTlsClientConnectionInterface GTlsClientConnectionInterface;
33
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
35
#ifndef DOXYGEN_SHOULD_SKIP_THIS
36
typedef struct _GTlsClientConnection GTlsClientConnection;
37
typedef struct _GTlsClientConnectionClass GTlsClientConnectionClass;
38
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
42
{ class TlsClientConnection_Class; } // namespace Gio
46
class SocketConnectable;
48
/** TlsClientConnection - TLS client-side connection.
49
* TlsClientConnection is the client-side subclass of TlsConnection,
50
* representing a client-side TLS connection.
54
class TlsClientConnection : public Glib::Interface
57
#ifndef DOXYGEN_SHOULD_SKIP_THIS
60
typedef TlsClientConnection CppObjectType;
61
typedef TlsClientConnection_Class CppClassType;
62
typedef GTlsClientConnection BaseObjectType;
63
typedef GTlsClientConnectionInterface BaseClassType;
66
friend class TlsClientConnection_Class;
67
static CppClassType tlsclientconnection_class_;
70
TlsClientConnection(const TlsClientConnection&);
71
TlsClientConnection& operator=(const TlsClientConnection&);
73
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
76
* You should derive from this class to use it.
78
TlsClientConnection();
80
#ifndef DOXYGEN_SHOULD_SKIP_THIS
81
/** Called by constructors of derived classes. Provide the result of
82
* the Class init() function to ensure that it is properly
85
* @param interface_class The Class object for the derived type.
87
explicit TlsClientConnection(const Glib::Interface_Class& interface_class);
90
// This is public so that C++ wrapper instances can be
91
// created for C instances of unwrapped types.
92
// For instance, if an unexpected C type implements the C interface.
93
explicit TlsClientConnection(GTlsClientConnection* castitem);
96
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
99
virtual ~TlsClientConnection();
101
static void add_interface(GType gtype_implementer);
103
/** Get the GType for this class, for use with the underlying GObject type system.
105
static GType get_type() G_GNUC_CONST;
107
#ifndef DOXYGEN_SHOULD_SKIP_THIS
108
static GType get_base_type() G_GNUC_CONST;
111
///Provides access to the underlying C GObject.
112
GTlsClientConnection* gobj() { return reinterpret_cast<GTlsClientConnection*>(gobject_); }
114
///Provides access to the underlying C GObject.
115
const GTlsClientConnection* gobj() const { return reinterpret_cast<GTlsClientConnection*>(gobject_); }
121
//TODO: This new function creates an IOStream, not a TlsClientConnection:
122
// GIOStream* g_tls_client_connection_new(GIOStream *base_io_stream, GSocketConnectable *server_identity, GError **error);
125
/** Sets @a conn's expected server identity, which is used both to tell
126
* servers on virtual hosts which certificate to present, and also
127
* to let @a conn know what name to look for in the certificate when
128
* performing TLS_CERTIFICATE_BAD_IDENTITY validation, if enabled.
131
* @param identity A SocketConnectable describing the expected server identity.
133
void set_server_identity(const Glib::RefPtr<SocketConnectable>& identity);
136
/** Gets @a conn's expected server identity
139
* @return A SocketConnectable describing the
140
* expected server identity, or <tt>0</tt> if the expected identity is not
143
Glib::RefPtr<SocketConnectable> get_server_identity();
145
/** Gets @a conn's expected server identity
148
* @return A SocketConnectable describing the
149
* expected server identity, or <tt>0</tt> if the expected identity is not
152
Glib::RefPtr<const SocketConnectable> get_server_identity() const;
155
/** Sets @a conn's validation flags, to override the default set of
156
* checks performed when validating a server certificate. By default,
157
* TLS_CERTIFICATE_VALIDATE_ALL is used.
160
* @param flags The TlsCertificateFlags to use.
162
void set_validation_flags(TlsCertificateFlags flags);
164
/** Gets @a conn's validation flags
167
* @return The validation flags.
169
TlsCertificateFlags get_validation_flags() const;
172
/** If @a use_ssl3 is <tt>true</tt>, this forces @a conn to use SSL 3.0 rather than
173
* trying to properly negotiate the right version of TLS or SSL to use.
174
* This can be used when talking to servers that do not implement the
175
* fallbacks correctly and which will therefore fail to handshake with
176
* a "modern" TLS handshake attempt.
179
* @param use_ssl3 Whether to use SSL 3.0.
181
void set_use_ssl3(bool use_ssl3);
183
/** Gets whether @a conn will use SSL 3.0 rather than the
184
* highest-supported version of TLS; see
185
* g_tls_client_connection_set_use_ssl3().
188
* @return Whether @a conn will use SSL 3.0.
190
bool get_use_ssl3() const;
192
//TODO: _WRAP_METHOD(GList* get_accepted_cas(), g_tls_client_connection_get_accepted_cas)
194
//TODO: _WRAP_PROPERTY("accepted-cas", gpointer)
196
#ifdef GLIBMM_PROPERTIES_ENABLED
197
/** GSocketConnectable identifying the server.
199
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
200
* @return A PropertyProxy that allows you to get or set the value of the property,
201
* or receive notification when the value of the property changes.
203
Glib::PropertyProxy< Glib::RefPtr<SocketConnectable> > property_server_identity() ;
204
#endif //#GLIBMM_PROPERTIES_ENABLED
206
#ifdef GLIBMM_PROPERTIES_ENABLED
207
/** GSocketConnectable identifying the server.
209
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
210
* @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
211
* or receive notification when the value of the property changes.
213
Glib::PropertyProxy_ReadOnly< Glib::RefPtr<SocketConnectable> > property_server_identity() const;
214
#endif //#GLIBMM_PROPERTIES_ENABLED
216
#ifdef GLIBMM_PROPERTIES_ENABLED
217
/** Use SSL 3.0 rather than trying to use TLS 1.x.
219
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
220
* @return A PropertyProxy that allows you to get or set the value of the property,
221
* or receive notification when the value of the property changes.
223
Glib::PropertyProxy< bool > property_use_ssl3() ;
224
#endif //#GLIBMM_PROPERTIES_ENABLED
226
#ifdef GLIBMM_PROPERTIES_ENABLED
227
/** Use SSL 3.0 rather than trying to use TLS 1.x.
229
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
230
* @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
231
* or receive notification when the value of the property changes.
233
Glib::PropertyProxy_ReadOnly< bool > property_use_ssl3() const;
234
#endif //#GLIBMM_PROPERTIES_ENABLED
236
#ifdef GLIBMM_PROPERTIES_ENABLED
237
/** What certificate validation to perform.
239
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
240
* @return A PropertyProxy that allows you to get or set the value of the property,
241
* or receive notification when the value of the property changes.
243
Glib::PropertyProxy< TlsCertificateFlags > property_validation_flags() ;
244
#endif //#GLIBMM_PROPERTIES_ENABLED
246
#ifdef GLIBMM_PROPERTIES_ENABLED
247
/** What certificate validation to perform.
249
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
250
* @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
251
* or receive notification when the value of the property changes.
253
Glib::PropertyProxy_ReadOnly< TlsCertificateFlags > property_validation_flags() const;
254
#endif //#GLIBMM_PROPERTIES_ENABLED
260
//C++ methods used to invoke GTK+ virtual functions:
263
//GTK+ Virtual Functions (override these to change behaviour):
265
//Default Signal Handlers::
275
/** A Glib::wrap() method for this object.
277
* @param object The C instance.
278
* @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
279
* @result A C++ instance that wraps this C instance.
281
* @relates Gio::TlsClientConnection
283
Glib::RefPtr<Gio::TlsClientConnection> wrap(GTlsClientConnection* object, bool take_copy = false);
288
#endif /* _GIOMM_TLSCLIENTCONNECTION_H */