Debian Codegraph @

doc/html/gsf-Infile-reading-structed-files.html

raw
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>Infile reading structed 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="sources.html" title="Stream Sources">
9 <link rel="prev" href="sources.html" title="Stream Sources">
10 <link rel="next" href="gsf-Outfile-writing-structed-files.html" title="Outfile writing structed 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-Infile-reading-structed-files.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
19 <a href="#gsf-Infile-reading-structed-files.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
20 </td>
21 <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
22 <td><a accesskey="u" href="sources.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
23 <td><a accesskey="p" href="sources.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
24 <td><a accesskey="n" href="gsf-Outfile-writing-structed-files.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
25 </tr></table>
26 <div class="refentry">
27 <a name="gsf-Infile-reading-structed-files"></a><div class="titlepage"></div>
28 <div class="refnamediv"><table width="100%"><tr>
29 <td valign="top">
30 <h2><span class="refentrytitle"><a name="gsf-Infile-reading-structed-files.top_of_page"></a>Infile reading structed files</span></h2>
31 <p>Infile reading structed files</p>
32 </td>
33 <td class="gallery_image" valign="top" align="right"></td>
34 </tr></table></div>
35 <div class="refsect1">
36 <a name="gsf-Infile-reading-structed-files.functions"></a><h2>Functions</h2>
37 <div class="informaltable"><table class="informaltable" width="100%" border="0">
38 <colgroup>
39 <col width="150px" class="functions_proto_type">
40 <col class="functions_proto_name">
41 </colgroup>
42 <tbody>
43 <tr>
44 <td class="function_type">
45 <span class="returnvalue">int</span>
46 </td>
47 <td class="function_name">
48 <a class="link" href="gsf-Infile-reading-structed-files.html#gsf-infile-num-children" title="gsf_infile_num_children ()">gsf_infile_num_children</a> <span class="c_punctuation">()</span>
49 </td>
50 </tr>
51 <tr>
52 <td class="function_type">
53 <a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="returnvalue">GsfInput</span></a> *
54 </td>
55 <td class="function_name">
56 <a class="link" href="gsf-Infile-reading-structed-files.html#gsf-infile-child-by-index" title="gsf_infile_child_by_index ()">gsf_infile_child_by_index</a> <span class="c_punctuation">()</span>
57 </td>
58 </tr>
59 <tr>
60 <td class="function_type">
61 <a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="returnvalue">GsfInput</span></a> *
62 </td>
63 <td class="function_name">
64 <a class="link" href="gsf-Infile-reading-structed-files.html#gsf-infile-child-by-name" title="gsf_infile_child_by_name ()">gsf_infile_child_by_name</a> <span class="c_punctuation">()</span>
65 </td>
66 </tr>
67 <tr>
68 <td class="function_type">
69 <a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="returnvalue">GsfInput</span></a> *
70 </td>
71 <td class="function_name">
72 <a class="link" href="gsf-Infile-reading-structed-files.html#gsf-infile-child-by-vname" title="gsf_infile_child_by_vname ()">gsf_infile_child_by_vname</a> <span class="c_punctuation">()</span>
73 </td>
74 </tr>
75 <tr>
76 <td class="function_type">
77 <a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="returnvalue">GsfInput</span></a> *
78 </td>
79 <td class="function_name">
80 <a class="link" href="gsf-Infile-reading-structed-files.html#gsf-infile-child-by-aname" title="gsf_infile_child_by_aname ()">gsf_infile_child_by_aname</a> <span class="c_punctuation">()</span>
81 </td>
82 </tr>
83 <tr>
84 <td class="function_type">
85 <a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="returnvalue">GsfInput</span></a> *
86 </td>
87 <td class="function_name">
88 <a class="link" href="gsf-Infile-reading-structed-files.html#gsf-infile-child-by-vaname" title="gsf_infile_child_by_vaname ()">gsf_infile_child_by_vaname</a> <span class="c_punctuation">()</span>
89 </td>
90 </tr>
91 <tr>
92 <td class="function_type">
93 <span class="returnvalue">char</span> const *
94 </td>
95 <td class="function_name">
96 <a class="link" href="gsf-Infile-reading-structed-files.html#gsf-infile-name-by-index" title="gsf_infile_name_by_index ()">gsf_infile_name_by_index</a> <span class="c_punctuation">()</span>
97 </td>
98 </tr>
99 </tbody>
100 </table></div>
101 </div>
102 <a name="GsfInfile"></a><div class="refsect1">
103 <a name="gsf-Infile-reading-structed-files.other"></a><h2>Types and Values</h2>
104 <div class="informaltable"><table class="informaltable" width="100%" border="0">
105 <colgroup>
106 <col width="150px" class="other_proto_type">
107 <col class="other_proto_name">
108 </colgroup>
109 <tbody><tr>
110 <td class="datatype_keyword"> </td>
111 <td class="function_name"><a class="link" href="gsf-Infile-reading-structed-files.html#GsfInfile-struct" title="GsfInfile">GsfInfile</a></td>
112 </tr></tbody>
113 </table></div>
114 </div>
115 <div class="refsect1">
116 <a name="gsf-Infile-reading-structed-files.object-hierarchy"></a><h2>Object Hierarchy</h2>
117 <pre class="screen"> GObject
118 <span class="lineart">╰──</span> <a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a>
119 <span class="lineart">╰──</span> GsfInfile
120 <span class="lineart">├──</span> <a class="link" href="gsf-MS-OLE2.html#GsfInfileMSOle">GsfInfileMSOle</a>
121 <span class="lineart">├──</span> <a class="link" href="gsf-Reading-and-Writing-from-local-files-and-directories.html#GsfInfileStdio">GsfInfileStdio</a>
122 <span class="lineart">├──</span> GsfInfileTar
123 <span class="lineart">├──</span> <a class="link" href="gsf-Zip.html#GsfInfileZip">GsfInfileZip</a>
124 <span class="lineart">╰──</span> <a class="link" href="gsf-blobs.html#GsfStructuredBlob">GsfStructuredBlob</a>
125 </pre>
126 </div>
127 <div class="refsect1">
128 <a name="gsf-Infile-reading-structed-files.description"></a><h2>Description</h2>
129 </div>
130 <div class="refsect1">
131 <a name="gsf-Infile-reading-structed-files.functions_details"></a><h2>Functions</h2>
132 <div class="refsect2">
133 <a name="gsf-infile-num-children"></a><h3>gsf_infile_num_children ()</h3>
134 <pre class="programlisting"><span class="returnvalue">int</span>
135 gsf_infile_num_children (<em class="parameter"><code><a class="link" href="gsf-Infile-reading-structed-files.html#GsfInfile"><span class="type">GsfInfile</span></a> *infile</code></em>);</pre>
136 <div class="refsect3">
137 <a name="gsf-infile-num-children.parameters"></a><h4>Parameters</h4>
138 <div class="informaltable"><table class="informaltable" width="100%" border="0">
139 <colgroup>
140 <col width="150px" class="parameters_name">
141 <col class="parameters_description">
142 <col width="200px" class="parameters_annotations">
143 </colgroup>
144 <tbody><tr>
145 <td class="parameter_name"><p>infile</p></td>
146 <td class="parameter_description"><p>the structured storage</p></td>
147 <td class="parameter_annotations"> </td>
148 </tr></tbody>
149 </table></div>
150 </div>
151 <div class="refsect3">
152 <a name="gsf-infile-num-children.returns"></a><h4>Returns</h4>
153 <p> the number of children the storage has, or -1 if the storage can not
154 have children.</p>
155 </div>
156 </div>
157 <hr>
158 <div class="refsect2">
159 <a name="gsf-infile-child-by-index"></a><h3>gsf_infile_child_by_index ()</h3>
160 <pre class="programlisting"><a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="returnvalue">GsfInput</span></a> *
161 gsf_infile_child_by_index (<em class="parameter"><code><a class="link" href="gsf-Infile-reading-structed-files.html#GsfInfile"><span class="type">GsfInfile</span></a> *infile</code></em>,
162 <em class="parameter"><code><span class="type">int</span> i</code></em>);</pre>
163 <p>TODO : For 2.0 api will change to include a <span class="type">GError</span>.</p>
164 <div class="refsect3">
165 <a name="gsf-infile-child-by-index.parameters"></a><h4>Parameters</h4>
166 <div class="informaltable"><table class="informaltable" width="100%" border="0">
167 <colgroup>
168 <col width="150px" class="parameters_name">
169 <col class="parameters_description">
170 <col width="200px" class="parameters_annotations">
171 </colgroup>
172 <tbody>
173 <tr>
174 <td class="parameter_name"><p>infile</p></td>
175 <td class="parameter_description"><p><a class="link" href="gsf-Infile-reading-structed-files.html#GsfInfile"><span class="type">GsfInfile</span></a></p></td>
176 <td class="parameter_annotations"> </td>
177 </tr>
178 <tr>
179 <td class="parameter_name"><p>i</p></td>
180 <td class="parameter_description"><p>target index</p></td>
181 <td class="parameter_annotations"> </td>
182 </tr>
183 </tbody>
184 </table></div>
185 </div>
186 <div class="refsect3">
187 <a name="gsf-infile-child-by-index.returns"></a><h4>Returns</h4>
188 <p>a newly created child which must be unrefed. </p>
189 <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>
190 </div>
191 </div>
192 <hr>
193 <div class="refsect2">
194 <a name="gsf-infile-child-by-name"></a><h3>gsf_infile_child_by_name ()</h3>
195 <pre class="programlisting"><a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="returnvalue">GsfInput</span></a> *
196 gsf_infile_child_by_name (<em class="parameter"><code><a class="link" href="gsf-Infile-reading-structed-files.html#GsfInfile"><span class="type">GsfInfile</span></a> *infile</code></em>,
197 <em class="parameter"><code><span class="type">char</span> const *name</code></em>);</pre>
198 <p>The function returns a named child of the given infile. This only
199 works for an immediate child. If you need to go several levels
200 down use gsf_infile_child_by_aname, for example.</p>
201 <p>TODO : For 2.0 api will change to include a <span class="type">GError</span>.</p>
202 <div class="refsect3">
203 <a name="gsf-infile-child-by-name.parameters"></a><h4>Parameters</h4>
204 <div class="informaltable"><table class="informaltable" width="100%" border="0">
205 <colgroup>
206 <col width="150px" class="parameters_name">
207 <col class="parameters_description">
208 <col width="200px" class="parameters_annotations">
209 </colgroup>
210 <tbody>
211 <tr>
212 <td class="parameter_name"><p>infile</p></td>
213 <td class="parameter_description"><p><a class="link" href="gsf-Infile-reading-structed-files.html#GsfInfile"><span class="type">GsfInfile</span></a></p></td>
214 <td class="parameter_annotations"> </td>
215 </tr>
216 <tr>
217 <td class="parameter_name"><p>name</p></td>
218 <td class="parameter_description"><p>target name</p></td>
219 <td class="parameter_annotations"> </td>
220 </tr>
221 </tbody>
222 </table></div>
223 </div>
224 <div class="refsect3">
225 <a name="gsf-infile-child-by-name.returns"></a><h4>Returns</h4>
226 <p>a newly created child which must be
227 unrefed. </p>
228 <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>
229 </div>
230 </div>
231 <hr>
232 <div class="refsect2">
233 <a name="gsf-infile-child-by-vname"></a><h3>gsf_infile_child_by_vname ()</h3>
234 <pre class="programlisting"><a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="returnvalue">GsfInput</span></a> *
235 gsf_infile_child_by_vname (<em class="parameter"><code><a class="link" href="gsf-Infile-reading-structed-files.html#GsfInfile"><span class="type">GsfInfile</span></a> *infile</code></em>,
236 <em class="parameter"><code>...</code></em>);</pre>
237 <p>Apart from the way arguments are specified, this is the same as
238 gsf_infile_child_by_aname. Please see the documentation there.</p>
239 <div class="refsect3">
240 <a name="gsf-infile-child-by-vname.parameters"></a><h4>Parameters</h4>
241 <div class="informaltable"><table class="informaltable" width="100%" border="0">
242 <colgroup>
243 <col width="150px" class="parameters_name">
244 <col class="parameters_description">
245 <col width="200px" class="parameters_annotations">
246 </colgroup>
247 <tbody>
248 <tr>
249 <td class="parameter_name"><p>infile</p></td>
250 <td class="parameter_description"><p>a <a class="link" href="gsf-Infile-reading-structed-files.html#GsfInfile"><span class="type">GsfInfile</span></a></p></td>
251 <td class="parameter_annotations"> </td>
252 </tr>
253 <tr>
254 <td class="parameter_name"><p>...</p></td>
255 <td class="parameter_description"><p>A <code class="literal">NULL</code> terminated list of names</p></td>
256 <td class="parameter_annotations"> </td>
257 </tr>
258 </tbody>
259 </table></div>
260 </div>
261 <div class="refsect3">
262 <a name="gsf-infile-child-by-vname.returns"></a><h4>Returns</h4>
263 <p>a newly created child which must be unrefed. </p>
264 <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>
265 </div>
266 </div>
267 <hr>
268 <div class="refsect2">
269 <a name="gsf-infile-child-by-aname"></a><h3>gsf_infile_child_by_aname ()</h3>
270 <pre class="programlisting"><a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="returnvalue">GsfInput</span></a> *
271 gsf_infile_child_by_aname (<em class="parameter"><code><a class="link" href="gsf-Infile-reading-structed-files.html#GsfInfile"><span class="type">GsfInfile</span></a> *infile</code></em>,
272 <em class="parameter"><code><span class="type">char</span> const *names[]</code></em>);</pre>
273 <p>This function finds a child that is several directory levels down
274 the tree. If, for example, the names "foo", "bar", and "baz" are
275 given, then this function first finds the "foo" directory in the
276 root infile, then locates "bar" within that directory, and finally
277 locates "baz" within that and returns the "baz" child. In other
278 words, this function finds the "foo/bar/baz" child.</p>
279 <p>New in 1.14.9.</p>
280 <div class="refsect3">
281 <a name="gsf-infile-child-by-aname.parameters"></a><h4>Parameters</h4>
282 <div class="informaltable"><table class="informaltable" width="100%" border="0">
283 <colgroup>
284 <col width="150px" class="parameters_name">
285 <col class="parameters_description">
286 <col width="200px" class="parameters_annotations">
287 </colgroup>
288 <tbody>
289 <tr>
290 <td class="parameter_name"><p>infile</p></td>
291 <td class="parameter_description"><p><a class="link" href="gsf-Infile-reading-structed-files.html#GsfInfile"><span class="type">GsfInfile</span></a></p></td>
292 <td class="parameter_annotations"> </td>
293 </tr>
294 <tr>
295 <td class="parameter_name"><p>names</p></td>
296 <td class="parameter_description"><p>A <code class="literal">NULL</code> terminated array of names (e.g. from g_strsplit). </p></td>
297 <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1]</span></td>
298 </tr>
299 </tbody>
300 </table></div>
301 </div>
302 <div class="refsect3">
303 <a name="gsf-infile-child-by-aname.returns"></a><h4>Returns</h4>
304 <p>a newly created child which must be unrefed. </p>
305 <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>
306 </div>
307 </div>
308 <hr>
309 <div class="refsect2">
310 <a name="gsf-infile-child-by-vaname"></a><h3>gsf_infile_child_by_vaname ()</h3>
311 <pre class="programlisting"><a class="link" href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="returnvalue">GsfInput</span></a> *
312 gsf_infile_child_by_vaname (<em class="parameter"><code><a class="link" href="gsf-Infile-reading-structed-files.html#GsfInfile"><span class="type">GsfInfile</span></a> *infile</code></em>,
313 <em class="parameter"><code><span class="type">va_list</span> names</code></em>);</pre>
314 <p>Apart from argument types, this is the same as gsf_infile_child_by_aname.
315 Please see the documentation there.
316 New in 1.14.9.</p>
317 <div class="refsect3">
318 <a name="gsf-infile-child-by-vaname.parameters"></a><h4>Parameters</h4>
319 <div class="informaltable"><table class="informaltable" width="100%" border="0">
320 <colgroup>
321 <col width="150px" class="parameters_name">
322 <col class="parameters_description">
323 <col width="200px" class="parameters_annotations">
324 </colgroup>
325 <tbody>
326 <tr>
327 <td class="parameter_name"><p>infile</p></td>
328 <td class="parameter_description"><p><a class="link" href="gsf-Infile-reading-structed-files.html#GsfInfile"><span class="type">GsfInfile</span></a></p></td>
329 <td class="parameter_annotations"> </td>
330 </tr>
331 <tr>
332 <td class="parameter_name"><p>names</p></td>
333 <td class="parameter_description"><p>A <code class="literal">NULL</code> terminated array of names (e.g. from g_strsplit)</p></td>
334 <td class="parameter_annotations"> </td>
335 </tr>
336 </tbody>
337 </table></div>
338 </div>
339 <div class="refsect3">
340 <a name="gsf-infile-child-by-vaname.returns"></a><h4>Returns</h4>
341 <p>a newly created child which must be unrefed. </p>
342 <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>
343 </div>
344 </div>
345 <hr>
346 <div class="refsect2">
347 <a name="gsf-infile-name-by-index"></a><h3>gsf_infile_name_by_index ()</h3>
348 <pre class="programlisting"><span class="returnvalue">char</span> const *
349 gsf_infile_name_by_index (<em class="parameter"><code><a class="link" href="gsf-Infile-reading-structed-files.html#GsfInfile"><span class="type">GsfInfile</span></a> *infile</code></em>,
350 <em class="parameter"><code><span class="type">int</span> i</code></em>);</pre>
351 <div class="refsect3">
352 <a name="gsf-infile-name-by-index.parameters"></a><h4>Parameters</h4>
353 <div class="informaltable"><table class="informaltable" width="100%" border="0">
354 <colgroup>
355 <col width="150px" class="parameters_name">
356 <col class="parameters_description">
357 <col width="200px" class="parameters_annotations">
358 </colgroup>
359 <tbody>
360 <tr>
361 <td class="parameter_name"><p>infile</p></td>
362 <td class="parameter_description"><p>An <a class="link" href="gsf-Infile-reading-structed-files.html#GsfInfile"><span class="type">GsfInfile</span></a></p></td>
363 <td class="parameter_annotations"> </td>
364 </tr>
365 <tr>
366 <td class="parameter_name"><p>i</p></td>
367 <td class="parameter_description"><p>zero-based index of child to find.</p></td>
368 <td class="parameter_annotations"> </td>
369 </tr>
370 </tbody>
371 </table></div>
372 </div>
373 <div class="refsect3">
374 <a name="gsf-infile-name-by-index.returns"></a><h4>Returns</h4>
375 <p>the utf8 encoded name of the <em class="parameter"><code>i</code></em>
376 -th child. </p>
377 <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>
378 </div>
379 </div>
380 </div>
381 <div class="refsect1">
382 <a name="gsf-Infile-reading-structed-files.other_details"></a><h2>Types and Values</h2>
383 <div class="refsect2">
384 <a name="GsfInfile-struct"></a><h3>GsfInfile</h3>
385 <pre class="programlisting">typedef struct _GsfInfile GsfInfile;</pre>
386 <p>Class representing an input file.</p>
387 </div>
388 </div>
389 </div>
390 <div class="footer">
391 <hr>Generated by GTK-Doc V1.34.0</div>
392 </body>
393 </html>