| 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: GSF Reference Manual</title> |
| 6 |
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"> |
| 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.34.0 (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="5"><tr valign="middle"> |
| 16 |
<td width="100%" align="left" class="shortcuts"> |
| 17 |
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> |
| 18 |
<a href="#gsf-Input-from-unstructured-files.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span> |
| 19 |
<a href="#gsf-Input-from-unstructured-files.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties"> <span class="dim">|</span> |
| 20 |
<a href="#gsf-Input-from-unstructured-files.properties" class="shortcut">Properties</a></span> |
| 21 |
</td> |
| 22 |
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> |
| 23 |
<td><a accesskey="u" href="io.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> |
| 24 |
<td><a accesskey="p" href="io.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> |
| 25 |
<td><a accesskey="n" href="gsf-Output-to-unstructured-files.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> |
| 26 |
</tr></table> |
| 27 |
<div class="refentry"> |
| 28 |
<a name="gsf-Input-from-unstructured-files"></a><div class="titlepage"></div> |
| 29 |
<div class="refnamediv"><table width="100%"><tr> |
| 30 |
<td valign="top"> |
| 31 |
<h2><span class="refentrytitle"><a name="gsf-Input-from-unstructured-files.top_of_page"></a>Input from unstructured files</span></h2> |
| 32 |
<p>Input from unstructured files</p> |
| 33 |
</td> |
| 34 |
<td class="gallery_image" valign="top" align="right"></td> |
| 35 |
</tr></table></div> |
| 36 |
<div class="refsect1"> |
| 37 |
<a name="gsf-Input-from-unstructured-files.functions"></a><h2>Functions</h2> |
| 38 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 39 |
<colgroup> |
| 40 |
<col width="150px" class="functions_proto_type"> |
| 41 |
<col class="functions_proto_name"> |
| 42 |
</colgroup> |
| 43 |
<tbody> |
| 44 |
<tr> |
| 45 |
<td class="function_type"> |
| 46 |
<span class="returnvalue">guint8</span> const * |
| 47 |
</td> |
| 48 |
<td class="function_name"> |
| 49 |
<a class="link" href="gsf-Input-from-unstructured-files.html#gsf-input-read" title="gsf_input_read ()">gsf_input_read</a> <span class="c_punctuation">()</span> |
| 50 |
</td> |
| 51 |
</tr> |
| 52 |
<tr> |
| 53 |
<td class="function_type"> |
| 54 |
<a class="link" href="gsf-Utilities.html#gsf-off-t" title="gsf_off_t"><span class="returnvalue">gsf_off_t</span></a> |
| 55 |
</td> |
| 56 |
<td class="function_name"> |
| 57 |
<a class="link" href="gsf-Input-from-unstructured-files.html#gsf-input-tell" title="gsf_input_tell ()">gsf_input_tell</a> <span class="c_punctuation">()</span> |
| 58 |
</td> |
| 59 |
</tr> |
| 60 |
<tr> |
| 61 |
<td class="function_type"> |
| 62 |
<span class="returnvalue">gboolean</span> |
| 63 |
</td> |
| 64 |
<td class="function_name"> |
| 65 |
<a class="link" href="gsf-Input-from-unstructured-files.html#gsf-input-seek" title="gsf_input_seek ()">gsf_input_seek</a> <span class="c_punctuation">()</span> |
| 66 |
</td> |
| 67 |
</tr> |
| 68 |
<tr> |
| 69 |
<td class="function_type"> |
| 70 |
<a class="link" href="gsf-Infile-reading-structed-files.html#GsfInfile"><span class="returnvalue">GsfInfile</span></a> * |
| 71 |
</td> |
| 72 |
<td class="function_name"> |
| 73 |
<a class="link" href="gsf-Input-from-unstructured-files.html#gsf-input-container" title="gsf_input_container ()">gsf_input_container</a> <span class="c_punctuation">()</span> |
| 74 |
</td> |
| 75 |
</tr> |
| 76 |
<tr> |
| 77 |
<td class="function_type"> |
| 78 |
<a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="returnvalue">GsfInput</span></a> * |
| 79 |
</td> |
| 80 |
<td class="function_name"> |
| 81 |
<a class="link" href="gsf-Input-from-unstructured-files.html#gsf-input-dup" title="gsf_input_dup ()">gsf_input_dup</a> <span class="c_punctuation">()</span> |
| 82 |
</td> |
| 83 |
</tr> |
| 84 |
<tr> |
| 85 |
<td class="function_type"> |
| 86 |
<a class="link" href="gsf-Utilities.html#gsf-off-t" title="gsf_off_t"><span class="returnvalue">gsf_off_t</span></a> |
| 87 |
</td> |
| 88 |
<td class="function_name"> |
| 89 |
<a class="link" href="gsf-Input-from-unstructured-files.html#gsf-input-size" title="gsf_input_size ()">gsf_input_size</a> <span class="c_punctuation">()</span> |
| 90 |
</td> |
| 91 |
</tr> |
| 92 |
<tr> |
| 93 |
<td class="function_type"> |
| 94 |
<span class="returnvalue">gboolean</span> |
| 95 |
</td> |
| 96 |
<td class="function_name"> |
| 97 |
<a class="link" href="gsf-Input-from-unstructured-files.html#gsf-input-eof" title="gsf_input_eof ()">gsf_input_eof</a> <span class="c_punctuation">()</span> |
| 98 |
</td> |
| 99 |
</tr> |
| 100 |
<tr> |
| 101 |
<td class="function_type"> |
| 102 |
<a class="link" href="gsf-Utilities.html#gsf-off-t" title="gsf_off_t"><span class="returnvalue">gsf_off_t</span></a> |
| 103 |
</td> |
| 104 |
<td class="function_name"> |
| 105 |
<a class="link" href="gsf-Input-from-unstructured-files.html#gsf-input-remaining" title="gsf_input_remaining ()">gsf_input_remaining</a> <span class="c_punctuation">()</span> |
| 106 |
</td> |
| 107 |
</tr> |
| 108 |
<tr> |
| 109 |
<td class="function_type"> |
| 110 |
<span class="returnvalue">GQuark</span> |
| 111 |
</td> |
| 112 |
<td class="function_name"> |
| 113 |
<a class="link" href="gsf-Input-from-unstructured-files.html#gsf-input-error-id" title="gsf_input_error_id ()">gsf_input_error_id</a> <span class="c_punctuation">()</span> |
| 114 |
</td> |
| 115 |
</tr> |
| 116 |
<tr> |
| 117 |
<td class="function_type"> |
| 118 |
<a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="returnvalue">GsfInput</span></a> * |
| 119 |
</td> |
| 120 |
<td class="function_name"> |
| 121 |
<a class="link" href="gsf-Input-from-unstructured-files.html#gsf-input-sibling" title="gsf_input_sibling ()">gsf_input_sibling</a> <span class="c_punctuation">()</span> |
| 122 |
</td> |
| 123 |
</tr> |
| 124 |
<tr> |
| 125 |
<td class="function_type"> |
| 126 |
<span class="returnvalue">GQuark</span> |
| 127 |
</td> |
| 128 |
<td class="function_name"> |
| 129 |
<a class="link" href="gsf-Input-from-unstructured-files.html#gsf-input-error" title="gsf_input_error ()">gsf_input_error</a> <span class="c_punctuation">()</span> |
| 130 |
</td> |
| 131 |
</tr> |
| 132 |
<tr> |
| 133 |
<td class="function_type"> |
| 134 |
<span class="returnvalue">char</span> const * |
| 135 |
</td> |
| 136 |
<td class="function_name"> |
| 137 |
<a class="link" href="gsf-Input-from-unstructured-files.html#gsf-input-name" title="gsf_input_name ()">gsf_input_name</a> <span class="c_punctuation">()</span> |
| 138 |
</td> |
| 139 |
</tr> |
| 140 |
<tr> |
| 141 |
<td class="function_type"> |
| 142 |
<span class="returnvalue">gboolean</span> |
| 143 |
</td> |
| 144 |
<td class="function_name"> |
| 145 |
<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> <span class="c_punctuation">()</span> |
| 146 |
</td> |
| 147 |
</tr> |
| 148 |
<tr> |
| 149 |
<td class="function_type"> |
| 150 |
<a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="returnvalue">GsfInput</span></a> * |
| 151 |
</td> |
| 152 |
<td class="function_name"> |
| 153 |
<a class="link" href="gsf-Input-from-unstructured-files.html#gsf-input-proxy-new" title="gsf_input_proxy_new ()">gsf_input_proxy_new</a> <span class="c_punctuation">()</span> |
| 154 |
</td> |
| 155 |
</tr> |
| 156 |
<tr> |
| 157 |
<td class="function_type"> |
| 158 |
<a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="returnvalue">GsfInput</span></a> * |
| 159 |
</td> |
| 160 |
<td class="function_name"> |
| 161 |
<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> <span class="c_punctuation">()</span> |
| 162 |
</td> |
| 163 |
</tr> |
| 164 |
<tr> |
| 165 |
<td class="function_type"> |
| 166 |
<span class="returnvalue">gboolean</span> |
| 167 |
</td> |
| 168 |
<td class="function_name"> |
| 169 |
<a class="link" href="gsf-Input-from-unstructured-files.html#gsf-input-copy" title="gsf_input_copy ()">gsf_input_copy</a> <span class="c_punctuation">()</span> |
| 170 |
</td> |
| 171 |
</tr> |
| 172 |
<tr> |
| 173 |
<td class="function_type"> |
| 174 |
<a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="returnvalue">GsfInput</span></a> * |
| 175 |
</td> |
| 176 |
<td class="function_name"> |
| 177 |
<a class="link" href="gsf-Input-from-unstructured-files.html#gsf-input-uncompress" title="gsf_input_uncompress ()">gsf_input_uncompress</a> <span class="c_punctuation">()</span> |
| 178 |
</td> |
| 179 |
</tr> |
| 180 |
</tbody> |
| 181 |
</table></div> |
| 182 |
</div> |
| 183 |
<div class="refsect1"> |
| 184 |
<a name="gsf-Input-from-unstructured-files.properties"></a><h2>Properties</h2> |
| 185 |
<div class="informaltable"><table class="informaltable" border="0"> |
| 186 |
<colgroup> |
| 187 |
<col width="150px" class="properties_type"> |
| 188 |
<col width="300px" class="properties_name"> |
| 189 |
<col width="200px" class="properties_flags"> |
| 190 |
</colgroup> |
| 191 |
<tbody> |
| 192 |
<tr> |
| 193 |
<td class="property_type"> |
| 194 |
<a class="link" href="gsf-Infile-reading-structed-files.html#GsfInfile"><span class="type">GsfInfile</span></a> *</td> |
| 195 |
<td class="property_name"><a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput--container" title="The “container” property">container</a></td> |
| 196 |
<td class="property_flags">Read</td> |
| 197 |
</tr> |
| 198 |
<tr> |
| 199 |
<td class="property_type"><span class="type">gboolean</span></td> |
| 200 |
<td class="property_name"><a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput--eof" title="The “eof” property">eof</a></td> |
| 201 |
<td class="property_flags">Read</td> |
| 202 |
</tr> |
| 203 |
<tr> |
| 204 |
<td class="property_type"> |
| 205 |
<span class="type">GDateTime</span> *</td> |
| 206 |
<td class="property_name"><a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput--modtime" title="The “modtime” property">modtime</a></td> |
| 207 |
<td class="property_flags">Read</td> |
| 208 |
</tr> |
| 209 |
<tr> |
| 210 |
<td class="property_type"> |
| 211 |
<span class="type">char</span> *</td> |
| 212 |
<td class="property_name"><a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput--name" title="The “name” property">name</a></td> |
| 213 |
<td class="property_flags">Read</td> |
| 214 |
</tr> |
| 215 |
<tr> |
| 216 |
<td class="property_type"><span class="type">gint64</span></td> |
| 217 |
<td class="property_name"><a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput--position" title="The “position” property">position</a></td> |
| 218 |
<td class="property_flags">Read</td> |
| 219 |
</tr> |
| 220 |
<tr> |
| 221 |
<td class="property_type"><span class="type">gint64</span></td> |
| 222 |
<td class="property_name"><a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput--remaining" title="The “remaining” property">remaining</a></td> |
| 223 |
<td class="property_flags">Read</td> |
| 224 |
</tr> |
| 225 |
<tr> |
| 226 |
<td class="property_type"><span class="type">gint64</span></td> |
| 227 |
<td class="property_name"><a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput--size" title="The “size” property">size</a></td> |
| 228 |
<td class="property_flags">Read</td> |
| 229 |
</tr> |
| 230 |
</tbody> |
| 231 |
</table></div> |
| 232 |
</div> |
| 233 |
<a name="GsfInput"></a><a name="GsfInputProxy"></a><div class="refsect1"> |
| 234 |
<a name="gsf-Input-from-unstructured-files.other"></a><h2>Types and Values</h2> |
| 235 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 236 |
<colgroup> |
| 237 |
<col width="150px" class="other_proto_type"> |
| 238 |
<col class="other_proto_name"> |
| 239 |
</colgroup> |
| 240 |
<tbody> |
| 241 |
<tr> |
| 242 |
<td class="datatype_keyword"> </td> |
| 243 |
<td class="function_name"><a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput-struct" title="GsfInput">GsfInput</a></td> |
| 244 |
</tr> |
| 245 |
<tr> |
| 246 |
<td class="datatype_keyword"> </td> |
| 247 |
<td class="function_name"><a class="link" href="gsf-Input-from-unstructured-files.html#GsfInputProxy-struct" title="GsfInputProxy">GsfInputProxy</a></td> |
| 248 |
</tr> |
| 249 |
</tbody> |
| 250 |
</table></div> |
| 251 |
</div> |
| 252 |
<div class="refsect1"> |
| 253 |
<a name="gsf-Input-from-unstructured-files.object-hierarchy"></a><h2>Object Hierarchy</h2> |
| 254 |
<pre class="screen"> GObject |
| 255 |
<span class="lineart">╰──</span> GsfInput |
| 256 |
<span class="lineart">├──</span> <a class="link" href="gsf-Compression.html#GsfInputGZip">GsfInputGZip</a> |
| 257 |
<span class="lineart">├──</span> <a class="link" href="gsf-XML-and-libxml.html#GsfInputHTTP">GsfInputHTTP</a> |
| 258 |
<span class="lineart">├──</span> <a class="link" href="gsf-memory.html#GsfInputMemory">GsfInputMemory</a> |
| 259 |
<span class="lineart">├──</span> GsfInputProxy |
| 260 |
<span class="lineart">├──</span> <a class="link" href="gsf-Reading-and-Writing-from-local-files-and-directories.html#GsfInputStdio">GsfInputStdio</a> |
| 261 |
<span class="lineart">├──</span> <a class="link" href="gsf-Text.html#GsfInputTextline">GsfInputTextline</a> |
| 262 |
<span class="lineart">╰──</span> <a class="link" href="gsf-Infile-reading-structed-files.html#GsfInfile">GsfInfile</a> |
| 263 |
</pre> |
| 264 |
</div> |
| 265 |
<div class="refsect1"> |
| 266 |
<a name="gsf-Input-from-unstructured-files.description"></a><h2>Description</h2> |
| 267 |
</div> |
| 268 |
<div class="refsect1"> |
| 269 |
<a name="gsf-Input-from-unstructured-files.functions_details"></a><h2>Functions</h2> |
| 270 |
<div class="refsect2"> |
| 271 |
<a name="gsf-input-read"></a><h3>gsf_input_read ()</h3> |
| 272 |
<pre class="programlisting"><span class="returnvalue">guint8</span> const * |
| 273 |
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>, |
| 274 |
<em class="parameter"><code><span class="type">size_t</span> num_bytes</code></em>, |
| 275 |
<em class="parameter"><code><span class="type">guint8</span> *optional_buffer</code></em>);</pre> |
| 276 |
<p>Read at least <em class="parameter"><code>num_bytes</code></em> |
| 277 |
. Does not change the current position if there |
| 278 |
is an error. Will only read if the entire amount can be read. Invalidates |
| 279 |
the buffer associated with previous calls to gsf_input_read.</p> |
| 280 |
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p> |
| 281 |
<div class="refsect3"> |
| 282 |
<a name="gsf-input-read.parameters"></a><h4>Parameters</h4> |
| 283 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 284 |
<colgroup> |
| 285 |
<col width="150px" class="parameters_name"> |
| 286 |
<col class="parameters_description"> |
| 287 |
<col width="200px" class="parameters_annotations"> |
| 288 |
</colgroup> |
| 289 |
<tbody> |
| 290 |
<tr> |
| 291 |
<td class="parameter_name"><p>input</p></td> |
| 292 |
<td class="parameter_description"><p>the input stream</p></td> |
| 293 |
<td class="parameter_annotations"> </td> |
| 294 |
</tr> |
| 295 |
<tr> |
| 296 |
<td class="parameter_name"><p>num_bytes</p></td> |
| 297 |
<td class="parameter_description"><p>number of bytes to read</p></td> |
| 298 |
<td class="parameter_annotations"> </td> |
| 299 |
</tr> |
| 300 |
<tr> |
| 301 |
<td class="parameter_name"><p>optional_buffer</p></td> |
| 302 |
<td class="parameter_description"><p>Pointer to destination memory area. </p></td> |
| 303 |
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td> |
| 304 |
</tr> |
| 305 |
</tbody> |
| 306 |
</table></div> |
| 307 |
</div> |
| 308 |
<div class="refsect3"> |
| 309 |
<a name="gsf-input-read.returns"></a><h4>Returns</h4> |
| 310 |
<p>pointer to the buffer or <code class="literal">NULL</code> if there is |
| 311 |
an error or 0 bytes are requested. </p> |
| 312 |
<p><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p> |
| 313 |
</div> |
| 314 |
</div> |
| 315 |
<hr> |
| 316 |
<div class="refsect2"> |
| 317 |
<a name="gsf-input-tell"></a><h3>gsf_input_tell ()</h3> |
| 318 |
<pre class="programlisting"><a class="link" href="gsf-Utilities.html#gsf-off-t" title="gsf_off_t"><span class="returnvalue">gsf_off_t</span></a> |
| 319 |
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> |
| 320 |
<div class="refsect3"> |
| 321 |
<a name="gsf-input-tell.parameters"></a><h4>Parameters</h4> |
| 322 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 323 |
<colgroup> |
| 324 |
<col width="150px" class="parameters_name"> |
| 325 |
<col class="parameters_description"> |
| 326 |
<col width="200px" class="parameters_annotations"> |
| 327 |
</colgroup> |
| 328 |
<tbody><tr> |
| 329 |
<td class="parameter_name"><p>input</p></td> |
| 330 |
<td class="parameter_description"><p>the input stream</p></td> |
| 331 |
<td class="parameter_annotations"> </td> |
| 332 |
</tr></tbody> |
| 333 |
</table></div> |
| 334 |
</div> |
| 335 |
<div class="refsect3"> |
| 336 |
<a name="gsf-input-tell.returns"></a><h4>Returns</h4> |
| 337 |
<p> the current offset in the file.</p> |
| 338 |
</div> |
| 339 |
</div> |
| 340 |
<hr> |
| 341 |
<div class="refsect2"> |
| 342 |
<a name="gsf-input-seek"></a><h3>gsf_input_seek ()</h3> |
| 343 |
<pre class="programlisting"><span class="returnvalue">gboolean</span> |
| 344 |
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>, |
| 345 |
<em class="parameter"><code><a class="link" href="gsf-Utilities.html#gsf-off-t" title="gsf_off_t"><span class="type">gsf_off_t</span></a> offset</code></em>, |
| 346 |
<em class="parameter"><code><span class="type">GSeekType</span> whence</code></em>);</pre> |
| 347 |
<p>Move the current location in the input stream.</p> |
| 348 |
<p><span class="annotation">[<acronym title="This is the invoker for a virtual method."><span class="acronym">virtual</span></acronym> Seek]</span></p> |
| 349 |
<div class="refsect3"> |
| 350 |
<a name="gsf-input-seek.parameters"></a><h4>Parameters</h4> |
| 351 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 352 |
<colgroup> |
| 353 |
<col width="150px" class="parameters_name"> |
| 354 |
<col class="parameters_description"> |
| 355 |
<col width="200px" class="parameters_annotations"> |
| 356 |
</colgroup> |
| 357 |
<tbody> |
| 358 |
<tr> |
| 359 |
<td class="parameter_name"><p>input</p></td> |
| 360 |
<td class="parameter_description"><p>the input stream</p></td> |
| 361 |
<td class="parameter_annotations"> </td> |
| 362 |
</tr> |
| 363 |
<tr> |
| 364 |
<td class="parameter_name"><p>offset</p></td> |
| 365 |
<td class="parameter_description"><p>target offset</p></td> |
| 366 |
<td class="parameter_annotations"> </td> |
| 367 |
</tr> |
| 368 |
<tr> |
| 369 |
<td class="parameter_name"><p>whence</p></td> |
| 370 |
<td class="parameter_description"><p>determines whether the offset is relative to the beginning or |
| 371 |
the end of the stream, or to the current location.</p></td> |
| 372 |
<td class="parameter_annotations"> </td> |
| 373 |
</tr> |
| 374 |
</tbody> |
| 375 |
</table></div> |
| 376 |
</div> |
| 377 |
<div class="refsect3"> |
| 378 |
<a name="gsf-input-seek.returns"></a><h4>Returns</h4> |
| 379 |
<p> <code class="literal">TRUE</code> on error.</p> |
| 380 |
</div> |
| 381 |
</div> |
| 382 |
<hr> |
| 383 |
<div class="refsect2"> |
| 384 |
<a name="gsf-input-container"></a><h3>gsf_input_container ()</h3> |
| 385 |
<pre class="programlisting"><a class="link" href="gsf-Infile-reading-structed-files.html#GsfInfile"><span class="returnvalue">GsfInfile</span></a> * |
| 386 |
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> |
| 387 |
<div class="refsect3"> |
| 388 |
<a name="gsf-input-container.parameters"></a><h4>Parameters</h4> |
| 389 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 390 |
<colgroup> |
| 391 |
<col width="150px" class="parameters_name"> |
| 392 |
<col class="parameters_description"> |
| 393 |
<col width="200px" class="parameters_annotations"> |
| 394 |
</colgroup> |
| 395 |
<tbody><tr> |
| 396 |
<td class="parameter_name"><p>input</p></td> |
| 397 |
<td class="parameter_description"><p>the input stream</p></td> |
| 398 |
<td class="parameter_annotations"> </td> |
| 399 |
</tr></tbody> |
| 400 |
</table></div> |
| 401 |
</div> |
| 402 |
<div class="refsect3"> |
| 403 |
<a name="gsf-input-container.returns"></a><h4>Returns</h4> |
| 404 |
<p><em class="parameter"><code>input</code></em> |
| 405 |
's container. </p> |
| 406 |
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p> |
| 407 |
</div> |
| 408 |
</div> |
| 409 |
<hr> |
| 410 |
<div class="refsect2"> |
| 411 |
<a name="gsf-input-dup"></a><h3>gsf_input_dup ()</h3> |
| 412 |
<pre class="programlisting"><a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="returnvalue">GsfInput</span></a> * |
| 413 |
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>, |
| 414 |
<em class="parameter"><code><span class="type">GError</span> **err</code></em>);</pre> |
| 415 |
<p>Duplicates <em class="parameter"><code>input</code></em> |
| 416 |
leaving the new one at the same offset.</p> |
| 417 |
<p><span class="annotation">[<acronym title="This is the invoker for a virtual method."><span class="acronym">virtual</span></acronym> Dup]</span></p> |
| 418 |
<div class="refsect3"> |
| 419 |
<a name="gsf-input-dup.parameters"></a><h4>Parameters</h4> |
| 420 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 421 |
<colgroup> |
| 422 |
<col width="150px" class="parameters_name"> |
| 423 |
<col class="parameters_description"> |
| 424 |
<col width="200px" class="parameters_annotations"> |
| 425 |
</colgroup> |
| 426 |
<tbody> |
| 427 |
<tr> |
| 428 |
<td class="parameter_name"><p>input</p></td> |
| 429 |
<td class="parameter_description"><p>The input to duplicate</p></td> |
| 430 |
<td class="parameter_annotations"> </td> |
| 431 |
</tr> |
| 432 |
<tr> |
| 433 |
<td class="parameter_name"><p>err</p></td> |
| 434 |
<td class="parameter_description"><p>place to store a <span class="type">GError</span> if anything goes wrong. </p></td> |
| 435 |
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td> |
| 436 |
</tr> |
| 437 |
</tbody> |
| 438 |
</table></div> |
| 439 |
</div> |
| 440 |
<div class="refsect3"> |
| 441 |
<a name="gsf-input-dup.returns"></a><h4>Returns</h4> |
| 442 |
<p>the duplicate. </p> |
| 443 |
<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p> |
| 444 |
</div> |
| 445 |
</div> |
| 446 |
<hr> |
| 447 |
<div class="refsect2"> |
| 448 |
<a name="gsf-input-size"></a><h3>gsf_input_size ()</h3> |
| 449 |
<pre class="programlisting"><a class="link" href="gsf-Utilities.html#gsf-off-t" title="gsf_off_t"><span class="returnvalue">gsf_off_t</span></a> |
| 450 |
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> |
| 451 |
<div class="refsect3"> |
| 452 |
<a name="gsf-input-size.parameters"></a><h4>Parameters</h4> |
| 453 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 454 |
<colgroup> |
| 455 |
<col width="150px" class="parameters_name"> |
| 456 |
<col class="parameters_description"> |
| 457 |
<col width="200px" class="parameters_annotations"> |
| 458 |
</colgroup> |
| 459 |
<tbody><tr> |
| 460 |
<td class="parameter_name"><p>input</p></td> |
| 461 |
<td class="parameter_description"><p>The input</p></td> |
| 462 |
<td class="parameter_annotations"> </td> |
| 463 |
</tr></tbody> |
| 464 |
</table></div> |
| 465 |
</div> |
| 466 |
<div class="refsect3"> |
| 467 |
<a name="gsf-input-size.returns"></a><h4>Returns</h4> |
| 468 |
<p> the total number of bytes in the input or -1 on error</p> |
| 469 |
</div> |
| 470 |
</div> |
| 471 |
<hr> |
| 472 |
<div class="refsect2"> |
| 473 |
<a name="gsf-input-eof"></a><h3>gsf_input_eof ()</h3> |
| 474 |
<pre class="programlisting"><span class="returnvalue">gboolean</span> |
| 475 |
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> |
| 476 |
<p>Are we at the end of the file?</p> |
| 477 |
<div class="refsect3"> |
| 478 |
<a name="gsf-input-eof.parameters"></a><h4>Parameters</h4> |
| 479 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 480 |
<colgroup> |
| 481 |
<col width="150px" class="parameters_name"> |
| 482 |
<col class="parameters_description"> |
| 483 |
<col width="200px" class="parameters_annotations"> |
| 484 |
</colgroup> |
| 485 |
<tbody><tr> |
| 486 |
<td class="parameter_name"><p>input</p></td> |
| 487 |
<td class="parameter_description"><p>the input</p></td> |
| 488 |
<td class="parameter_annotations"> </td> |
| 489 |
</tr></tbody> |
| 490 |
</table></div> |
| 491 |
</div> |
| 492 |
<div class="refsect3"> |
| 493 |
<a name="gsf-input-eof.returns"></a><h4>Returns</h4> |
| 494 |
<p> <code class="literal">TRUE</code> if the input is at the eof.</p> |
| 495 |
</div> |
| 496 |
</div> |
| 497 |
<hr> |
| 498 |
<div class="refsect2"> |
| 499 |
<a name="gsf-input-remaining"></a><h3>gsf_input_remaining ()</h3> |
| 500 |
<pre class="programlisting"><a class="link" href="gsf-Utilities.html#gsf-off-t" title="gsf_off_t"><span class="returnvalue">gsf_off_t</span></a> |
| 501 |
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> |
| 502 |
<div class="refsect3"> |
| 503 |
<a name="gsf-input-remaining.parameters"></a><h4>Parameters</h4> |
| 504 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 505 |
<colgroup> |
| 506 |
<col width="150px" class="parameters_name"> |
| 507 |
<col class="parameters_description"> |
| 508 |
<col width="200px" class="parameters_annotations"> |
| 509 |
</colgroup> |
| 510 |
<tbody><tr> |
| 511 |
<td class="parameter_name"><p>input</p></td> |
| 512 |
<td class="parameter_description"><p>the input stream</p></td> |
| 513 |
<td class="parameter_annotations"> </td> |
| 514 |
</tr></tbody> |
| 515 |
</table></div> |
| 516 |
</div> |
| 517 |
<div class="refsect3"> |
| 518 |
<a name="gsf-input-remaining.returns"></a><h4>Returns</h4> |
| 519 |
<p> the number of bytes left in the file.</p> |
| 520 |
</div> |
| 521 |
</div> |
| 522 |
<hr> |
| 523 |
<div class="refsect2"> |
| 524 |
<a name="gsf-input-error-id"></a><h3>gsf_input_error_id ()</h3> |
| 525 |
<pre class="programlisting"><span class="returnvalue">GQuark</span> |
| 526 |
gsf_input_error_id (<em class="parameter"><code><span class="type">void</span></code></em>);</pre> |
| 527 |
<div class="refsect3"> |
| 528 |
<a name="gsf-input-error-id.returns"></a><h4>Returns</h4> |
| 529 |
<p> A utility quark to flag a <span class="type">GError</span> as being an input problem.</p> |
| 530 |
</div> |
| 531 |
</div> |
| 532 |
<hr> |
| 533 |
<div class="refsect2"> |
| 534 |
<a name="gsf-input-sibling"></a><h3>gsf_input_sibling ()</h3> |
| 535 |
<pre class="programlisting"><a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="returnvalue">GsfInput</span></a> * |
| 536 |
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>, |
| 537 |
<em class="parameter"><code><span class="type">char</span> const *name</code></em>, |
| 538 |
<em class="parameter"><code><span class="type">GError</span> **err</code></em>);</pre> |
| 539 |
<p>UNIMPLEMENTED BY ANY BACKEND |
| 540 |
and it is probably unnecessary. gsf_input_get_container provides |
| 541 |
enough power to do what is necessary.</p> |
| 542 |
<p>Attempts to open a 'sibling' of <em class="parameter"><code>input</code></em> |
| 543 |
. The caller is responsible for |
| 544 |
managing the resulting object.</p> |
| 545 |
<p><span class="annotation">[<acronym title="This is the invoker for a virtual method."><span class="acronym">virtual</span></acronym> OpenSibling]</span></p> |
| 546 |
<div class="refsect3"> |
| 547 |
<a name="gsf-input-sibling.parameters"></a><h4>Parameters</h4> |
| 548 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 549 |
<colgroup> |
| 550 |
<col width="150px" class="parameters_name"> |
| 551 |
<col class="parameters_description"> |
| 552 |
<col width="200px" class="parameters_annotations"> |
| 553 |
</colgroup> |
| 554 |
<tbody> |
| 555 |
<tr> |
| 556 |
<td class="parameter_name"><p>input</p></td> |
| 557 |
<td class="parameter_description"><p>The input</p></td> |
| 558 |
<td class="parameter_annotations"> </td> |
| 559 |
</tr> |
| 560 |
<tr> |
| 561 |
<td class="parameter_name"><p>name</p></td> |
| 562 |
<td class="parameter_description"><p>name.</p></td> |
| 563 |
<td class="parameter_annotations"> </td> |
| 564 |
</tr> |
| 565 |
<tr> |
| 566 |
<td class="parameter_name"><p>err</p></td> |
| 567 |
<td class="parameter_description"><p>place to store a <span class="type">GError</span> if anything goes wrong. </p></td> |
| 568 |
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td> |
| 569 |
</tr> |
| 570 |
</tbody> |
| 571 |
</table></div> |
| 572 |
</div> |
| 573 |
<div class="refsect3"> |
| 574 |
<a name="gsf-input-sibling.returns"></a><h4>Returns</h4> |
| 575 |
<p>A related <a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="type">GsfInput</span></a>. </p> |
| 576 |
<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> |
| 577 |
</div> |
| 578 |
</div> |
| 579 |
<hr> |
| 580 |
<div class="refsect2"> |
| 581 |
<a name="gsf-input-error"></a><h3>gsf_input_error ()</h3> |
| 582 |
<pre class="programlisting"><span class="returnvalue">GQuark</span> |
| 583 |
gsf_input_error (<em class="parameter"><code><span class="type">void</span></code></em>);</pre> |
| 584 |
<div class="warning"><p><code class="literal">gsf_input_error</code> is deprecated and should not be used in newly-written code.</p></div> |
| 585 |
<p>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.</p> |
| 586 |
<div class="refsect3"> |
| 587 |
<a name="gsf-input-error.returns"></a><h4>Returns</h4> |
| 588 |
<p> A utility quark to flag a <span class="type">GError</span> as being an input problem.</p> |
| 589 |
</div> |
| 590 |
</div> |
| 591 |
<hr> |
| 592 |
<div class="refsect2"> |
| 593 |
<a name="gsf-input-name"></a><h3>gsf_input_name ()</h3> |
| 594 |
<pre class="programlisting"><span class="returnvalue">char</span> const * |
| 595 |
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> |
| 596 |
<p>The name of the input stream.</p> |
| 597 |
<div class="refsect3"> |
| 598 |
<a name="gsf-input-name.parameters"></a><h4>Parameters</h4> |
| 599 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 600 |
<colgroup> |
| 601 |
<col width="150px" class="parameters_name"> |
| 602 |
<col class="parameters_description"> |
| 603 |
<col width="200px" class="parameters_annotations"> |
| 604 |
</colgroup> |
| 605 |
<tbody><tr> |
| 606 |
<td class="parameter_name"><p>input</p></td> |
| 607 |
<td class="parameter_description"><p>the input stream</p></td> |
| 608 |
<td class="parameter_annotations"> </td> |
| 609 |
</tr></tbody> |
| 610 |
</table></div> |
| 611 |
</div> |
| 612 |
<div class="refsect3"> |
| 613 |
<a name="gsf-input-name.returns"></a><h4>Returns</h4> |
| 614 |
<p><em class="parameter"><code>input</code></em> |
| 615 |
's name in utf8 form, or <code class="literal">NULL</code> if it |
| 616 |
has no name. </p> |
| 617 |
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> |
| 618 |
</div> |
| 619 |
</div> |
| 620 |
<hr> |
| 621 |
<div class="refsect2"> |
| 622 |
<a name="gsf-input-set-name-from-filename"></a><h3>gsf_input_set_name_from_filename ()</h3> |
| 623 |
<pre class="programlisting"><span class="returnvalue">gboolean</span> |
| 624 |
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>, |
| 625 |
<em class="parameter"><code><span class="type">char</span> const *filename</code></em>);</pre> |
| 626 |
<p>protected.</p> |
| 627 |
<div class="refsect3"> |
| 628 |
<a name="gsf-input-set-name-from-filename.parameters"></a><h4>Parameters</h4> |
| 629 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 630 |
<colgroup> |
| 631 |
<col width="150px" class="parameters_name"> |
| 632 |
<col class="parameters_description"> |
| 633 |
<col width="200px" class="parameters_annotations"> |
| 634 |
</colgroup> |
| 635 |
<tbody> |
| 636 |
<tr> |
| 637 |
<td class="parameter_name"><p>input</p></td> |
| 638 |
<td class="parameter_description"><p>the input stream</p></td> |
| 639 |
<td class="parameter_annotations"> </td> |
| 640 |
</tr> |
| 641 |
<tr> |
| 642 |
<td class="parameter_name"><p>filename</p></td> |
| 643 |
<td class="parameter_description"><p>the (fs-sys encoded) filename</p></td> |
| 644 |
<td class="parameter_annotations"> </td> |
| 645 |
</tr> |
| 646 |
</tbody> |
| 647 |
</table></div> |
| 648 |
</div> |
| 649 |
<div class="refsect3"> |
| 650 |
<a name="gsf-input-set-name-from-filename.returns"></a><h4>Returns</h4> |
| 651 |
<p> <code class="literal">TRUE</code> if the assignment was ok.</p> |
| 652 |
</div> |
| 653 |
</div> |
| 654 |
<hr> |
| 655 |
<div class="refsect2"> |
| 656 |
<a name="gsf-input-proxy-new"></a><h3>gsf_input_proxy_new ()</h3> |
| 657 |
<pre class="programlisting"><a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="returnvalue">GsfInput</span></a> * |
| 658 |
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> |
| 659 |
<p>This creates a new proxy to the entire, given input source. See |
| 660 |
gsf_input_proxy_new_section for details.</p> |
| 661 |
<div class="refsect3"> |
| 662 |
<a name="gsf-input-proxy-new.parameters"></a><h4>Parameters</h4> |
| 663 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 664 |
<colgroup> |
| 665 |
<col width="150px" class="parameters_name"> |
| 666 |
<col class="parameters_description"> |
| 667 |
<col width="200px" class="parameters_annotations"> |
| 668 |
</colgroup> |
| 669 |
<tbody><tr> |
| 670 |
<td class="parameter_name"><p>source</p></td> |
| 671 |
<td class="parameter_description"><p>The underlying data source.</p></td> |
| 672 |
<td class="parameter_annotations"> </td> |
| 673 |
</tr></tbody> |
| 674 |
</table></div> |
| 675 |
</div> |
| 676 |
<div class="refsect3"> |
| 677 |
<a name="gsf-input-proxy-new.returns"></a><h4>Returns</h4> |
| 678 |
<p> a new input object.</p> |
| 679 |
</div> |
| 680 |
</div> |
| 681 |
<hr> |
| 682 |
<div class="refsect2"> |
| 683 |
<a name="gsf-input-proxy-new-section"></a><h3>gsf_input_proxy_new_section ()</h3> |
| 684 |
<pre class="programlisting"><a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="returnvalue">GsfInput</span></a> * |
| 685 |
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>, |
| 686 |
<em class="parameter"><code><a class="link" href="gsf-Utilities.html#gsf-off-t" title="gsf_off_t"><span class="type">gsf_off_t</span></a> offset</code></em>, |
| 687 |
<em class="parameter"><code><a class="link" href="gsf-Utilities.html#gsf-off-t" title="gsf_off_t"><span class="type">gsf_off_t</span></a> size</code></em>);</pre> |
| 688 |
<p>This creates a new proxy to a section of the given source. The new |
| 689 |
object will have its own current position, but any operation on it |
| 690 |
can change the source's position.</p> |
| 691 |
<p>If a proxy to a proxy is created, the intermediate proxy is short- |
| 692 |
circuited.</p> |
| 693 |
<p>This function will ref the source.</p> |
| 694 |
<div class="refsect3"> |
| 695 |
<a name="gsf-input-proxy-new-section.parameters"></a><h4>Parameters</h4> |
| 696 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 697 |
<colgroup> |
| 698 |
<col width="150px" class="parameters_name"> |
| 699 |
<col class="parameters_description"> |
| 700 |
<col width="200px" class="parameters_annotations"> |
| 701 |
</colgroup> |
| 702 |
<tbody> |
| 703 |
<tr> |
| 704 |
<td class="parameter_name"><p>source</p></td> |
| 705 |
<td class="parameter_description"><p>The underlying data source.</p></td> |
| 706 |
<td class="parameter_annotations"> </td> |
| 707 |
</tr> |
| 708 |
<tr> |
| 709 |
<td class="parameter_name"><p>offset</p></td> |
| 710 |
<td class="parameter_description"><p>Offset into source for start of section.</p></td> |
| 711 |
<td class="parameter_annotations"> </td> |
| 712 |
</tr> |
| 713 |
<tr> |
| 714 |
<td class="parameter_name"><p>size</p></td> |
| 715 |
<td class="parameter_description"><p>Length of section.</p></td> |
| 716 |
<td class="parameter_annotations"> </td> |
| 717 |
</tr> |
| 718 |
</tbody> |
| 719 |
</table></div> |
| 720 |
</div> |
| 721 |
<div class="refsect3"> |
| 722 |
<a name="gsf-input-proxy-new-section.returns"></a><h4>Returns</h4> |
| 723 |
<p> a new input object.</p> |
| 724 |
</div> |
| 725 |
</div> |
| 726 |
<hr> |
| 727 |
<div class="refsect2"> |
| 728 |
<a name="gsf-input-copy"></a><h3>gsf_input_copy ()</h3> |
| 729 |
<pre class="programlisting"><span class="returnvalue">gboolean</span> |
| 730 |
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>, |
| 731 |
<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> |
| 732 |
<p>Copy the contents from <em class="parameter"><code>input</code></em> |
| 733 |
to <em class="parameter"><code>output</code></em> |
| 734 |
from their respective |
| 735 |
current positions. So if you want to be sure to copy *everything*, |
| 736 |
make sure to call gsf_input_seek (input, 0, G_SEEK_SET) and |
| 737 |
gsf_output_seek (output, 0, G_SEEK_SET) first, if applicable.</p> |
| 738 |
<div class="refsect3"> |
| 739 |
<a name="gsf-input-copy.parameters"></a><h4>Parameters</h4> |
| 740 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 741 |
<colgroup> |
| 742 |
<col width="150px" class="parameters_name"> |
| 743 |
<col class="parameters_description"> |
| 744 |
<col width="200px" class="parameters_annotations"> |
| 745 |
</colgroup> |
| 746 |
<tbody> |
| 747 |
<tr> |
| 748 |
<td class="parameter_name"><p>input</p></td> |
| 749 |
<td class="parameter_description"><p>a non-null <a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="type">GsfInput</span></a></p></td> |
| 750 |
<td class="parameter_annotations"> </td> |
| 751 |
</tr> |
| 752 |
<tr> |
| 753 |
<td class="parameter_name"><p>output</p></td> |
| 754 |
<td class="parameter_description"><p>a non-null <a class="link" href="gsf-Output-to-unstructured-files.html#GsfOutput"><span class="type">GsfOutput</span></a></p></td> |
| 755 |
<td class="parameter_annotations"> </td> |
| 756 |
</tr> |
| 757 |
</tbody> |
| 758 |
</table></div> |
| 759 |
</div> |
| 760 |
<div class="refsect3"> |
| 761 |
<a name="gsf-input-copy.returns"></a><h4>Returns</h4> |
| 762 |
<p> <code class="literal">TRUE</code> on success</p> |
| 763 |
</div> |
| 764 |
</div> |
| 765 |
<hr> |
| 766 |
<div class="refsect2"> |
| 767 |
<a name="gsf-input-uncompress"></a><h3>gsf_input_uncompress ()</h3> |
| 768 |
<pre class="programlisting"><a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="returnvalue">GsfInput</span></a> * |
| 769 |
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> |
| 770 |
<p>This functions takes ownership of the incoming reference and yields a |
| 771 |
new one as its output.</p> |
| 772 |
<div class="refsect3"> |
| 773 |
<a name="gsf-input-uncompress.parameters"></a><h4>Parameters</h4> |
| 774 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 775 |
<colgroup> |
| 776 |
<col width="150px" class="parameters_name"> |
| 777 |
<col class="parameters_description"> |
| 778 |
<col width="200px" class="parameters_annotations"> |
| 779 |
</colgroup> |
| 780 |
<tbody><tr> |
| 781 |
<td class="parameter_name"><p>src</p></td> |
| 782 |
<td class="parameter_description"><p>stream to be uncompressed. </p></td> |
| 783 |
<td class="parameter_annotations"><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></td> |
| 784 |
</tr></tbody> |
| 785 |
</table></div> |
| 786 |
</div> |
| 787 |
<div class="refsect3"> |
| 788 |
<a name="gsf-input-uncompress.returns"></a><h4>Returns</h4> |
| 789 |
<p>A stream equivalent to the source stream, |
| 790 |
but uncompressed if the source was compressed. </p> |
| 791 |
<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> |
| 792 |
</div> |
| 793 |
</div> |
| 794 |
</div> |
| 795 |
<div class="refsect1"> |
| 796 |
<a name="gsf-Input-from-unstructured-files.other_details"></a><h2>Types and Values</h2> |
| 797 |
<div class="refsect2"> |
| 798 |
<a name="GsfInput-struct"></a><h3>GsfInput</h3> |
| 799 |
<pre class="programlisting">typedef struct _GsfInput GsfInput;</pre> |
| 800 |
<p>Class representing an input stream.</p> |
| 801 |
</div> |
| 802 |
<hr> |
| 803 |
<div class="refsect2"> |
| 804 |
<a name="GsfInputProxy-struct"></a><h3>GsfInputProxy</h3> |
| 805 |
<pre class="programlisting">typedef struct _GsfInputProxy GsfInputProxy;</pre> |
| 806 |
</div> |
| 807 |
</div> |
| 808 |
<div class="refsect1"> |
| 809 |
<a name="gsf-Input-from-unstructured-files.property-details"></a><h2>Property Details</h2> |
| 810 |
<div class="refsect2"> |
| 811 |
<a name="GsfInput--container"></a><h3>The <code class="literal">“container”</code> property</h3> |
| 812 |
<pre class="programlisting"> “container” <a class="link" href="gsf-Infile-reading-structed-files.html#GsfInfile"><span class="type">GsfInfile</span></a> *</pre> |
| 813 |
<p>The container, optionally <code class="literal">NULL</code>, in which this input lives.</p> |
| 814 |
<p>Owner: GsfInput</p> |
| 815 |
<p>Flags: Read</p> |
| 816 |
</div> |
| 817 |
<hr> |
| 818 |
<div class="refsect2"> |
| 819 |
<a name="GsfInput--eof"></a><h3>The <code class="literal">“eof”</code> property</h3> |
| 820 |
<pre class="programlisting"> “eof” <span class="type">gboolean</span></pre> |
| 821 |
<p><code class="literal">TRUE</code> if the end of the file has been reached.</p> |
| 822 |
<p>Owner: GsfInput</p> |
| 823 |
<p>Flags: Read</p> |
| 824 |
<p>Default value: FALSE</p> |
| 825 |
</div> |
| 826 |
<hr> |
| 827 |
<div class="refsect2"> |
| 828 |
<a name="GsfInput--modtime"></a><h3>The <code class="literal">“modtime”</code> property</h3> |
| 829 |
<pre class="programlisting"> “modtime” <span class="type">GDateTime</span> *</pre> |
| 830 |
<p>The time the input was last updated. This represents the |
| 831 |
timestamp from the originating file or <em class="parameter"><code>GsfInfile</code></em> |
| 832 |
member. |
| 833 |
It is not supported by all derived classes.</p> |
| 834 |
<p>Owner: GsfInput</p> |
| 835 |
<p>Flags: Read</p> |
| 836 |
</div> |
| 837 |
<hr> |
| 838 |
<div class="refsect2"> |
| 839 |
<a name="GsfInput--name"></a><h3>The <code class="literal">“name”</code> property</h3> |
| 840 |
<pre class="programlisting"> “name” <span class="type">char</span> *</pre> |
| 841 |
<p>The input's name.</p> |
| 842 |
<p>Owner: GsfInput</p> |
| 843 |
<p>Flags: Read</p> |
| 844 |
<p>Default value: NULL</p> |
| 845 |
</div> |
| 846 |
<hr> |
| 847 |
<div class="refsect2"> |
| 848 |
<a name="GsfInput--position"></a><h3>The <code class="literal">“position”</code> property</h3> |
| 849 |
<pre class="programlisting"> “position” <span class="type">gint64</span></pre> |
| 850 |
<p>The current position in the input.</p> |
| 851 |
<p>Owner: GsfInput</p> |
| 852 |
<p>Flags: Read</p> |
| 853 |
<p>Allowed values: >= 0</p> |
| 854 |
<p>Default value: 0</p> |
| 855 |
</div> |
| 856 |
<hr> |
| 857 |
<div class="refsect2"> |
| 858 |
<a name="GsfInput--remaining"></a><h3>The <code class="literal">“remaining”</code> property</h3> |
| 859 |
<pre class="programlisting"> “remaining” <span class="type">gint64</span></pre> |
| 860 |
<p>The number of bytes remaining in the file.</p> |
| 861 |
<p>Owner: GsfInput</p> |
| 862 |
<p>Flags: Read</p> |
| 863 |
<p>Allowed values: >= 0</p> |
| 864 |
<p>Default value: 0</p> |
| 865 |
</div> |
| 866 |
<hr> |
| 867 |
<div class="refsect2"> |
| 868 |
<a name="GsfInput--size"></a><h3>The <code class="literal">“size”</code> property</h3> |
| 869 |
<pre class="programlisting"> “size” <span class="type">gint64</span></pre> |
| 870 |
<p>The total number of bytes in the file.</p> |
| 871 |
<p>Owner: GsfInput</p> |
| 872 |
<p>Flags: Read</p> |
| 873 |
<p>Allowed values: >= 0</p> |
| 874 |
<p>Default value: 0</p> |
| 875 |
</div> |
| 876 |
</div> |
| 877 |
</div> |
| 878 |
<div class="footer"> |
| 879 |
<hr>Generated by GTK-Doc V1.34.0</div> |
| 880 |
</body> |
| 881 |
</html> |