"Initial commit to Gerrit"
[profile/ivi/libgsf.git] / doc / html / gsf-Input-from-unstructured-files.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>Input from unstructured files</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
7 <link rel="home" href="index.html" title="GSF Reference Manual">
8 <link rel="up" href="io.html" title="Basic Input/Output">
9 <link rel="prev" href="io.html" title="Basic Input/Output">
10 <link rel="next" href="gsf-Output-to-unstructured-files.html" title="Output to unstructured files">
11 <meta name="generator" content="GTK-Doc V1.14 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
13 </head>
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
16 <tr valign="middle">
17 <td><a accesskey="p" href="io.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18 <td><a accesskey="u" href="io.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20 <th width="100%" align="center">GSF Reference Manual</th>
21 <td><a accesskey="n" href="gsf-Output-to-unstructured-files.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
22 </tr>
23 <tr><td colspan="5" class="shortcuts">
24 <a href="#gsf-Input-from-unstructured-files.synopsis" class="shortcut">Top</a>
25                    | 
26                   <a href="#gsf-Input-from-unstructured-files.description" class="shortcut">Description</a>
27                    | 
28                   <a href="#gsf-Input-from-unstructured-files.object-hierarchy" class="shortcut">Object Hierarchy</a>
29                    | 
30                   <a href="#gsf-Input-from-unstructured-files.properties" class="shortcut">Properties</a>
31 </td></tr>
32 </table>
33 <div class="refentry" title="Input from unstructured files">
34 <a name="gsf-Input-from-unstructured-files"></a><div class="titlepage"></div>
35 <div class="refnamediv"><table width="100%"><tr>
36 <td valign="top">
37 <h2><span class="refentrytitle"><a name="gsf-Input-from-unstructured-files.top_of_page"></a>Input from unstructured files</span></h2>
38 <p>Input from unstructured files</p>
39 </td>
40 <td valign="top" align="right"></td>
41 </tr></table></div>
42 <div class="refsynopsisdiv" title="Synopsis">
43 <a name="gsf-Input-from-unstructured-files.synopsis"></a><h2>Synopsis</h2>
44 <a name="GsfInput"></a><a name="GsfInputProxy"></a><pre class="synopsis">                    <a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput-struct" title="GsfInput">GsfInput</a>;
45 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"><span class="returnvalue">guint8</span></a> const *      <a class="link" href="gsf-Input-from-unstructured-files.html#gsf-input-read" title="gsf_input_read ()">gsf_input_read</a>                      (<em class="parameter"><code><a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="type">GsfInput</span></a> *input</code></em>,
46                                                          <em class="parameter"><code><span class="type">size_t</span> num_bytes</code></em>,
47                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> *optional_buffer</code></em>);
48 <a class="link" href="gsf-utils.html#gsf-off-t" title="gsf_off_t"><span class="returnvalue">gsf_off_t</span></a>           <a class="link" href="gsf-Input-from-unstructured-files.html#gsf-input-tell" title="gsf_input_tell ()">gsf_input_tell</a>                      (<em class="parameter"><code><a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="type">GsfInput</span></a> *input</code></em>);
49 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gsf-Input-from-unstructured-files.html#gsf-input-seek" title="gsf_input_seek ()">gsf_input_seek</a>                      (<em class="parameter"><code><a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="type">GsfInput</span></a> *input</code></em>,
50                                                          <em class="parameter"><code><a class="link" href="gsf-utils.html#gsf-off-t" title="gsf_off_t"><span class="type">gsf_off_t</span></a> offset</code></em>,
51                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-IO-Channels.html#GSeekType"><span class="type">GSeekType</span></a> whence</code></em>);
52 <a class="link" href="gsf-Infile-reading-structed-files.html#GsfInfile"><span class="returnvalue">GsfInfile</span></a> *         <a class="link" href="gsf-Input-from-unstructured-files.html#gsf-input-container" title="gsf_input_container ()">gsf_input_container</a>                 (<em class="parameter"><code><a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="type">GsfInput</span></a> *input</code></em>);
53 <a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="returnvalue">GsfInput</span></a> *          <a class="link" href="gsf-Input-from-unstructured-files.html#gsf-input-dup" title="gsf_input_dup ()">gsf_input_dup</a>                       (<em class="parameter"><code><a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="type">GsfInput</span></a> *input</code></em>,
54                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **err</code></em>);
55 <a class="link" href="gsf-utils.html#gsf-off-t" title="gsf_off_t"><span class="returnvalue">gsf_off_t</span></a>           <a class="link" href="gsf-Input-from-unstructured-files.html#gsf-input-size" title="gsf_input_size ()">gsf_input_size</a>                      (<em class="parameter"><code><a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="type">GsfInput</span></a> *input</code></em>);
56 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gsf-Input-from-unstructured-files.html#gsf-input-eof" title="gsf_input_eof ()">gsf_input_eof</a>                       (<em class="parameter"><code><a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="type">GsfInput</span></a> *input</code></em>);
57 <a class="link" href="gsf-utils.html#gsf-off-t" title="gsf_off_t"><span class="returnvalue">gsf_off_t</span></a>           <a class="link" href="gsf-Input-from-unstructured-files.html#gsf-input-remaining" title="gsf_input_remaining ()">gsf_input_remaining</a>                 (<em class="parameter"><code><a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="type">GsfInput</span></a> *input</code></em>);
58 <a href="http://library.gnome.org/devel/glib/unstable/glib-Quarks.html#GQuark"><span class="returnvalue">GQuark</span></a>              <a class="link" href="gsf-Input-from-unstructured-files.html#gsf-input-error-id" title="gsf_input_error_id ()">gsf_input_error_id</a>                  (<em class="parameter"><code><span class="type">void</span></code></em>);
59 <a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="returnvalue">GsfInput</span></a> *          <a class="link" href="gsf-Input-from-unstructured-files.html#gsf-input-sibling" title="gsf_input_sibling ()">gsf_input_sibling</a>                   (<em class="parameter"><code><a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="type">GsfInput</span></a> const *input</code></em>,
60                                                          <em class="parameter"><code><span class="type">char</span> const *name</code></em>,
61                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **err</code></em>);
62 <a href="http://library.gnome.org/devel/glib/unstable/glib-Quarks.html#GQuark"><span class="returnvalue">GQuark</span></a>              <a class="link" href="gsf-Input-from-unstructured-files.html#gsf-input-error" title="gsf_input_error ()">gsf_input_error</a>                     (<em class="parameter"><code><span class="type">void</span></code></em>);
63 <span class="returnvalue">char</span> const   *      <a class="link" href="gsf-Input-from-unstructured-files.html#gsf-input-name" title="gsf_input_name ()">gsf_input_name</a>                      (<em class="parameter"><code><a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="type">GsfInput</span></a> *input</code></em>);
64 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gsf-Input-from-unstructured-files.html#gsf-input-set-name-from-filename" title="gsf_input_set_name_from_filename ()">gsf_input_set_name_from_filename</a>    (<em class="parameter"><code><a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="type">GsfInput</span></a> *input</code></em>,
65                                                          <em class="parameter"><code><span class="type">char</span> const *filename</code></em>);
66                     <a class="link" href="gsf-Input-from-unstructured-files.html#GsfInputProxy-struct" title="GsfInputProxy">GsfInputProxy</a>;
67 <a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="returnvalue">GsfInput</span></a> *          <a class="link" href="gsf-Input-from-unstructured-files.html#gsf-input-proxy-new" title="gsf_input_proxy_new ()">gsf_input_proxy_new</a>                 (<em class="parameter"><code><a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="type">GsfInput</span></a> *source</code></em>);
68 <a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="returnvalue">GsfInput</span></a> *          <a class="link" href="gsf-Input-from-unstructured-files.html#gsf-input-proxy-new-section" title="gsf_input_proxy_new_section ()">gsf_input_proxy_new_section</a>         (<em class="parameter"><code><a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="type">GsfInput</span></a> *source</code></em>,
69                                                          <em class="parameter"><code><a class="link" href="gsf-utils.html#gsf-off-t" title="gsf_off_t"><span class="type">gsf_off_t</span></a> offset</code></em>,
70                                                          <em class="parameter"><code><a class="link" href="gsf-utils.html#gsf-off-t" title="gsf_off_t"><span class="type">gsf_off_t</span></a> size</code></em>);
71
72 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gsf-Input-from-unstructured-files.html#gsf-input-copy" title="gsf_input_copy ()">gsf_input_copy</a>                      (<em class="parameter"><code><a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="type">GsfInput</span></a> *input</code></em>,
73                                                          <em class="parameter"><code><a class="link" href="gsf-Output-to-unstructured-files.html#GsfOutput"><span class="type">GsfOutput</span></a> *output</code></em>);
74 <a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="returnvalue">GsfInput</span></a> *          <a class="link" href="gsf-Input-from-unstructured-files.html#gsf-input-uncompress" title="gsf_input_uncompress ()">gsf_input_uncompress</a>                (<em class="parameter"><code><a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="type">GsfInput</span></a> *src</code></em>);
75 </pre>
76 </div>
77 <div class="refsect1" title="Object Hierarchy">
78 <a name="gsf-Input-from-unstructured-files.object-hierarchy"></a><h2>Object Hierarchy</h2>
79 <pre class="synopsis">
80   <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
81    +----GsfInput
82          +----<a class="link" href="gsf-Infile-reading-structed-files.html#GsfInfile">GsfInfile</a>
83          +----<a class="link" href="gsf-Compression.html#GsfInputGZip">GsfInputGZip</a>
84          +----<a class="link" href="gsf-memory.html#GsfInputMemory">GsfInputMemory</a>
85          +----<a class="link" href="gsf-Input-from-unstructured-files.html#GsfInputProxy">GsfInputProxy</a>
86          +----<a class="link" href="gsf-Reading-and-Writing-from-local-files-and-directories.html#GsfInputStdio">GsfInputStdio</a>
87          +----<a class="link" href="gsf-Text.html#GsfInputTextline">GsfInputTextline</a>
88 </pre>
89 <pre class="synopsis">
90   <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
91    +----<a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a>
92          +----GsfInputProxy
93 </pre>
94 </div>
95 <div class="refsect1" title="Properties">
96 <a name="gsf-Input-from-unstructured-files.properties"></a><h2>Properties</h2>
97 <pre class="synopsis">
98   "<a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput--eof" title='The "eof" property'>eof</a>"                      <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read
99   "<a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput--name" title='The "name" property'>name</a>"                     <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Read
100   "<a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput--position" title='The "position" property'>position</a>"                 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint64"><span class="type">gint64</span></a>                : Read
101   "<a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput--remaining" title='The "remaining" property'>remaining</a>"                <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint64"><span class="type">gint64</span></a>                : Read
102   "<a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput--size" title='The "size" property'>size</a>"                     <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint64"><span class="type">gint64</span></a>                : Read
103 </pre>
104 </div>
105 <div class="refsect1" title="Description">
106 <a name="gsf-Input-from-unstructured-files.description"></a><h2>Description</h2>
107 <p>
108 </p>
109 </div>
110 <div class="refsect1" title="Details">
111 <a name="gsf-Input-from-unstructured-files.details"></a><h2>Details</h2>
112 <div class="refsect2" title="GsfInput">
113 <a name="GsfInput-struct"></a><h3>GsfInput</h3>
114 <pre class="programlisting">typedef struct _GsfInput GsfInput;</pre>
115 <p>
116 Class representing an input stream.
117 </p>
118 </div>
119 <hr>
120 <div class="refsect2" title="gsf_input_read ()">
121 <a name="gsf-input-read"></a><h3>gsf_input_read ()</h3>
122 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"><span class="returnvalue">guint8</span></a> const *      gsf_input_read                      (<em class="parameter"><code><a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="type">GsfInput</span></a> *input</code></em>,
123                                                          <em class="parameter"><code><span class="type">size_t</span> num_bytes</code></em>,
124                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> *optional_buffer</code></em>);</pre>
125 <p>
126 Read at least <em class="parameter"><code>num_bytes</code></em>.  Does not change the current position if there
127 is an error.  Will only read if the entire amount can be read.  Invalidates
128 the buffer associated with previous calls to gsf_input_read.
129 </p>
130 <div class="variablelist"><table border="0">
131 <col align="left" valign="top">
132 <tbody>
133 <tr>
134 <td><p><span class="term"><em class="parameter"><code>input</code></em> :</span></p></td>
135 <td>the input stream
136 </td>
137 </tr>
138 <tr>
139 <td><p><span class="term"><em class="parameter"><code>num_bytes</code></em> :</span></p></td>
140 <td>number of bytes to read
141 </td>
142 </tr>
143 <tr>
144 <td><p><span class="term"><em class="parameter"><code>optional_buffer</code></em> :</span></p></td>
145 <td>
146 <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, or pointer to destination memory area
147 </td>
148 </tr>
149 <tr>
150 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
151 <td> pointer to the buffer or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if there is an error or 0 bytes are
152         requested.
153 </td>
154 </tr>
155 </tbody>
156 </table></div>
157 </div>
158 <hr>
159 <div class="refsect2" title="gsf_input_tell ()">
160 <a name="gsf-input-tell"></a><h3>gsf_input_tell ()</h3>
161 <pre class="programlisting"><a class="link" href="gsf-utils.html#gsf-off-t" title="gsf_off_t"><span class="returnvalue">gsf_off_t</span></a>           gsf_input_tell                      (<em class="parameter"><code><a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="type">GsfInput</span></a> *input</code></em>);</pre>
162 <div class="variablelist"><table border="0">
163 <col align="left" valign="top">
164 <tbody>
165 <tr>
166 <td><p><span class="term"><em class="parameter"><code>input</code></em> :</span></p></td>
167 <td>the input stream
168 </td>
169 </tr>
170 <tr>
171 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
172 <td> the current offset in the file.
173 </td>
174 </tr>
175 </tbody>
176 </table></div>
177 </div>
178 <hr>
179 <div class="refsect2" title="gsf_input_seek ()">
180 <a name="gsf-input-seek"></a><h3>gsf_input_seek ()</h3>
181 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gsf_input_seek                      (<em class="parameter"><code><a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="type">GsfInput</span></a> *input</code></em>,
182                                                          <em class="parameter"><code><a class="link" href="gsf-utils.html#gsf-off-t" title="gsf_off_t"><span class="type">gsf_off_t</span></a> offset</code></em>,
183                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-IO-Channels.html#GSeekType"><span class="type">GSeekType</span></a> whence</code></em>);</pre>
184 <p>
185 Move the current location in the input stream.
186 </p>
187 <div class="variablelist"><table border="0">
188 <col align="left" valign="top">
189 <tbody>
190 <tr>
191 <td><p><span class="term"><em class="parameter"><code>input</code></em> :</span></p></td>
192 <td>the input stream
193 </td>
194 </tr>
195 <tr>
196 <td><p><span class="term"><em class="parameter"><code>offset</code></em> :</span></p></td>
197 <td>target offset
198 </td>
199 </tr>
200 <tr>
201 <td><p><span class="term"><em class="parameter"><code>whence</code></em> :</span></p></td>
202 <td>determines whether the offset is relative to the beginning or
203          the end of the stream, or to the current location.
204 </td>
205 </tr>
206 <tr>
207 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
208 <td> TRUE on error.
209 </td>
210 </tr>
211 </tbody>
212 </table></div>
213 </div>
214 <hr>
215 <div class="refsect2" title="gsf_input_container ()">
216 <a name="gsf-input-container"></a><h3>gsf_input_container ()</h3>
217 <pre class="programlisting"><a class="link" href="gsf-Infile-reading-structed-files.html#GsfInfile"><span class="returnvalue">GsfInfile</span></a> *         gsf_input_container                 (<em class="parameter"><code><a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="type">GsfInput</span></a> *input</code></em>);</pre>
218 <div class="variablelist"><table border="0">
219 <col align="left" valign="top">
220 <tbody>
221 <tr>
222 <td><p><span class="term"><em class="parameter"><code>input</code></em> :</span></p></td>
223 <td>the input stream
224 </td>
225 </tr>
226 <tr>
227 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
228 <td> but does not add a reference to <em class="parameter"><code>input</code></em>'s container.
229         Potentially <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
230 </td>
231 </tr>
232 </tbody>
233 </table></div>
234 </div>
235 <hr>
236 <div class="refsect2" title="gsf_input_dup ()">
237 <a name="gsf-input-dup"></a><h3>gsf_input_dup ()</h3>
238 <pre class="programlisting"><a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="returnvalue">GsfInput</span></a> *          gsf_input_dup                       (<em class="parameter"><code><a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="type">GsfInput</span></a> *input</code></em>,
239                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **err</code></em>);</pre>
240 <p>
241 Duplicates input <em class="parameter"><code>src</code></em> leaving the new one at the same offset.
242 </p>
243 <div class="variablelist"><table border="0">
244 <col align="left" valign="top">
245 <tbody>
246 <tr>
247 <td><p><span class="term"><em class="parameter"><code>input</code></em> :</span></p></td>
248 <td>The input to duplicate
249 </td>
250 </tr>
251 <tr>
252 <td><p><span class="term"><em class="parameter"><code>err</code></em> :</span></p></td>
253 <td>optionally <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
254 </td>
255 </tr>
256 <tr>
257 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
258 <td> the duplicate, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error
259 </td>
260 </tr>
261 </tbody>
262 </table></div>
263 </div>
264 <hr>
265 <div class="refsect2" title="gsf_input_size ()">
266 <a name="gsf-input-size"></a><h3>gsf_input_size ()</h3>
267 <pre class="programlisting"><a class="link" href="gsf-utils.html#gsf-off-t" title="gsf_off_t"><span class="returnvalue">gsf_off_t</span></a>           gsf_input_size                      (<em class="parameter"><code><a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="type">GsfInput</span></a> *input</code></em>);</pre>
268 <p>
269 Looks up and caches the number of bytes in the input
270 </p>
271 <div class="variablelist"><table border="0">
272 <col align="left" valign="top">
273 <tbody>
274 <tr>
275 <td><p><span class="term"><em class="parameter"><code>input</code></em> :</span></p></td>
276 <td>The input
277 </td>
278 </tr>
279 <tr>
280 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
281 <td>  the size or -1 on error
282 </td>
283 </tr>
284 </tbody>
285 </table></div>
286 </div>
287 <hr>
288 <div class="refsect2" title="gsf_input_eof ()">
289 <a name="gsf-input-eof"></a><h3>gsf_input_eof ()</h3>
290 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gsf_input_eof                       (<em class="parameter"><code><a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="type">GsfInput</span></a> *input</code></em>);</pre>
291 <p>
292 Are we at the end of the file ?
293 </p>
294 <div class="variablelist"><table border="0">
295 <col align="left" valign="top">
296 <tbody>
297 <tr>
298 <td><p><span class="term"><em class="parameter"><code>input</code></em> :</span></p></td>
299 <td>the input
300 </td>
301 </tr>
302 <tr>
303 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
304 <td> TRUE if the input is at the eof.
305 </td>
306 </tr>
307 </tbody>
308 </table></div>
309 </div>
310 <hr>
311 <div class="refsect2" title="gsf_input_remaining ()">
312 <a name="gsf-input-remaining"></a><h3>gsf_input_remaining ()</h3>
313 <pre class="programlisting"><a class="link" href="gsf-utils.html#gsf-off-t" title="gsf_off_t"><span class="returnvalue">gsf_off_t</span></a>           gsf_input_remaining                 (<em class="parameter"><code><a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="type">GsfInput</span></a> *input</code></em>);</pre>
314 <div class="variablelist"><table border="0">
315 <col align="left" valign="top">
316 <tbody>
317 <tr>
318 <td><p><span class="term"><em class="parameter"><code>input</code></em> :</span></p></td>
319 <td>the input stream
320 </td>
321 </tr>
322 <tr>
323 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
324 <td> the number of bytes left in the file.
325 </td>
326 </tr>
327 </tbody>
328 </table></div>
329 </div>
330 <hr>
331 <div class="refsect2" title="gsf_input_error_id ()">
332 <a name="gsf-input-error-id"></a><h3>gsf_input_error_id ()</h3>
333 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Quarks.html#GQuark"><span class="returnvalue">GQuark</span></a>              gsf_input_error_id                  (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
334 <div class="variablelist"><table border="0">
335 <col align="left" valign="top">
336 <tbody><tr>
337 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
338 <td> A utility quark to flag a GError as being an input problem.
339 </td>
340 </tr></tbody>
341 </table></div>
342 </div>
343 <hr>
344 <div class="refsect2" title="gsf_input_sibling ()">
345 <a name="gsf-input-sibling"></a><h3>gsf_input_sibling ()</h3>
346 <pre class="programlisting"><a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="returnvalue">GsfInput</span></a> *          gsf_input_sibling                   (<em class="parameter"><code><a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="type">GsfInput</span></a> const *input</code></em>,
347                                                          <em class="parameter"><code><span class="type">char</span> const *name</code></em>,
348                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **err</code></em>);</pre>
349 <p>
350 </p>
351 <div class="variablelist"><table border="0">
352 <col align="left" valign="top">
353 <tbody>
354 <tr>
355 <td><p><span class="term"><em class="parameter"><code>input</code></em> :</span></p></td>
356 <td>
357 </td>
358 </tr>
359 <tr>
360 <td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
361 <td>
362 </td>
363 </tr>
364 <tr>
365 <td><p><span class="term"><em class="parameter"><code>err</code></em> :</span></p></td>
366 <td>
367 </td>
368 </tr>
369 <tr>
370 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
371 <td>
372 </td>
373 </tr>
374 </tbody>
375 </table></div>
376 </div>
377 <hr>
378 <div class="refsect2" title="gsf_input_error ()">
379 <a name="gsf-input-error"></a><h3>gsf_input_error ()</h3>
380 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Quarks.html#GQuark"><span class="returnvalue">GQuark</span></a>              gsf_input_error                     (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
381 <p>
382 Deprecated as of GSF 1.12.0; use <a class="link" href="gsf-Input-from-unstructured-files.html#gsf-input-error-id" title="gsf_input_error_id ()"><code class="function">gsf_input_error_id()</code></a> instead.
383 </p>
384 <div class="variablelist"><table border="0">
385 <col align="left" valign="top">
386 <tbody><tr>
387 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
388 <td> A utility quark to flag a GError as being an input problem.
389 </td>
390 </tr></tbody>
391 </table></div>
392 </div>
393 <hr>
394 <div class="refsect2" title="gsf_input_name ()">
395 <a name="gsf-input-name"></a><h3>gsf_input_name ()</h3>
396 <pre class="programlisting"><span class="returnvalue">char</span> const   *      gsf_input_name                      (<em class="parameter"><code><a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="type">GsfInput</span></a> *input</code></em>);</pre>
397 <p>
398 The name of the input stream.
399 </p>
400 <div class="variablelist"><table border="0">
401 <col align="left" valign="top">
402 <tbody>
403 <tr>
404 <td><p><span class="term"><em class="parameter"><code>input</code></em> :</span></p></td>
405 <td>the input stream
406 </td>
407 </tr>
408 <tr>
409 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
410 <td> <em class="parameter"><code>input</code></em>'s name in utf8 form, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if it has no name.
411 </td>
412 </tr>
413 </tbody>
414 </table></div>
415 </div>
416 <hr>
417 <div class="refsect2" title="gsf_input_set_name_from_filename ()">
418 <a name="gsf-input-set-name-from-filename"></a><h3>gsf_input_set_name_from_filename ()</h3>
419 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gsf_input_set_name_from_filename    (<em class="parameter"><code><a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="type">GsfInput</span></a> *input</code></em>,
420                                                          <em class="parameter"><code><span class="type">char</span> const *filename</code></em>);</pre>
421 <p>
422 protected.
423 </p>
424 <div class="variablelist"><table border="0">
425 <col align="left" valign="top">
426 <tbody>
427 <tr>
428 <td><p><span class="term"><em class="parameter"><code>input</code></em> :</span></p></td>
429 <td>the input stream
430 </td>
431 </tr>
432 <tr>
433 <td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
434 <td>the (fs-sys encoded) filename
435 </td>
436 </tr>
437 <tr>
438 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
439 <td> TRUE if the assignment was ok.
440 </td>
441 </tr>
442 </tbody>
443 </table></div>
444 </div>
445 <hr>
446 <div class="refsect2" title="GsfInputProxy">
447 <a name="GsfInputProxy-struct"></a><h3>GsfInputProxy</h3>
448 <pre class="programlisting">typedef struct _GsfInputProxy GsfInputProxy;</pre>
449 <p>
450 </p>
451 </div>
452 <hr>
453 <div class="refsect2" title="gsf_input_proxy_new ()">
454 <a name="gsf-input-proxy-new"></a><h3>gsf_input_proxy_new ()</h3>
455 <pre class="programlisting"><a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="returnvalue">GsfInput</span></a> *          gsf_input_proxy_new                 (<em class="parameter"><code><a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="type">GsfInput</span></a> *source</code></em>);</pre>
456 <p>
457 This creates a new proxy to the entire, given input source.  See
458 gsf_input_proxy_new_section for details.
459 </p>
460 <div class="variablelist"><table border="0">
461 <col align="left" valign="top">
462 <tbody>
463 <tr>
464 <td><p><span class="term"><em class="parameter"><code>source</code></em> :</span></p></td>
465 <td>The underlying data source.
466 </td>
467 </tr>
468 <tr>
469 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
470 <td> a new input object.
471 </td>
472 </tr>
473 </tbody>
474 </table></div>
475 </div>
476 <hr>
477 <div class="refsect2" title="gsf_input_proxy_new_section ()">
478 <a name="gsf-input-proxy-new-section"></a><h3>gsf_input_proxy_new_section ()</h3>
479 <pre class="programlisting"><a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="returnvalue">GsfInput</span></a> *          gsf_input_proxy_new_section         (<em class="parameter"><code><a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="type">GsfInput</span></a> *source</code></em>,
480                                                          <em class="parameter"><code><a class="link" href="gsf-utils.html#gsf-off-t" title="gsf_off_t"><span class="type">gsf_off_t</span></a> offset</code></em>,
481                                                          <em class="parameter"><code><a class="link" href="gsf-utils.html#gsf-off-t" title="gsf_off_t"><span class="type">gsf_off_t</span></a> size</code></em>);</pre>
482 <p>
483 This creates a new proxy to a section of the given source.  The new
484 object will have its own current position, but any operation on it
485 can change the source's position.
486 </p>
487 <p>
488 If a proxy to a proxy is created, the intermediate proxy is short-
489 circuited.
490 </p>
491 <p>
492 This function will ref the source.
493 </p>
494 <div class="variablelist"><table border="0">
495 <col align="left" valign="top">
496 <tbody>
497 <tr>
498 <td><p><span class="term"><em class="parameter"><code>source</code></em> :</span></p></td>
499 <td>The underlying data source.
500 </td>
501 </tr>
502 <tr>
503 <td><p><span class="term"><em class="parameter"><code>offset</code></em> :</span></p></td>
504 <td>Offset into source for start of section.
505 </td>
506 </tr>
507 <tr>
508 <td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
509 <td>Length of section.
510 </td>
511 </tr>
512 <tr>
513 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
514 <td> a new input object.
515 </td>
516 </tr>
517 </tbody>
518 </table></div>
519 </div>
520 <hr>
521 <div class="refsect2" title="gsf_input_copy ()">
522 <a name="gsf-input-copy"></a><h3>gsf_input_copy ()</h3>
523 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gsf_input_copy                      (<em class="parameter"><code><a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="type">GsfInput</span></a> *input</code></em>,
524                                                          <em class="parameter"><code><a class="link" href="gsf-Output-to-unstructured-files.html#GsfOutput"><span class="type">GsfOutput</span></a> *output</code></em>);</pre>
525 <p>
526 Copy the contents from <em class="parameter"><code>input</code></em> to <em class="parameter"><code>output</code></em> from their respective
527 current positions. So if you want to be sure to copy *everything*,
528 make sure to call gsf_input_seek (input, 0, G_SEEK_SET) and
529 gsf_output_seek (output, 0, G_SEEK_SET) first, if applicable.
530 </p>
531 <div class="variablelist"><table border="0">
532 <col align="left" valign="top">
533 <tbody>
534 <tr>
535 <td><p><span class="term"><em class="parameter"><code>input</code></em> :</span></p></td>
536 <td>a non-null <a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="type">GsfInput</span></a>
537 </td>
538 </tr>
539 <tr>
540 <td><p><span class="term"><em class="parameter"><code>output</code></em> :</span></p></td>
541 <td>a non-null <a class="link" href="gsf-Output-to-unstructured-files.html#GsfOutput"><span class="type">GsfOutput</span></a>
542 </td>
543 </tr>
544 <tr>
545 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
546 <td> TRUE on Success
547 </td>
548 </tr>
549 </tbody>
550 </table></div>
551 </div>
552 <hr>
553 <div class="refsect2" title="gsf_input_uncompress ()">
554 <a name="gsf-input-uncompress"></a><h3>gsf_input_uncompress ()</h3>
555 <pre class="programlisting"><a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="returnvalue">GsfInput</span></a> *          gsf_input_uncompress                (<em class="parameter"><code><a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="type">GsfInput</span></a> *src</code></em>);</pre>
556 <p>
557 This functions takes ownership of the incoming reference and yields a
558 new one as its output.
559 </p>
560 <div class="variablelist"><table border="0">
561 <col align="left" valign="top">
562 <tbody>
563 <tr>
564 <td><p><span class="term"><em class="parameter"><code>src</code></em> :</span></p></td>
565 <td>stream to be uncompressed.
566 </td>
567 </tr>
568 <tr>
569 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
570 <td> A stream equivalent to the source stream, but uncompressed if
571 the source was compressed.
572 </td>
573 </tr>
574 </tbody>
575 </table></div>
576 </div>
577 </div>
578 <div class="refsect1" title="Property Details">
579 <a name="gsf-Input-from-unstructured-files.property-details"></a><h2>Property Details</h2>
580 <div class="refsect2" title='The "eof" property'>
581 <a name="GsfInput--eof"></a><h3>The <code class="literal">"eof"</code> property</h3>
582 <pre class="programlisting">  "eof"                      <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read</pre>
583 <p>End Of File.</p>
584 <p>Default value: FALSE</p>
585 </div>
586 <hr>
587 <div class="refsect2" title='The "name" property'>
588 <a name="GsfInput--name"></a><h3>The <code class="literal">"name"</code> property</h3>
589 <pre class="programlisting">  "name"                     <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Read</pre>
590 <p>The Input's Name.</p>
591 <p>Default value: NULL</p>
592 </div>
593 <hr>
594 <div class="refsect2" title='The "position" property'>
595 <a name="GsfInput--position"></a><h3>The <code class="literal">"position"</code> property</h3>
596 <pre class="programlisting">  "position"                 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint64"><span class="type">gint64</span></a>                : Read</pre>
597 <p>The Output's Current Position.</p>
598 <p>Allowed values: &gt;= 0</p>
599 <p>Default value: 0</p>
600 </div>
601 <hr>
602 <div class="refsect2" title='The "remaining" property'>
603 <a name="GsfInput--remaining"></a><h3>The <code class="literal">"remaining"</code> property</h3>
604 <pre class="programlisting">  "remaining"                <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint64"><span class="type">gint64</span></a>                : Read</pre>
605 <p>Amount of Data Remaining.</p>
606 <p>Allowed values: &gt;= 0</p>
607 <p>Default value: 0</p>
608 </div>
609 <hr>
610 <div class="refsect2" title='The "size" property'>
611 <a name="GsfInput--size"></a><h3>The <code class="literal">"size"</code> property</h3>
612 <pre class="programlisting">  "size"                     <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint64"><span class="type">gint64</span></a>                : Read</pre>
613 <p>The Input's Size.</p>
614 <p>Allowed values: &gt;= 0</p>
615 <p>Default value: 0</p>
616 </div>
617 </div>
618 </div>
619 <div class="footer">
620 <hr>
621           Generated by GTK-Doc V1.14</div>
622 </body>
623 </html>