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 247 248 249
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>CamelStreamFs</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
<link rel="start" href="index.html" title="Camel Reference Manual">
<link rel="up" href="Streams.html" title="Streams">
<link rel="prev" href="camel-CamelStreamFilter.html" title="CamelStreamFilter">
<link rel="next" href="camel-CamelStreamMem.html" title="CamelStreamMem">
<meta name="generator" content="GTK-Doc V1.11 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="part" href="classes.html" title="Part I. Camel Classes">
<link rel="chapter" href="ClassTree.html" title="Class hierarchy">
<link rel="chapter" href="Fundamentals.html" title="Fundamentals">
<link rel="chapter" href="Streams.html" title="Streams">
<link rel="chapter" href="Filters.html" title="Stream Filters">
<link rel="chapter" href="Services.html" title="Services">
<link rel="chapter" href="Folders.html" title="Folders">
<link rel="chapter" href="Addresses.html" title="Addresses">
<link rel="chapter" href="Crypto.html" title="Crypto Contexts">
<link rel="chapter" href="MIME.html" title="MIME Objects">
<link rel="index" href="ix01.html" title="Index">
</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="camel-CamelStreamFilter.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="Streams.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">Camel Reference Manual</th>
<td><a accesskey="n" href="camel-CamelStreamMem.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#camel-CamelStreamFs.synopsis" class="shortcut">Top</a>
|
<a href="#camel-CamelStreamFs.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry" lang="en">
<a name="camel-CamelStreamFs"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="camel-CamelStreamFs.top_of_page"></a>CamelStreamFs</span></h2>
<p>CamelStreamFs</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="camel-CamelStreamFs.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
struct <a class="link" href="camel-CamelStreamFs.html#CamelStreamFs" title="struct CamelStreamFs">CamelStreamFs</a>;
<a class="link" href="camel-CamelStream.html#CamelStream" title="struct CamelStream">CamelStream</a>* <a class="link" href="camel-CamelStreamFs.html#camel-stream-fs-new-with-name" title="camel_stream_fs_new_with_name ()">camel_stream_fs_new_with_name</a> (const char *name,
int flags,
mode_t mode);
<a class="link" href="camel-CamelStream.html#CamelStream" title="struct CamelStream">CamelStream</a>* <a class="link" href="camel-CamelStreamFs.html#camel-stream-fs-new-with-name-and-bounds" title="camel_stream_fs_new_with_name_and_bounds ()">camel_stream_fs_new_with_name_and_bounds</a>
(const char *name,
int flags,
mode_t mode,
off_t start,
off_t end);
<a class="link" href="camel-CamelStream.html#CamelStream" title="struct CamelStream">CamelStream</a>* <a class="link" href="camel-CamelStreamFs.html#camel-stream-fs-new-with-fd" title="camel_stream_fs_new_with_fd ()">camel_stream_fs_new_with_fd</a> (int fd);
<a class="link" href="camel-CamelStream.html#CamelStream" title="struct CamelStream">CamelStream</a>* <a class="link" href="camel-CamelStreamFs.html#camel-stream-fs-new-with-fd-and-bounds" title="camel_stream_fs_new_with_fd_and_bounds ()">camel_stream_fs_new_with_fd_and_bounds</a>
(int fd,
off_t start,
off_t end);
</pre>
</div>
<div class="refsect1" lang="en">
<a name="camel-CamelStreamFs.description"></a><h2>Description</h2>
<p>
</p>
</div>
<div class="refsect1" lang="en">
<a name="camel-CamelStreamFs.details"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="CamelStreamFs"></a><h3>struct CamelStreamFs</h3>
<pre class="programlisting">struct CamelStreamFs {
CamelSeekableStream parent_object;
int fd; /* file descriptor on the underlying file */
};
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="camel-stream-fs-new-with-name"></a><h3>camel_stream_fs_new_with_name ()</h3>
<pre class="programlisting"><a class="link" href="camel-CamelStream.html#CamelStream" title="struct CamelStream">CamelStream</a>* camel_stream_fs_new_with_name (const char *name,
int flags,
mode_t mode);</pre>
<p>
Creates a new <a class="link" href="camel-CamelStreamFs.html#CamelStreamFs" title="struct CamelStreamFs"><span class="type">CamelStreamFs</span></a> corresponding to the named file, flags,
and mode.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td> a local filename
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
<td> flags as in open(2)
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>mode</code></em> :</span></p></td>
<td> a file mode
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the new stream, or <code class="literal">NULL</code> on error.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="camel-stream-fs-new-with-name-and-bounds"></a><h3>camel_stream_fs_new_with_name_and_bounds ()</h3>
<pre class="programlisting"><a class="link" href="camel-CamelStream.html#CamelStream" title="struct CamelStream">CamelStream</a>* camel_stream_fs_new_with_name_and_bounds
(const char *name,
int flags,
mode_t mode,
off_t start,
off_t end);</pre>
<p>
Creates a new CamelStream corresponding to the given arguments.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td> a local filename
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
<td> flags as in open(2)
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>mode</code></em> :</span></p></td>
<td> a file mode
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>start</code></em> :</span></p></td>
<td> the first valid position in the file
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>end</code></em> :</span></p></td>
<td> the first invalid position in the file, or <a class="link" href="camel-CamelSeekableStream.html#CAMEL-STREAM-UNBOUND:CAPS" title="CAMEL_STREAM_UNBOUND"><span class="type">CAMEL_STREAM_UNBOUND</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the stream, or <code class="literal">NULL</code> on error.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="camel-stream-fs-new-with-fd"></a><h3>camel_stream_fs_new_with_fd ()</h3>
<pre class="programlisting"><a class="link" href="camel-CamelStream.html#CamelStream" title="struct CamelStream">CamelStream</a>* camel_stream_fs_new_with_fd (int fd);</pre>
<p>
Creates a new fs stream using the given file descriptor <em class="parameter"><code>fd</code></em> as the
backing store. When the stream is destroyed, the file descriptor
will be closed.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>fd</code></em> :</span></p></td>
<td> a file descriptor
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new <a class="link" href="camel-CamelStreamFs.html#CamelStreamFs" title="struct CamelStreamFs"><span class="type">CamelStreamFs</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="camel-stream-fs-new-with-fd-and-bounds"></a><h3>camel_stream_fs_new_with_fd_and_bounds ()</h3>
<pre class="programlisting"><a class="link" href="camel-CamelStream.html#CamelStream" title="struct CamelStream">CamelStream</a>* camel_stream_fs_new_with_fd_and_bounds
(int fd,
off_t start,
off_t end);</pre>
<p>
Gets a stream associated with the given file descriptor and bounds.
When the stream is destroyed, the file descriptor will be closed.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>fd</code></em> :</span></p></td>
<td> a file descriptor
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>start</code></em> :</span></p></td>
<td> the first valid position in the file
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>end</code></em> :</span></p></td>
<td> the first invalid position in the file, or <a class="link" href="camel-CamelSeekableStream.html#CAMEL-STREAM-UNBOUND:CAPS" title="CAMEL_STREAM_UNBOUND"><span class="type">CAMEL_STREAM_UNBOUND</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the bound stream
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.11</div>
</body>
</html>
|