[glibmm] Gio::Pollable[Input|Output]Stream: More implementations



commit 88a6ad60884be29a2224f3d50312d348bc78e753
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date:   Fri Jun 23 09:25:29 2017 +0200

    Gio::Pollable[Input|Output]Stream: More implementations
    
    * gio/src/memoryinputstream.hg: Implement PollableInputStream.
    * gio/src/memoryoutputstream.hg: Implement PollableOutputStream.
    * gio/src/unixinputstream.hg: Implement PollableInputStream and
    FileDescriptorBased.
    * gio/src/unixoutputstream.hg: Implement PollableOutputStream and
    FileDescriptorBased.

 gio/src/memoryinputstream.hg  |    5 ++++-
 gio/src/memoryoutputstream.hg |    5 ++++-
 gio/src/unixinputstream.hg    |    9 ++++++---
 gio/src/unixoutputstream.hg   |    9 ++++++---
 4 files changed, 20 insertions(+), 8 deletions(-)
---
diff --git a/gio/src/memoryinputstream.hg b/gio/src/memoryinputstream.hg
index 156ab09..5a918fd 100644
--- a/gio/src/memoryinputstream.hg
+++ b/gio/src/memoryinputstream.hg
@@ -19,6 +19,7 @@ _CONFIGINCLUDE(giommconfig.h)
 
 #include <giomm/inputstream.h>
 #include <giomm/seekable.h>
+#include <giomm/pollableinputstream.h>
 
 _DEFS(giomm,gio)
 _PINCLUDE(giomm/private/inputstream_p.h)
@@ -34,10 +35,12 @@ namespace Gio
  */
 class MemoryInputStream
 : public Gio::InputStream,
-  public Seekable
+  public Seekable,
+  public PollableInputStream
 {
   _CLASS_GOBJECT(MemoryInputStream, GMemoryInputStream, G_MEMORY_INPUT_STREAM, Gio::InputStream, 
GInputStream)
   _IMPLEMENTS_INTERFACE(Seekable)
+  _IMPLEMENTS_INTERFACE(PollableInputStream)
 
 protected:
   _CTOR_DEFAULT
diff --git a/gio/src/memoryoutputstream.hg b/gio/src/memoryoutputstream.hg
index 4b1048b..6768615 100644
--- a/gio/src/memoryoutputstream.hg
+++ b/gio/src/memoryoutputstream.hg
@@ -17,6 +17,7 @@
 
 #include <giomm/outputstream.h>
 #include <giomm/seekable.h>
+#include <giomm/pollableoutputstream.h>
 #include <glibmm/object.h>
 // TODO: remove this if possible -- it's here for the GReallocFunc definition
 #include <gio/gio.h>
@@ -45,10 +46,12 @@ namespace Gio
  */
 class MemoryOutputStream :
     public OutputStream,
-    public Seekable
+    public Seekable,
+    public PollableOutputStream
 {
   _CLASS_GOBJECT(MemoryOutputStream, GMemoryOutputStream, G_MEMORY_OUTPUT_STREAM, Gio::OutputStream, 
GOutputStream)
   _IMPLEMENTS_INTERFACE(Seekable)
+  _IMPLEMENTS_INTERFACE(PollableOutputStream)
 
 protected:
   // Hand-coded because it's equivalent to g_memory_output_stream_new_resizable(),
diff --git a/gio/src/unixinputstream.hg b/gio/src/unixinputstream.hg
index afb5111..f7c71fb 100644
--- a/gio/src/unixinputstream.hg
+++ b/gio/src/unixinputstream.hg
@@ -1,5 +1,3 @@
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
 /* Copyright (C) 2007 The gtkmm Development Team
  *
  * This library is free software; you can redistribute it and/or
@@ -18,6 +16,8 @@
  */
 
 #include <giomm/inputstream.h>
+#include <giomm/pollableinputstream.h>
+#include <giomm/filedescriptorbased.h>
 
 _DEFS(giomm,gio)
 _PINCLUDE(giomm/private/inputstream_p.h)
@@ -34,9 +34,12 @@ namespace Gio
  *
  * @newin{2,16}
  */
-class UnixInputStream : public Gio::InputStream
+class UnixInputStream
+: public Gio::InputStream, public PollableInputStream, public FileDescriptorBased
 {
   _CLASS_GOBJECT(UnixInputStream, GUnixInputStream, G_UNIX_INPUT_STREAM, Gio::InputStream, GInputStream)
+  _IMPLEMENTS_INTERFACE(PollableInputStream)
+  _IMPLEMENTS_INTERFACE(FileDescriptorBased)
   _GTKMMPROC_WIN32_NO_WRAP
 
 protected:
diff --git a/gio/src/unixoutputstream.hg b/gio/src/unixoutputstream.hg
index 3b98cc4..fc3f1e3 100644
--- a/gio/src/unixoutputstream.hg
+++ b/gio/src/unixoutputstream.hg
@@ -1,5 +1,3 @@
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
 /* Copyright (C) 2007 The gtkmm Development Team
  *
  * This library is free software; you can redistribute it and/or
@@ -18,6 +16,8 @@
  */
 
 #include <giomm/outputstream.h>
+#include <giomm/pollableoutputstream.h>
+#include <giomm/filedescriptorbased.h>
 
 _DEFS(giomm,gio)
 _PINCLUDE(giomm/private/outputstream_p.h)
@@ -33,9 +33,12 @@ namespace Gio
  *
  * @newin{2,16}
  */
-class UnixOutputStream : public Gio::OutputStream
+class UnixOutputStream
+: public Gio::OutputStream, public PollableOutputStream, public FileDescriptorBased
 {
   _CLASS_GOBJECT(UnixOutputStream, GUnixOutputStream, G_UNIX_OUTPUT_STREAM, Gio::OutputStream, GOutputStream)
+  _IMPLEMENTS_INTERFACE(PollableOutputStream)
+  _IMPLEMENTS_INTERFACE(FileDescriptorBased)
   _GTKMMPROC_WIN32_NO_WRAP
 
 protected:


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