glibmm r570 - in trunk: . gio gio/giomm gio/src
- From: jjongsma svn gnome org
- To: svn-commits-list gnome org
- Subject: glibmm r570 - in trunk: . gio gio/giomm gio/src
- Date: Sun, 3 Feb 2008 04:40:09 +0000 (GMT)
Author: jjongsma
Date: Sun Feb 3 04:40:09 2008
New Revision: 570
URL: http://svn.gnome.org/viewvc/glibmm?rev=570&view=rev
Log:
* gio/giomm.h:
* gio/src/Makefile_list_of_hg.am_fragment:
* gio/src/memoryinputstream.ccg:
* gio/src/memoryinputstream.hg: add MemoryInputStream class
Added:
trunk/gio/src/memoryinputstream.ccg
trunk/gio/src/memoryinputstream.hg
Modified:
trunk/ChangeLog
trunk/gio/giomm/ (props changed)
trunk/gio/giomm.h
trunk/gio/src/Makefile_list_of_hg.am_fragment
Modified: trunk/gio/giomm.h
==============================================================================
--- trunk/gio/giomm.h (original)
+++ trunk/gio/giomm.h Sun Feb 3 04:40:09 2008
@@ -44,6 +44,7 @@
#include <giomm/init.h>
#include <giomm/inputstream.h>
#include <giomm/loadableicon.h>
+#include <giomm/memoryinputstream.h>
#include <giomm/mount.h>
#include <giomm/mountoperation.h>
#include <giomm/outputstream.h>
Modified: trunk/gio/src/Makefile_list_of_hg.am_fragment
==============================================================================
--- trunk/gio/src/Makefile_list_of_hg.am_fragment (original)
+++ trunk/gio/src/Makefile_list_of_hg.am_fragment Sun Feb 3 04:40:09 2008
@@ -10,7 +10,8 @@
filemonitor.hg filterinputstream.hg filteroutputstream.hg \
icon.hg inputstream.hg loadableicon.hg mount.hg mountoperation.hg outputstream.hg \
seekable.hg simpleasyncresult.hg volume.hg volumemonitor.hg bufferedinputstream.hg \
- bufferedoutputstream.hg datainputstream.hg dataoutputstream.hg enums.hg
+ bufferedoutputstream.hg datainputstream.hg dataoutputstream.hg enums.hg \
+ memoryinputstream.hg
include $(top_srcdir)/build_shared/Makefile_build_gensrc.am_fragment
Added: trunk/gio/src/memoryinputstream.ccg
==============================================================================
--- (empty file)
+++ trunk/gio/src/memoryinputstream.ccg Sun Feb 3 04:40:09 2008
@@ -0,0 +1,30 @@
+// -*- 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
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 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
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library 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
+{
+
+ void MemoryInputStream::add_data(const std::string& data)
+ {
+ g_memory_input_stream_add_data(gobj(), data.c_str(), data.size(), NULL);
+ }
+
+} // namespace Gio
Added: trunk/gio/src/memoryinputstream.hg
==============================================================================
--- (empty file)
+++ trunk/gio/src/memoryinputstream.hg Sun Feb 3 04:40:09 2008
@@ -0,0 +1,52 @@
+// -*- 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
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 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
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library 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/inputstream.h>
+#include <giomm/seekable.h>
+
+_DEFS(giomm,gio)
+_PINCLUDE(giomm/private/inputstream_p.h)
+
+namespace Gio
+{
+
+/** MemoryInputStream implements InputStream for arbitrary memory chunks
+ *
+ * @newin2p16
+ */
+class MemoryInputStream
+: public Gio::InputStream,
+ public Seekable
+{
+ _CLASS_GOBJECT(MemoryInputStream, GMemoryInputStream, G_MEMORY_INPUT_STREAM, Gio::InputStream, GInputStream)
+ _IMPLEMENTS_INTERFACE(Seekable)
+
+protected:
+ _CTOR_DEFAULT
+ // TODO: *_new_from_data constructor needs to be fixed?
+
+public:
+ _WRAP_CREATE()
+
+ void add_data(const std::string& data);
+
+};
+
+} // namespace Gio
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]