[glibmm] MemoryOutputStream: Add the steal_as_bytes() method.



commit 822f16310bed041d09cec019235e73b7d5f3e315
Author: Josà Alburquerque <jaalburqu svn gnome org>
Date:   Tue Nov 6 15:45:10 2012 -0500

    MemoryOutputStream: Add the steal_as_bytes() method.
    
    	* gio/src/memoryoutputstream.{ccg,hg}: Add the method that wraps the
    	corresponding C function.

 ChangeLog                      |    7 +++++++
 gio/src/memoryoutputstream.ccg |    1 +
 gio/src/memoryoutputstream.hg  |   10 ++++++++++
 3 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 6c74817..e254e4e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2012-11-06  Josà Alburquerque  <jaalburquerque gmail com>
 
+	MemoryOutputStream: Add the steal_as_bytes() method.
+
+	* gio/src/memoryoutputstream.{ccg,hg}: Add the method that wraps the
+	corresponding C function.
+
+2012-11-06  Josà Alburquerque  <jaalburquerque gmail com>
+
 	AppInfo: Add create_duplicate().
 
 	* gio/src/appinfo.{hg,ccg}: Add the new method (which creates a
diff --git a/gio/src/memoryoutputstream.ccg b/gio/src/memoryoutputstream.ccg
index 40517b7..028f74e 100644
--- a/gio/src/memoryoutputstream.ccg
+++ b/gio/src/memoryoutputstream.ccg
@@ -18,3 +18,4 @@
  */
 
 #include <gio/gio.h>
+#include <glibmm/bytes.h>
diff --git a/gio/src/memoryoutputstream.hg b/gio/src/memoryoutputstream.hg
index 24147e3..bb6cccb 100644
--- a/gio/src/memoryoutputstream.hg
+++ b/gio/src/memoryoutputstream.hg
@@ -26,6 +26,14 @@
 _DEFS(giomm,gio)
 _PINCLUDE(giomm/private/outputstream_p.h)
 
+namespace Glib
+{
+
+// Forward declaration.
+class Bytes;
+
+}
+
 namespace Gio
 {
 
@@ -58,6 +66,8 @@ public:
   _WRAP_METHOD(gsize get_size() const, g_memory_output_stream_get_size)
   _WRAP_METHOD(gsize get_data_size() const, g_memory_output_stream_get_data_size)
 
+  _WRAP_METHOD(Glib::RefPtr<Glib::Bytes> steal_as_bytes(), g_memory_output_stream_steal_as_bytes)
+
   _WRAP_PROPERTY("data", void*)
   _WRAP_PROPERTY("data-size", gulong)
   //Too C-like:   _WRAP_PROPERTY("destroy-function", void*)



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