[glibmm] Gio: Add TcpWrapperConnection.



commit 09de63af427ec0b9f3968d66ac3b8a89fa42eeef
Author: Murray Cumming <murrayc murrayc com>
Date:   Mon Feb 9 09:52:41 2015 +0100

    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

 gio/giomm.h                               |    1 +
 gio/src/filelist.am                       |    1 +
 gio/src/gio_signals.defs                  |   11 +++++++
 gio/src/tcpwrapperconnection.ccg          |   22 ++++++++++++++
 gio/src/tcpwrapperconnection.hg           |   46 +++++++++++++++++++++++++++++
 tools/extra_defs_gen/generate_defs_gio.cc |    1 +
 6 files changed, 82 insertions(+), 0 deletions(-)
---
diff --git a/gio/giomm.h b/gio/giomm.h
index a618251..b6d07b0 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 17737fb..76a587f 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 232072f..d6ce021 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 0000000..58b9f17
--- /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 0000000..e5e214f
--- /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 7fb58f2..cec799a 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)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]