[pygobject] Add docs for gio.MemoryOutputStream



commit 3666f75af4ef2c8e038116aee5afada59d59f689
Author: Gian Mario Tagliaretti <gianmt gnome org>
Date:   Mon Jun 8 14:20:02 2009 +0200

    Add docs for gio.MemoryOutputStream
---
 docs/Makefile.am                            |    2 +
 docs/reference/pygio-classes.xml            |    1 +
 docs/reference/pygio-memoryoutputstream.xml |  175 +++++++++++++++++++++++++++
 3 files changed, 178 insertions(+), 0 deletions(-)

diff --git a/docs/Makefile.am b/docs/Makefile.am
index 46bdc12..d32d4e9 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -37,6 +37,7 @@ HTML_FILES =					\
 	html/class-gioinputstream.html		\
 	html/class-gioloadableicon.html		\
 	html/class-giomemoryinputstream.html	\
+	html/class-giomemoryoutputstream.html	\
 	html/class-giomount.html		\
 	html/class-giomountoperation.html	\
 	html/class-giooutputstream.html		\
@@ -93,6 +94,7 @@ XML_FILES = 					\
 	reference/pygio-inputstream.xml		\
 	reference/pygio-loadableicon.xml	\
 	reference/pygio-memoryinputstream.xml 	\
+	reference/pygio-memoryoutputstream.xml 	\
 	reference/pygio-mount.xml		\
 	reference/pygio-mountoperation.xml	\
 	reference/pygio-outputstream.xml	\
diff --git a/docs/reference/pygio-classes.xml b/docs/reference/pygio-classes.xml
index 8e5b191..f14c592 100644
--- a/docs/reference/pygio-classes.xml
+++ b/docs/reference/pygio-classes.xml
@@ -28,6 +28,7 @@
 <xi:include href="pygio-inputstream.xml"/>
 <xi:include href="pygio-loadableicon.xml"/>
 <xi:include href="pygio-memoryinputstream.xml"/>
+<xi:include href="pygio-memoryoutputstream.xml"/>
 <xi:include href="pygio-mount.xml"/>
 <xi:include href="pygio-mountoperation.xml"/>
 <xi:include href="pygio-outputstream.xml"/>
diff --git a/docs/reference/pygio-memoryoutputstream.xml b/docs/reference/pygio-memoryoutputstream.xml
new file mode 100644
index 0000000..f044496
--- /dev/null
+++ b/docs/reference/pygio-memoryoutputstream.xml
@@ -0,0 +1,175 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd";>
+
+<refentry id="class-giomemoryoutputstream">
+    <refnamediv>
+        <refname>gio.MemoryOutputStream</refname>
+        <refpurpose>Streaming output operations on memory chunks</refpurpose>
+    </refnamediv>
+
+    <refsect1>
+        <title>Synopsis</title>
+
+    <classsynopsis language="python">
+        <ooclass><classname>gio.MemoryOutputStream</classname></ooclass>
+        <ooclass><classname><link linkend="class-giooutputstream">gio.OutputStream</link></classname></ooclass>
+    
+    <constructorsynopsis language="python">
+	<methodname><link linkend="constructor-giomemoryoutputstream">gio.MemoryOutputStream</link></methodname>
+	<methodparam></methodparam>
+    </constructorsynopsis>
+    
+
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giomemoryoutputstream--get-contents">get_contents</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giomemoryoutputstream--get-data-size">get_data_size</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+    <methodsynopsis language="python">
+        <methodname><link linkend="method-giomemoryoutputstream--get-size">get_size</link></methodname>
+        <methodparam></methodparam>
+    </methodsynopsis>
+
+    </classsynopsis>
+
+    </refsect1>
+
+    <refsect1>
+        <title>Ancestry</title>
+
+<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+  +-- <link linkend="class-giooutputstream">gio.OutputStream</link>
+    +-- <link linkend="class-giomemoryoutputstream">gio.MemoryOutputStream</link>
+</synopsis>
+
+    </refsect1>
+    
+    <refsect1>
+	<title>Implemented Interfaces</title>
+        <para>
+            <link linkend="class-giomemoryoutputstream"><classname>gio.MemoryOutputStream</classname></link>
+            implements
+            <link linkend="class-gioseekable"><classname>gio.Seekable</classname></link>
+        </para>
+    </refsect1>
+
+    <refsect1>
+        <title>Description</title>
+
+        <para>
+            <link linkend="class-giomemoryoutputstream"><classname>gio.MemoryOutputStream</classname></link>
+            is a class for using arbitrary memory chunks as output for GIO streaming output operations.
+        </para>
+    </refsect1>
+
+    <refsect1 id="constructor-giomemoryoutputstream">
+        <title>Constructor</title>
+  
+        <programlisting><constructorsynopsis language="python">
+            <methodname>gio.MemoryOutputStream</methodname>
+            <methodparam></methodparam>
+        </constructorsynopsis></programlisting>
+        <variablelist>
+            <varlistentry>
+                <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                <listitem><simpara>a new
+                <link linkend="class-giomemoryoutputstream"><classname>gio.MemoryOutputStream</classname></link>.
+                </simpara></listitem>
+            </varlistentry>
+        </variablelist>
+    
+        <para>
+            Creates a new
+            <link linkend="class-giomemoryoutputstream"><classname>gio.MemoryOutputStream</classname></link>.
+        </para>
+  
+    </refsect1>
+
+    <refsect1>
+        <title>Methods</title>
+
+        <refsect2 id="method-giomemoryoutputstream--get-contents">
+            <title>gio.MemoryOutputStream.get_contents</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_contents</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>the stream's data
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_contents</methodname>() method gets any loaded data
+                from the ostream.
+            </para>
+            <para>
+                Note that the returned data may become invalid on the next write or truncate
+                operation on the stream.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giomemoryoutputstream--get-data-size">
+            <title>gio.MemoryOutputStream.get_data_size</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_data_size</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>the number of bytes written to the stream
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_data_size</methodname>() method returns the number
+                of bytes from the start up to including the last byte written in the
+                stream that has not been truncated away.
+            </para>
+        </refsect2>
+
+        <refsect2 id="method-giomemoryoutputstream--get-size">
+            <title>gio.MemoryOutputStream.get_size</title>
+
+            <programlisting><methodsynopsis language="python">
+                <methodname>get_size</methodname>
+                <methodparam></methodparam>
+            </methodsynopsis></programlisting>
+            
+            <variablelist>
+                <varlistentry>
+                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
+                    <listitem><simpara>the number of bytes allocated for the data buffer
+                    </simpara></listitem>
+                </varlistentry>
+            </variablelist>
+    
+            <para>
+                The <methodname>get_size</methodname>() method gets the size of the
+                currently allocated data area (availible from
+                <methodname><link linkend="method-giomemoryoutputstream--get-contents">gio.MemoryOutputStream.get_contents</link></methodname>()
+                ).
+            </para>
+            <para>
+                Note that for growable streams the returned size may become invalid on the next write or truncate operation on the stream.
+            </para>
+            <para>
+                If you want the number of bytes currently written to the stream, use
+                <methodname><link linkend="method-giomemoryoutputstream--get-data-size">gio.MemoryOutputStream.get_data_size</link></methodname>().
+            </para>
+        </refsect2>
+    </refsect1>
+</refentry>



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