summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMurray Cumming <murrayc@murrayc.com>2015-02-09 09:52:41 +0100
committerMurray Cumming <murrayc@murrayc.com>2015-02-09 09:52:41 +0100
commit09de63af427ec0b9f3968d66ac3b8a89fa42eeef (patch)
treecb00e9be24ad7f73f33f8e8fdc158142d3e187a5
parentee8b4a04a5b9f0bdb6743f2c06799f9d5e2353c9 (diff)
downloadglibmm-09de63af427ec0b9f3968d66ac3b8a89fa42eeef.tar.gz
Gio: Add TcpWrapperConnection.
* tools/extra_defs_gen/genererate_defs_gio.cc: Add G_TCP_WRAPPER_CONNECTION. * gio/src/gio_signals.defs: Regenerate this to add the signals for GTcpWrapperConnection. * gio/src/filelist.am: * gio/src/tcpwrapperconnection.[hg|ccg]: Add TcpWrapperConnection. Markus Kolb noticed that this was missing. * gio/giomm.h: Include tcpwrapperconnection.h
-rw-r--r--gio/giomm.h1
-rw-r--r--gio/src/filelist.am1
-rw-r--r--gio/src/gio_signals.defs11
-rw-r--r--gio/src/tcpwrapperconnection.ccg22
-rw-r--r--gio/src/tcpwrapperconnection.hg46
-rw-r--r--tools/extra_defs_gen/generate_defs_gio.cc1
6 files changed, 82 insertions, 0 deletions
diff --git a/gio/giomm.h b/gio/giomm.h
index a618251a..b6d07b0c 100644
--- a/gio/giomm.h
+++ b/gio/giomm.h
@@ -129,6 +129,7 @@
#include <giomm/socketsource.h>
#include <giomm/srvtarget.h>
#include <giomm/tcpconnection.h>
+#include <giomm/tcpwrapperconnection.h>
#include <giomm/themedicon.h>
#include <giomm/threadedsocketservice.h>
#include <giomm/tlscertificate.h>
diff --git a/gio/src/filelist.am b/gio/src/filelist.am
index 17737fb0..76a587f2 100644
--- a/gio/src/filelist.am
+++ b/gio/src/filelist.am
@@ -116,6 +116,7 @@ giomm_files_any_hg = \
socketservice.hg \
srvtarget.hg \
tcpconnection.hg \
+ tcpwrapperconnection.hg \
threadedsocketservice.hg \
themedicon.hg \
tlscertificate.hg \
diff --git a/gio/src/gio_signals.defs b/gio/src/gio_signals.defs
index 232072fc..d6ce021e 100644
--- a/gio/src/gio_signals.defs
+++ b/gio/src/gio_signals.defs
@@ -2001,6 +2001,17 @@
(construct-only #f)
)
+;; From GTcpWrapperConnection
+
+(define-property base-io-stream
+ (of-object "GTcpWrapperConnection")
+ (prop-type "GParamObject")
+ (docs "The wrapped GIOStream")
+ (readable #t)
+ (writable #t)
+ (construct-only #t)
+)
+
;; From GTlsBackend
;; From GTlsCertificate
diff --git a/gio/src/tcpwrapperconnection.ccg b/gio/src/tcpwrapperconnection.ccg
new file mode 100644
index 00000000..58b9f179
--- /dev/null
+++ b/gio/src/tcpwrapperconnection.ccg
@@ -0,0 +1,22 @@
+/* Copyright (C) 2015 The giomm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gio/gio.h>
+
+namespace Gio
+{
+} // namespace Gio
diff --git a/gio/src/tcpwrapperconnection.hg b/gio/src/tcpwrapperconnection.hg
new file mode 100644
index 00000000..e5e214f9
--- /dev/null
+++ b/gio/src/tcpwrapperconnection.hg
@@ -0,0 +1,46 @@
+/* Copyright (C) 2015 The giomm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <giomm/tcpconnection.h>
+
+_DEFS(giomm,gio)
+_PINCLUDE(giomm/private/tcpconnection_p.h)
+
+namespace Gio
+{
+
+/**
+ * TODO
+ *
+ * @newin{2,34}
+ * @ingroup NetworkIO
+ */
+class TcpWrapperConnection : public Gio::TcpConnection
+{
+ _CLASS_GOBJECT(TcpWrapperConnection, GTcpWrapperConnection, G_TCP_WRAPPER_CONNECTION, Gio::TcpConnection, GTcpConnection)
+
+public:
+
+ _WRAP_CTOR(TcpWrapperConnection(const Glib::RefPtr<IOStream>& base_io_stream, const Glib::RefPtr<Socket>& socket), g_tcp_wrapper_connection_new)
+
+ _WRAP_METHOD(Glib::RefPtr<IOStream> get_base_io_stream(), g_tcp_wrapper_connection_get_base_io_stream, refreturn)
+ _WRAP_METHOD(Glib::RefPtr<const IOStream> get_base_io_stream() const, g_tcp_wrapper_connection_get_base_io_stream, constversion, refreturn)
+
+ _WRAP_PROPERTY("base-io-stream", Glib::RefPtr<IOStream>)
+};
+
+} // namespace Gio
diff --git a/tools/extra_defs_gen/generate_defs_gio.cc b/tools/extra_defs_gen/generate_defs_gio.cc
index 7fb58f26..cec799af 100644
--- a/tools/extra_defs_gen/generate_defs_gio.cc
+++ b/tools/extra_defs_gen/generate_defs_gio.cc
@@ -122,6 +122,7 @@ int main(int, char**)
<< get_defs(G_TYPE_SOCKET_CLIENT)
<< get_defs(G_TYPE_SOCKET_CONNECTION)
<< get_defs(G_TYPE_TCP_CONNECTION)
+ << get_defs(G_TYPE_TCP_WRAPPER_CONNECTION)
<< get_defs(G_TYPE_TLS_BACKEND)
<< get_defs(G_TYPE_TLS_CERTIFICATE)
<< get_defs(G_TYPE_TLS_CLIENT_CONNECTION)