diff options
author | Kjell Ahlstedt <kjellahlstedt@gmail.com> | 2020-08-12 12:52:31 +0200 |
---|---|---|
committer | Kjell Ahlstedt <kjellahlstedt@gmail.com> | 2020-08-12 12:52:31 +0200 |
commit | 2da4503d039da6a12cbd61cbbfea0af4ba572229 (patch) | |
tree | 1b5b9b34418ae73b1efcb0eb1a6ead58c956f582 /gio/src/socketclient.ccg | |
parent | bb806ba91b7c8ae08b721826996d877b748200b2 (diff) | |
download | glibmm-2da4503d039da6a12cbd61cbbfea0af4ba572229.tar.gz |
Rewrite Gio::Tls[Client,Server]ConnectionImpl
TlsConnection_Class::wrap_new() can wrap a C object in a TlsConnection,
TlsClientConnectionImpl or TlsServerConnectionImpl depending on which
interface, if any, the C object implements.
No need for special wrap*() functions in Tls[Client,Server]Connection
or SocketClient::signal_event().
This is similar to Gdk::DeviceWithPad.
Diffstat (limited to 'gio/src/socketclient.ccg')
-rw-r--r-- | gio/src/socketclient.ccg | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/gio/src/socketclient.ccg b/gio/src/socketclient.ccg index 52658d62..8339f12d 100644 --- a/gio/src/socketclient.ccg +++ b/gio/src/socketclient.ccg @@ -15,28 +15,9 @@ */ #include <gio/gio.h> -#include <giomm/tlsclientconnectionimpl.h> #include <giomm/asyncresult.h> #include "slot_async.h" -namespace -{ -// Wrap the GIOStream* connection in the 'event' signal. -// The GIOStream pointer, if not a nullptr, can point to either a GSocketConnection -// or to a subclass of GTlsConnection that implements the GTlsClientConnection interface. -Glib::RefPtr<Gio::IOStream> SocketClient_signal_event_wrap_connection(GIOStream* object, bool take_copy) -{ - if (!Glib::ObjectBase::_get_current_wrapper((GObject*)object) && - G_IS_TLS_CLIENT_CONNECTION(object)) - // An instance of a class that implements GTlsClientConnection. - // It doesn't have a wrapper. Wrap it in a Gio::TlsClientConnectionImpl. - return Glib::wrap_tls_client_connection_impl(G_TLS_CONNECTION(object), take_copy); - - return Glib::wrap(object, take_copy); -} - -} // anonymous namespace - namespace Gio { |