File: EvdBufferedInputStream.html

package info (click to toggle)
event-dance 0.1.20-2
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 5,068 kB
  • sloc: ansic: 25,946; sh: 11,340; makefile: 418; xml: 249; python: 27
file content (246 lines) | stat: -rw-r--r-- 20,552 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>EvdBufferedInputStream</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="EventDance - Documentation and Reference Manual">
<link rel="up" href="ch05.html" title="Core">
<link rel="prev" href="EvdThrottledOutputStream.html" title="EvdThrottledOutputStream">
<link rel="next" href="EvdBufferedOutputStream.html" title="EvdBufferedOutputStream">
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="EvdThrottledOutputStream.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch05.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">EventDance - Documentation and Reference Manual</th>
<td><a accesskey="n" href="EvdBufferedOutputStream.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#EvdBufferedInputStream.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#EvdBufferedInputStream.description" class="shortcut">Description</a>
                   | 
                  <a href="#EvdBufferedInputStream.object-hierarchy" class="shortcut">Object Hierarchy</a>
</td></tr>
</table>
<div class="refentry">
<a name="EvdBufferedInputStream"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="EvdBufferedInputStream.top_of_page"></a>EvdBufferedInputStream</span></h2>
<p>EvdBufferedInputStream</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="EvdBufferedInputStream.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">struct              <a class="link" href="EvdBufferedInputStream.html#EvdBufferedInputStream-struct" title="struct EvdBufferedInputStream">EvdBufferedInputStream</a>;
struct              <a class="link" href="EvdBufferedInputStream.html#EvdBufferedInputStreamClass" title="struct EvdBufferedInputStreamClass">EvdBufferedInputStreamClass</a>;
<span class="returnvalue">void</span>                <a class="link" href="EvdBufferedInputStream.html#evd-buffered-input-stream-freeze" title="evd_buffered_input_stream_freeze ()">evd_buffered_input_stream_freeze</a>    (<em class="parameter"><code><a class="link" href="EvdBufferedInputStream.html" title="EvdBufferedInputStream"><span class="type">EvdBufferedInputStream</span></a> *self</code></em>);
<a class="link" href="EvdBufferedInputStream.html" title="EvdBufferedInputStream"><span class="returnvalue">EvdBufferedInputStream</span></a> * <a class="link" href="EvdBufferedInputStream.html#evd-buffered-input-stream-new" title="evd_buffered_input_stream_new ()">evd_buffered_input_stream_new</a>  (<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GInputStream.html"><span class="type">GInputStream</span></a> *base_stream</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *             <a class="link" href="EvdBufferedInputStream.html#evd-buffered-input-stream-read-str" title="evd_buffered_input_stream_read_str ()">evd_buffered_input_stream_read_str</a>  (<em class="parameter"><code><a class="link" href="EvdBufferedInputStream.html" title="EvdBufferedInputStream"><span class="type">EvdBufferedInputStream</span></a> *self</code></em>,
                                                         <em class="parameter"><code><span class="type">gssize</span> *size</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="EvdBufferedInputStream.html#evd-buffered-input-stream-read-str-async" title="evd_buffered_input_stream_read_str_async ()">evd_buffered_input_stream_read_str_async</a>
                                                        (<em class="parameter"><code><a class="link" href="EvdBufferedInputStream.html" title="EvdBufferedInputStream"><span class="type">EvdBufferedInputStream</span></a> *stream</code></em>,
                                                         <em class="parameter"><code><span class="type">gsize</span> count</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> io_priority</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GAsyncResult.html#GAsyncReadyCallback"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *             <a class="link" href="EvdBufferedInputStream.html#evd-buffered-input-stream-read-str-finish" title="evd_buffered_input_stream_read_str_finish ()">evd_buffered_input_stream_read_str_finish</a>
                                                        (<em class="parameter"><code><a class="link" href="EvdBufferedInputStream.html" title="EvdBufferedInputStream"><span class="type">EvdBufferedInputStream</span></a> *self</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GAsyncResult.html"><span class="type">GAsyncResult</span></a> *result</code></em>,
                                                         <em class="parameter"><code><span class="type">gssize</span> *size</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="EvdBufferedInputStream.html#evd-buffered-input-stream-thaw" title="evd_buffered_input_stream_thaw ()">evd_buffered_input_stream_thaw</a>      (<em class="parameter"><code><a class="link" href="EvdBufferedInputStream.html" title="EvdBufferedInputStream"><span class="type">EvdBufferedInputStream</span></a> *self</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> priority</code></em>);
<span class="returnvalue">gssize</span>              <a class="link" href="EvdBufferedInputStream.html#evd-buffered-input-stream-unread" title="evd_buffered_input_stream_unread ()">evd_buffered_input_stream_unread</a>    (<em class="parameter"><code><a class="link" href="EvdBufferedInputStream.html" title="EvdBufferedInputStream"><span class="type">EvdBufferedInputStream</span></a> *self</code></em>,
                                                         <em class="parameter"><code>const <span class="type">void</span> *buffer</code></em>,
                                                         <em class="parameter"><code><span class="type">gsize</span> size</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="EvdBufferedInputStream.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
  <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
   +----<a href="http://library.gnome.org/devel/gio/unstable/GInputStream.html">GInputStream</a>
         +----<a href="http://library.gnome.org/devel/gio/unstable/GFilterInputStream.html">GFilterInputStream</a>
               +----<a href="http://library.gnome.org/devel/gio/unstable/GBufferedInputStream.html">GBufferedInputStream</a>
                     +----EvdBufferedInputStream
</pre>
</div>
<div class="refsect1">
<a name="EvdBufferedInputStream.description"></a><h2>Description</h2>
<p>
</p>
</div>
<div class="refsect1">
<a name="EvdBufferedInputStream.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="EvdBufferedInputStream-struct"></a><h3>struct EvdBufferedInputStream</h3>
<pre class="programlisting">struct EvdBufferedInputStream;</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="EvdBufferedInputStreamClass"></a><h3>struct EvdBufferedInputStreamClass</h3>
<pre class="programlisting">struct EvdBufferedInputStreamClass {
  GBufferedInputStreamClass parent_class;

  /* padding for future expansion */
  void (* _padding_0_) (void);
  void (* _padding_1_) (void);
  void (* _padding_2_) (void);
  void (* _padding_3_) (void);
  void (* _padding_4_) (void);
  void (* _padding_5_) (void);
  void (* _padding_6_) (void);
  void (* _padding_7_) (void);
};
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="evd-buffered-input-stream-freeze"></a><h3>evd_buffered_input_stream_freeze ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                evd_buffered_input_stream_freeze    (<em class="parameter"><code><a class="link" href="EvdBufferedInputStream.html" title="EvdBufferedInputStream"><span class="type">EvdBufferedInputStream</span></a> *self</code></em>);</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="evd-buffered-input-stream-new"></a><h3>evd_buffered_input_stream_new ()</h3>
<pre class="programlisting"><a class="link" href="EvdBufferedInputStream.html" title="EvdBufferedInputStream"><span class="returnvalue">EvdBufferedInputStream</span></a> * evd_buffered_input_stream_new  (<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GInputStream.html"><span class="type">GInputStream</span></a> *base_stream</code></em>);</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="evd-buffered-input-stream-read-str"></a><h3>evd_buffered_input_stream_read_str ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *             evd_buffered_input_stream_read_str  (<em class="parameter"><code><a class="link" href="EvdBufferedInputStream.html" title="EvdBufferedInputStream"><span class="type">EvdBufferedInputStream</span></a> *self</code></em>,
                                                         <em class="parameter"><code><span class="type">gssize</span> *size</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
<td>. <span class="annotation">[<acronym title="Parameter for input and for returning results. Default is transfer full."><span class="acronym">inout</span></acronym>]</span>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="evd-buffered-input-stream-read-str-async"></a><h3>evd_buffered_input_stream_read_str_async ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                evd_buffered_input_stream_read_str_async
                                                        (<em class="parameter"><code><a class="link" href="EvdBufferedInputStream.html" title="EvdBufferedInputStream"><span class="type">EvdBufferedInputStream</span></a> *stream</code></em>,
                                                         <em class="parameter"><code><span class="type">gsize</span> count</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> io_priority</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GAsyncResult.html#GAsyncReadyCallback"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
<td>the <a href="http://library.gnome.org/devel/gio/unstable/GAsyncResult.html#GAsyncReadyCallback"><span class="type">GAsyncReadyCallback</span></a>. <span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="evd-buffered-input-stream-read-str-finish"></a><h3>evd_buffered_input_stream_read_str_finish ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *             evd_buffered_input_stream_read_str_finish
                                                        (<em class="parameter"><code><a class="link" href="EvdBufferedInputStream.html" title="EvdBufferedInputStream"><span class="type">EvdBufferedInputStream</span></a> *self</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GAsyncResult.html"><span class="type">GAsyncResult</span></a> *result</code></em>,
                                                         <em class="parameter"><code><span class="type">gssize</span> *size</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
<td>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="evd-buffered-input-stream-thaw"></a><h3>evd_buffered_input_stream_thaw ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                evd_buffered_input_stream_thaw      (<em class="parameter"><code><a class="link" href="EvdBufferedInputStream.html" title="EvdBufferedInputStream"><span class="type">EvdBufferedInputStream</span></a> *self</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> priority</code></em>);</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="evd-buffered-input-stream-unread"></a><h3>evd_buffered_input_stream_unread ()</h3>
<pre class="programlisting"><span class="returnvalue">gssize</span>              evd_buffered_input_stream_unread    (<em class="parameter"><code><a class="link" href="EvdBufferedInputStream.html" title="EvdBufferedInputStream"><span class="type">EvdBufferedInputStream</span></a> *self</code></em>,
                                                         <em class="parameter"><code>const <span class="type">void</span> *buffer</code></em>,
                                                         <em class="parameter"><code><span class="type">gsize</span> size</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Stores <em class="parameter"><code>size</code></em> bytes from <em class="parameter"><code>buffer</code></em> in the local read buffer of the socket. Next calls
to read will first get data from the local buffer, before performing the actual read
operation. This is useful when one needs to do some action with a data just read, but doesn't
want to remove the data from the input stream of the socket.
</p>
<p>
Normally, it would be used to write back data that was previously read, to made it available
in further calls to read. But in practice any data can be unread.
</p>
<p>
This feature was implemented basically to provide type-of-stream detection on a socket
(e.g. a service selector).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
<td>The <a class="link" href="EvdConnection.html" title="EvdConnection"><span class="type">EvdConnection</span></a> to unread data to.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td>Buffer holding the data to be unread. Can contain nulls. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
<td>Number of bytes to unread.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
<td>A <a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> object, or NULL.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>A pointer to a <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> to return, or NULL. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The actual number of bytes unread.</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.18</div>
</body>
</html>