summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGian Mario Tagliaretti <gianmt@gnome.org>2009-06-20 19:23:25 +0200
committerGian Mario Tagliaretti <gianmt@gnome.org>2009-06-20 19:23:25 +0200
commitb270dc43f2cef5260b0bbc71356fd8e6a2b7f754 (patch)
treee76038376f3547932c502b0c6a5ac46f5d5d0a67
parent549313fc4886fa3deb31761de6f5400708165d86 (diff)
downloadpygobject-b270dc43f2cef5260b0bbc71356fd8e6a2b7f754.tar.gz
pygobject-b270dc43f2cef5260b0bbc71356fd8e6a2b7f754.tar.xz
pygobject-b270dc43f2cef5260b0bbc71356fd8e6a2b7f754.zip
Add docs for class gio.DataOutputStream
-rw-r--r--docs/Makefile.am2
-rw-r--r--docs/reference/pygio-classes.xml1
-rw-r--r--docs/reference/pygio-dataoutputstream.xml504
3 files changed, 507 insertions, 0 deletions
diff --git a/docs/Makefile.am b/docs/Makefile.am
index 02bd5d1..b9adbb1 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -23,6 +23,7 @@ HTML_FILES = \
html/class-giobufferedoutputstream.html \
html/class-giocancellable.html \
html/class-giodatainputstream.html \
+ html/class-giodataoutputstream.html \
html/class-giodrive.html \
html/class-gioemblem.html \
html/class-gioemblemedicon.html \
@@ -83,6 +84,7 @@ XML_FILES = \
reference/pygio-bufferedoutputstream.xml \
reference/pygio-cancellable.xml \
reference/pygio-datainputstream.xml \
+ reference/pygio-dataoutputstream.xml \
reference/pygio-drive.xml \
reference/pygio-emblem.xml \
reference/pygio-emblemedicon.xml \
diff --git a/docs/reference/pygio-classes.xml b/docs/reference/pygio-classes.xml
index 59e5168..57c0390 100644
--- a/docs/reference/pygio-classes.xml
+++ b/docs/reference/pygio-classes.xml
@@ -14,6 +14,7 @@
<xi:include href="pygio-bufferedoutputstream.xml"/>
<xi:include href="pygio-cancellable.xml"/>
<xi:include href="pygio-datainputstream.xml"/>
+<xi:include href="pygio-dataoutputstream.xml"/>
<xi:include href="pygio-drive.xml"/>
<xi:include href="pygio-emblem.xml"/>
<xi:include href="pygio-emblemedicon.xml"/>
diff --git a/docs/reference/pygio-dataoutputstream.xml b/docs/reference/pygio-dataoutputstream.xml
new file mode 100644
index 0000000..4cbc904
--- /dev/null
+++ b/docs/reference/pygio-dataoutputstream.xml
@@ -0,0 +1,504 @@
+<?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-giodataoutputstream">
+ <refnamediv>
+ <refname>gio.DataOutputStream</refname>
+ <refpurpose>Data Output Stream</refpurpose>
+ </refnamediv>
+
+ <refsect1>
+ <title>Synopsis</title>
+
+ <classsynopsis language="python">
+ <ooclass><classname>gio.DataOutputStream</classname></ooclass>
+ <ooclass><classname><link linkend="class-giobufferedoutputstream">gio.BufferedOutputStream</link></classname></ooclass>
+
+ <constructorsynopsis language="python">
+ <methodname><link linkend="constructor-giodataoutputstream">gio.DataOutputStream</link></methodname>
+ <methodparam><parameter role="keyword">base_stream</parameter></methodparam>
+ </constructorsynopsis>
+
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giodataoutputstream--get-byte-order">get_byte_order</link></methodname>
+ <methodparam></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giodataoutputstream--put-byte">put_byte</link></methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giodataoutputstream--put-int16">put_int16</link></methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giodataoutputstream--put-int32">put_int32</link></methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giodataoutputstream--put-int64">put_int64</link></methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giodataoutputstream--put-string">put_string</link></methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giodataoutputstream--put-uint16">put_uint16</link></methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giodataoutputstream--put-uint32">put_uint32</link></methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giodataoutputstream--put-uint64">put_uint64</link></methodname>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis>
+ <methodsynopsis language="python">
+ <methodname><link linkend="method-giodataoutputstream--set-byte-order">set_byte_order</link></methodname>
+ <methodparam><parameter role="keyword">order</parameter></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-giofilteroutputstream">gio.FilterOutputStream</link>
+ +-- <link linkend="class-giobufferedoutputstream">gio.BufferedOutputStream</link>
+ +-- <link linkend="class-giodataoutputstream">gio.DataOutputStream</link>
+</synopsis>
+
+ </refsect1>
+
+ <refsect1 id="properties-giodataoutputstream">
+ <title>gio.DataOutputStream Properties</title>
+
+ <blockquote role="properties">
+ <informaltable pgwide="1" frame="none">
+ <tgroup cols="3">
+ <colspec column="1" colwidth="1in"/>
+ <colspec column="2" colwidth="1in"/>
+ <colspec column="3" colwidth="4in"/>
+ <tbody>
+ <row valign="top">
+ <entry>"byte-order"</entry>
+ <entry>Read - Write</entry>
+ <entry>Determines the byte ordering that is used when writing
+ multi-byte entities (such as integers) to the stream.
+ Default value: gio.DATA_STREAM_BYTE_ORDER_BIG_ENDIAN.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </blockquote>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para>
+ <link linkend="class-giodataoutputstream"><classname>gio.DataOutputStream</classname></link>
+ implements <link linkend="class-gioinputstream"><classname>gio.InputStream</classname></link>
+ and includes functions for writing data directly to an output stream.
+ </para>
+ </refsect1>
+
+ <refsect1 id="constructor-giodataoutputstream">
+ <title>Constructor</title>
+
+ <programlisting><constructorsynopsis language="python">
+ <methodname>gio.DataOutputStream</methodname>
+ <methodparam><parameter role="keyword">base_stream</parameter></methodparam>
+ </constructorsynopsis></programlisting>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>base_stream</parameter>&nbsp;:</term>
+ <listitem><simpara>a
+ <link linkend="class-giooutputstream"><classname>gio.OutputStream</classname></link>.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>a new
+ <link linkend="class-giodataoutputstream"><classname>gio.DataOutputStream</classname></link>
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ Creates a new <link linkend="class-giodataoutputstream"><classname>gio.DataOutputStream</classname></link>
+ from the given base_stream.
+ </para>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Methods</title>
+
+ <refsect2 id="method-giodataoutputstream--get-byte-order">
+ <title>gio.DataOutputStream.get_byte_order</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>get_byte_order</methodname>
+ <methodparam></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara>the stream's current
+ <xref linkend="gio-data-stream-byte-order-constants" endterm="gio-data-stream-byte-order-constants-title"></xref>.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>get_byte_order</methodname>() method gets the byte
+ order for the stream.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giodataoutputstream--put-byte">
+ <title>gio.DataOutputStream.put_byte</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>put_byte</methodname>
+ <methodparam><parameter role="keyword">data</parameter></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">data</parameter>&nbsp;:</term>
+ <listitem><simpara>a char.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if data was successfully added to the stream.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>put_byte</methodname>() method puts a byte into the output stream.
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled by
+ triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giodataoutputstream--put-int16">
+ <title>gio.DataOutputStream.put_int16</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>put_int16</methodname>
+ <methodparam><parameter role="keyword">data</parameter></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">data</parameter>&nbsp;:</term>
+ <listitem><simpara>a gint16.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if data was successfully added to the stream.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>put_int16</methodname>() method puts a signed 16-bit integer into the output stream.
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled by
+ triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giodataoutputstream--put-int32">
+ <title>gio.DataOutputStream.put_int32</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>put_int32</methodname>
+ <methodparam><parameter role="keyword">data</parameter></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">data</parameter>&nbsp;:</term>
+ <listitem><simpara>a gint32.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if data was successfully added to the stream.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>put_int32</methodname>() method puts a signed 32-bit integer into the output stream.
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled by
+ triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giodataoutputstream--put-int64">
+ <title>gio.DataOutputStream.put_int64</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>put_int64</methodname>
+ <methodparam><parameter role="keyword">data</parameter></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">data</parameter>&nbsp;:</term>
+ <listitem><simpara>a gint64.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if data was successfully added to the stream.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>put_int64</methodname>() method puts a signed 64-bit integer into the output stream.
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled by
+ triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giodataoutputstream--put-string">
+ <title>gio.DataOutputStream.put_string</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>put_string</methodname>
+ <methodparam><parameter role="keyword">str</parameter></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">str</parameter>&nbsp;:</term>
+ <listitem><simpara>a string.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if string was successfully added to the stream.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>put_string</methodname>() method puts a string into the output stream.
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled by
+ triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giodataoutputstream--put-uint16">
+ <title>gio.DataOutputStream.put_uint16</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>put_uint16</methodname>
+ <methodparam><parameter role="keyword">data</parameter></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">data</parameter>&nbsp;:</term>
+ <listitem><simpara>a guint16.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if data was successfully added to the stream.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>put_uint16</methodname>() method puts an unsigned 16-bit integer into the output stream.
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled by
+ triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giodataoutputstream--put-uint32">
+ <title>gio.DataOutputStream.put_uint32</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>put_uint32</methodname>
+ <methodparam><parameter role="keyword">data</parameter></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">data</parameter>&nbsp;:</term>
+ <listitem><simpara>a guint32.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if data was successfully added to the stream.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>put_uint32</methodname>() method puts an unsigned 32-bit integer into the output stream.
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled by
+ triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giodataoutputstream--put-uint64">
+ <title>gio.DataOutputStream.put_uint64</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>put_uint64</methodname>
+ <methodparam><parameter role="keyword">data</parameter></methodparam>
+ <methodparam><parameter role="keyword">cancellable</parameter><initializer>None</initializer></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">data</parameter>&nbsp;:</term>
+ <listitem><simpara>a guint64.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter role="keyword">cancellable</parameter>&nbsp;:</term>
+ <listitem><simpara>optional
+ <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
+ object, <literal>None</literal> to ignore.
+ </simpara></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis>Returns</emphasis>&nbsp;:</term>
+ <listitem><simpara><literal>True</literal> if data was successfully added to the stream.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>put_uint64</methodname>() method puts an unsigned 64-bit integer into the output stream.
+ </para>
+ <para>
+ If cancellable is not <literal>None</literal>, then the operation can be cancelled by
+ triggering the cancellable object from another thread. If the operation was cancelled,
+ the error gio.ERROR_CANCELLED will be returned.
+ </para>
+ </refsect2>
+
+ <refsect2 id="method-giodataoutputstream--set-byte-order">
+ <title>gio.DataOutputStream.set_byte_order</title>
+
+ <programlisting><methodsynopsis language="python">
+ <methodname>set_byte_order</methodname>
+ <methodparam><parameter role="keyword">order</parameter></methodparam>
+ </methodsynopsis></programlisting>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter role="keyword">order</parameter>&nbsp;:</term>
+ <listitem><simpara>a
+ <xref linkend="gio-data-stream-byte-order-constants" endterm="gio-data-stream-byte-order-constants-title"></xref> to set.
+ </simpara></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The <methodname>set_byte_order</methodname>() method sets the byte order for
+ the given stream. All subsequent reads from the stream will be read in the given order.
+ </para>
+ </refsect2>
+ </refsect1>
+</refentry>