1
1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
5
<title>GMemoryInputStream</title>
6
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
7
<link rel="start" href="index.html" title="GIO Reference Manual">
6
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
7
<link rel="home" href="index.html" title="GIO Reference Manual">
8
8
<link rel="up" href="streaming.html" title="Streaming I/O">
9
9
<link rel="prev" href="GFilterOutputStream.html" title="GFilterOutputStream">
10
10
<link rel="next" href="GMemoryOutputStream.html" title="GMemoryOutputStream">
11
<meta name="generator" content="GTK-Doc V1.9 (XML mode)">
11
<meta name="generator" content="GTK-Doc V1.11 (XML mode)">
12
12
<link rel="stylesheet" href="style.css" type="text/css">
13
<link rel="part" href="pt01.html" title="Part I. GIO Overview">
13
<link rel="part" href="pt01.html" title="Part I. GIO Overview">
14
14
<link rel="chapter" href="ch01.html" title="Introduction">
15
15
<link rel="chapter" href="ch02.html" title="Compiling GIO applications">
16
16
<link rel="chapter" href="ch03.html" title="Running GIO applications">
17
<link rel="chapter" href="gio-extension-points.html" title="Extending GIO">
18
<link rel="part" href="pt02.html" title="Part II. API Reference">
17
<link rel="chapter" href="extending-gio.html" title="Extending GIO">
18
<link rel="part" href="pt02.html" title="Part II. API Reference">
19
19
<link rel="chapter" href="file_ops.html" title="File Operations">
20
20
<link rel="chapter" href="file_mon.html" title="File System Monitoring">
21
21
<link rel="chapter" href="async.html" title="Asynchronous I/O">
25
25
<link rel="chapter" href="icons.html" title="Icons">
26
26
<link rel="chapter" href="utils.html" title="Utilities">
27
27
<link rel="chapter" href="extending.html" title="Extending GIO">
28
<link rel="part" href="migrating.html" title="Part III. Migrating to GIO">
28
<link rel="part" href="migrating.html" title="Part III. Migrating to GIO">
29
29
<link rel="chapter" href="ch14.html" title="Migrating from POSIX to GIO">
30
30
<link rel="chapter" href="ch15.html" title="Migrating from GnomeVFS to GIO">
31
31
<link rel="chapter" href="gio-hierarchy.html" title="Object Hierarchy">
32
32
<link rel="index" href="ix01.html" title="Index">
33
<link rel="index" href="ix02.html" title="Index of new symbols in 2.18">
34
35
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
35
36
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
40
41
<th width="100%" align="center">GIO Reference Manual</th>
41
42
<td><a accesskey="n" href="GMemoryOutputStream.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
43
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2767617" class="shortcut">Top</a>
45
<a href="#id2847141" class="shortcut">Description</a>
47
<a href="#id2847090" class="shortcut">Object Hierarchy</a>
49
<a href="#id2847120" class="shortcut">Implemented Interfaces</a></nobr></td></tr>
44
<tr><td colspan="5" class="shortcuts">
45
<a href="#GMemoryInputStream.synopsis" class="shortcut">Top</a>
47
<a href="#GMemoryInputStream.description" class="shortcut">Description</a>
49
<a href="#GMemoryInputStream.object-hierarchy" class="shortcut">Object Hierarchy</a>
51
<a href="#GMemoryInputStream.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
51
54
<div class="refentry" lang="en">
52
55
<a name="GMemoryInputStream"></a><div class="titlepage"></div>
53
56
<div class="refnamediv"><table width="100%"><tr>
56
<a name="id2767617"></a><span class="refentrytitle">GMemoryInputStream</span>
58
<p>GMemoryInputStream — Streaming input operations on memory chunks</p>
58
<h2><span class="refentrytitle"><a name="GMemoryInputStream.top_of_page"></a>GMemoryInputStream</span></h2>
59
<p>GMemoryInputStream — Streaming input operations on memory chunks</p>
60
61
<td valign="top" align="right"></td>
61
62
</tr></table></div>
62
63
<div class="refsynopsisdiv">
64
<a name="GMemoryInputStream.synopsis"></a><h2>Synopsis</h2>
64
65
<pre class="synopsis">
66
67
#include <gio/gio.h>
69
<a class="link" href="GMemoryInputStream.html#GMemoryInputStream-struct">GMemoryInputStream</a>;
70
<a class="link" href="GInputStream.html" title="GInputStream">GInputStream</a>* <a class="link" href="GMemoryInputStream.html#g-memory-input-stream-new">g_memory_input_stream_new</a> (void);
71
<a class="link" href="GInputStream.html" title="GInputStream">GInputStream</a>* <a class="link" href="GMemoryInputStream.html#g-memory-input-stream-new-from-data">g_memory_input_stream_new_from_data</a> (const void *data,
69
<a class="link" href="GMemoryInputStream.html#GMemoryInputStream-struct" title="GMemoryInputStream">GMemoryInputStream</a>;
70
<a class="link" href="GInputStream.html" title="GInputStream">GInputStream</a> * <a class="link" href="GMemoryInputStream.html#g-memory-input-stream-new" title="g_memory_input_stream_new ()">g_memory_input_stream_new</a> (void);
71
<a class="link" href="GInputStream.html" title="GInputStream">GInputStream</a> * <a class="link" href="GMemoryInputStream.html#g-memory-input-stream-new-from-data" title="g_memory_input_stream_new_from_data ()">g_memory_input_stream_new_from_data</a> (const void *data,
73
73
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gssize"
76
76
href="/usr/share/gtk-doc/html/glib/glib-Datasets.html#GDestroyNotify"
77
77
>GDestroyNotify</a> destroy);
78
void <a class="link" href="GMemoryInputStream.html#g-memory-input-stream-add-data">g_memory_input_stream_add_data</a> (<a class="link" href="GMemoryInputStream.html" title="GMemoryInputStream">GMemoryInputStream</a> *stream,
78
void <a class="link" href="GMemoryInputStream.html#g-memory-input-stream-add-data" title="g_memory_input_stream_add_data ()">g_memory_input_stream_add_data</a> (<a class="link" href="GMemoryInputStream.html" title="GMemoryInputStream">GMemoryInputStream</a> *stream,
81
81
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gssize"
84
84
href="/usr/share/gtk-doc/html/glib/glib-Datasets.html#GDestroyNotify"
85
85
>GDestroyNotify</a> destroy);
90
88
<div class="refsect1" lang="en">
91
<a name="id2847090"></a><h2>Object Hierarchy</h2>
89
<a name="GMemoryInputStream.object-hierarchy"></a><h2>Object Hierarchy</h2>
92
90
<pre class="synopsis">
95
92
href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject"
101
98
<div class="refsect1" lang="en">
102
<a name="id2847120"></a><h2>Implemented Interfaces</h2>
99
<a name="GMemoryInputStream.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
104
101
GMemoryInputStream implements
105
102
<a class="link" href="GSeekable.html" title="GSeekable">GSeekable</a>.</p>
107
104
<div class="refsect1" lang="en">
108
<a name="id2847141"></a><h2>Description</h2>
105
<a name="GMemoryInputStream.description"></a><h2>Description</h2>
110
107
<a class="link" href="GMemoryInputStream.html" title="GMemoryInputStream"><span class="type">GMemoryInputStream</span></a> is a class for using arbitrary
111
108
memory chunks as input for GIO streaming input operations.</p>
116
112
<div class="refsect1" lang="en">
117
<a name="id2847169"></a><h2>Details</h2>
113
<a name="GMemoryInputStream.details"></a><h2>Details</h2>
118
114
<div class="refsect2" lang="en">
119
<a name="id2847180"></a><h3>
120
<a name="GMemoryInputStream-struct"></a>GMemoryInputStream</h3>
121
<a class="indexterm" name="id2847192"></a><pre class="programlisting">typedef struct _GMemoryInputStream GMemoryInputStream;</pre>
115
<a name="GMemoryInputStream-struct"></a><h3>GMemoryInputStream</h3>
116
<pre class="programlisting">typedef struct _GMemoryInputStream GMemoryInputStream;</pre>
123
118
Implements <a class="link" href="GInputStream.html" title="GInputStream"><span class="type">GInputStream</span></a> for arbitrary memory chunks.</p>
129
123
<div class="refsect2" lang="en">
130
<a name="id2847219"></a><h3>
131
<a name="g-memory-input-stream-new"></a>g_memory_input_stream_new ()</h3>
132
<a class="indexterm" name="id2847230"></a><pre class="programlisting"><a class="link" href="GInputStream.html" title="GInputStream">GInputStream</a>* g_memory_input_stream_new (void);</pre>
124
<a name="g-memory-input-stream-new"></a><h3>g_memory_input_stream_new ()</h3>
125
<pre class="programlisting"><a class="link" href="GInputStream.html" title="GInputStream">GInputStream</a> * g_memory_input_stream_new (void);</pre>
134
127
Creates a new empty <a class="link" href="GMemoryInputStream.html" title="GMemoryInputStream"><span class="type">GMemoryInputStream</span></a>.</p>
138
130
<div class="variablelist"><table border="0">
139
131
<col align="left" valign="top">
141
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
133
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
142
134
<td> a new <a class="link" href="GInputStream.html" title="GInputStream"><span class="type">GInputStream</span></a>
148
140
<div class="refsect2" lang="en">
149
<a name="id2847285"></a><h3>
150
<a name="g-memory-input-stream-new-from-data"></a>g_memory_input_stream_new_from_data ()</h3>
151
<a class="indexterm" name="id2847296"></a><pre class="programlisting"><a class="link" href="GInputStream.html" title="GInputStream">GInputStream</a>* g_memory_input_stream_new_from_data (const void *data,
141
<a name="g-memory-input-stream-new-from-data"></a><h3>g_memory_input_stream_new_from_data ()</h3>
142
<pre class="programlisting"><a class="link" href="GInputStream.html" title="GInputStream">GInputStream</a> * g_memory_input_stream_new_from_data (const void *data,
153
144
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gssize"
159
150
Creates a new <a class="link" href="GMemoryInputStream.html" title="GMemoryInputStream"><span class="type">GMemoryInputStream</span></a> with data in memory of a given size.</p>
163
153
<div class="variablelist"><table border="0">
164
154
<col align="left" valign="top">
167
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
157
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
172
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
162
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
173
163
<td> length of the data, may be -1 if <em class="parameter"><code>data</code></em> is a nul-terminated string
177
<td><p><span class="term"><em class="parameter"><code>destroy</code></em> :</span></p></td>
167
<td><p><span class="term"><em class="parameter"><code>destroy</code></em> :</span></p></td>
178
168
<td> function that is called to free <em class="parameter"><code>data</code></em>, or <a
179
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"
169
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL--CAPS"
180
170
><code class="literal">NULL</code></a>
184
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
174
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
185
175
<td> new <a class="link" href="GInputStream.html" title="GInputStream"><span class="type">GInputStream</span></a> read from <em class="parameter"><code>data</code></em> of <em class="parameter"><code>len</code></em> bytes.
192
182
<div class="refsect2" lang="en">
193
<a name="id2847446"></a><h3>
194
<a name="g-memory-input-stream-add-data"></a>g_memory_input_stream_add_data ()</h3>
195
<a class="indexterm" name="id2847457"></a><pre class="programlisting">void g_memory_input_stream_add_data (<a class="link" href="GMemoryInputStream.html" title="GMemoryInputStream">GMemoryInputStream</a> *stream,
183
<a name="g-memory-input-stream-add-data"></a><h3>g_memory_input_stream_add_data ()</h3>
184
<pre class="programlisting">void g_memory_input_stream_add_data (<a class="link" href="GMemoryInputStream.html" title="GMemoryInputStream">GMemoryInputStream</a> *stream,
196
185
const void *data,
198
187
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gssize"
204
193
Appends <em class="parameter"><code>data</code></em> to data that can be read from the input stream</p>
208
196
<div class="variablelist"><table border="0">
209
197
<col align="left" valign="top">
212
<td><p><span class="term"><em class="parameter"><code>stream</code></em> :</span></p></td>
200
<td><p><span class="term"><em class="parameter"><code>stream</code></em> :</span></p></td>
213
201
<td> a <a class="link" href="GMemoryInputStream.html" title="GMemoryInputStream"><span class="type">GMemoryInputStream</span></a>
217
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
205
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
222
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
210
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
223
211
<td> length of the data, may be -1 if <em class="parameter"><code>data</code></em> is a nul-terminated string
227
<td><p><span class="term"><em class="parameter"><code>destroy</code></em> :</span></p></td>
215
<td><p><span class="term"><em class="parameter"><code>destroy</code></em> :</span></p></td>
228
216
<td> function that is called to free <em class="parameter"><code>data</code></em>, or <a
229
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"
217
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL--CAPS"
230
218
><code class="literal">NULL</code></a>
237
225
<div class="refsect1" lang="en">
238
<a name="id2847607"></a><h2>See Also</h2>
239
<a class="link" href="GMemoryOutputStream.html" title="GMemoryOutputStream"><span class="type">GMemoryOutputStream</span></a>
241
<div class="refsect1" lang="en">
242
<a name="id2847622"></a><div class="refsect2" lang="en"><a name="id2847623"></a></div>
226
<a name="GMemoryInputStream.see-also"></a><h2>See Also</h2>
244
<div class="refsect2" lang="en"><a name="id2847624"></a></div>
232
Generated by GTK-Doc V1.11</div>