[glibmm] Wrap some vfuncs in giomm streams



commit 990b15acae0e9f0288a1cefdc72b70b0e87b7c0f
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date:   Mon Nov 21 16:26:18 2016 +0100

    Wrap some vfuncs in giomm streams
    
    * gio/src/bufferedinputstream.hg: Add fill_vfunc().
    * gio/src/inputstream.hg: Add read_vfunc(), skip_vfunc(), close_vfunc().
    * gio/src/outputstream.hg: Add write_vfunc(), splice_vfunc(),
    flush_vfunc(), close_vfunc().
    An updated version of a patch by Krzysztof KosiƄski <tweenk pl gmail com>
    Bug #572471

 gio/src/bufferedinputstream.hg |    3 +--
 gio/src/inputstream.hg         |    7 +++----
 gio/src/outputstream.hg        |    9 ++++-----
 3 files changed, 8 insertions(+), 11 deletions(-)
---
diff --git a/gio/src/bufferedinputstream.hg b/gio/src/bufferedinputstream.hg
index 9661d1e..3894f95 100644
--- a/gio/src/bufferedinputstream.hg
+++ b/gio/src/bufferedinputstream.hg
@@ -107,9 +107,8 @@ public:
   _WRAP_PROPERTY("buffer-size", guint)
 
 protected:
-  //TODO: When we can break ABI, add vfunc. See https://bugzilla.gnome.org/show_bug.cgi?id=572471
 #m4 _CONVERSION(`GCancellable*', `const Glib::RefPtr<Cancellable>&', `Glib::wrap($3, true)')
-  //_WRAP_VFUNC(gssize fill(gssize count, const Glib::RefPtr<Cancellable>& cancellable), fill, errthrow, 
err_return_value -1)
+  _WRAP_VFUNC(gssize fill(gssize count, const Glib::RefPtr<Cancellable>& cancellable), fill, errthrow, 
err_return_value -1)
 };
 
 } // namespace Gio
diff --git a/gio/src/inputstream.hg b/gio/src/inputstream.hg
index b98da27..315ed86 100644
--- a/gio/src/inputstream.hg
+++ b/gio/src/inputstream.hg
@@ -390,11 +390,10 @@ protected:
   _WRAP_METHOD(bool set_pending(), g_input_stream_set_pending, errthrow, newin "2,50")
   _WRAP_METHOD(void clear_pending(), g_input_stream_clear_pending, newin "2,50")
 
-  //TODO: When we can break ABI, add vfuncs. See https://bugzilla.gnome.org/show_bug.cgi?id=572471
 #m4 _CONVERSION(`GCancellable*', `const Glib::RefPtr<Cancellable>&', `Glib::wrap($3, true)')
-  //_WRAP_VFUNC(gssize read(void* buffer, gsize count, const Glib::RefPtr<Cancellable>& cancellable), 
read_fn, errthrow, err_return_value -1)
-  //_WRAP_VFUNC(gssize skip(gsize count, const Glib::RefPtr<Cancellable>& cancellable), skip, errthrow, 
err_return_value -1)
-  //_WRAP_VFUNC(bool close(const Glib::RefPtr<Cancellable>& cancellable), close_fn, errthrow)
+  _WRAP_VFUNC(gssize read(void* buffer, gsize count, const Glib::RefPtr<Cancellable>& cancellable), read_fn, 
errthrow, err_return_value -1)
+  _WRAP_VFUNC(gssize skip(gsize count, const Glib::RefPtr<Cancellable>& cancellable), skip, errthrow, 
err_return_value -1)
+  _WRAP_VFUNC(bool close(const Glib::RefPtr<Cancellable>& cancellable), close_fn, errthrow)
 };
 
 } // namespace Gio
diff --git a/gio/src/outputstream.hg b/gio/src/outputstream.hg
index d1e3f41..8b0c938 100644
--- a/gio/src/outputstream.hg
+++ b/gio/src/outputstream.hg
@@ -503,13 +503,12 @@ protected:
   _WRAP_METHOD(bool set_pending(), g_output_stream_set_pending, errthrow, newin "2,50")
   _WRAP_METHOD(void clear_pending(), g_output_stream_clear_pending, newin "2,50")
 
-  //TODO: When we can break ABI, add vfuncs. See https://bugzilla.gnome.org/show_bug.cgi?id=572471
 #m4 _CONVERSION(`GCancellable*', `const Glib::RefPtr<Cancellable>&', `Glib::wrap($3, true)')
 #m4 _CONVERSION(`GInputStream*', `const Glib::RefPtr<InputStream>&', `Glib::wrap($3, true)')
-  //_WRAP_VFUNC(gssize write(const void* buffer, gsize count, const Glib::RefPtr<Cancellable>& cancellable), 
write_fn, errthrow, err_return_value -1)
-  //_WRAP_VFUNC(gssize splice(const Glib::RefPtr<InputStream>& source, const Glib::RefPtr<Cancellable>& 
cancellable{.}, OutputStreamSpliceFlags flags{.}), splice, errthrow, err_return_value -1)
-  //_WRAP_VFUNC(bool flush(const Glib::RefPtr<Cancellable>& cancellable), flush, errthrow)
-  //_WRAP_VFUNC(bool close(const Glib::RefPtr<Cancellable>& cancellable), close_fn, errthrow)
+  _WRAP_VFUNC(gssize write(const void* buffer, gsize count, const Glib::RefPtr<Cancellable>& cancellable), 
write_fn, errthrow, err_return_value -1)
+  _WRAP_VFUNC(gssize splice(const Glib::RefPtr<InputStream>& source, const Glib::RefPtr<Cancellable>& 
cancellable{.}, OutputStreamSpliceFlags flags{.}), splice, errthrow, err_return_value -1)
+  _WRAP_VFUNC(bool flush(const Glib::RefPtr<Cancellable>& cancellable), flush, errthrow)
+  _WRAP_VFUNC(bool close(const Glib::RefPtr<Cancellable>& cancellable), close_fn, errthrow)
 };
 
 } // namespace Gio


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