summaryrefslogtreecommitdiff
path: root/doc/html/classcFileHandle.html
blob: 657277963414720a81ae4ebb1704622eb7082c12 (plain)
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
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>UPnP/DLNA plugin for VDR: cFileHandle Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.8 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>cFileHandle Class Reference</h1><!-- doxytag: class="cFileHandle" --><code>#include &lt;<a class="el" href="filehandle_8h-source.html">filehandle.h</a>&gt;</code>
<p>
<div class="dynheader">
Inheritance diagram for cFileHandle:</div>
<div class="dynsection">
<p><center><img src="classcFileHandle__inherit__graph.png" border="0" usemap="#cFileHandle__inherit__map" alt="Inheritance graph"></center>
<map name="cFileHandle__inherit__map">
<area shape="rect" href="classcLiveReceiver.html" title="{cLiveReceiver\n|&#45; mDevice\l&#45; mChannel\l&#45; mLiveBuffer\l&#45; mOutputBuffer\l&#45; mFrameDetector\l&#45; mPatPmtGenerator\l|+ ~cLiveReceiver()\l+ open()\l+ read()\l+ write()\l+ seek()\l+ close()\l+ newInstance()\l# Receive()\l# Activate()\l# Action()\l&#45; cLiveReceiver()\l}" alt="" coords="5,221,147,541"><area shape="rect" href="classcRecordingPlayer.html" title="{cRecordingPlayer\n|&#45; mRecording\l&#45; mOffsets\l&#45; mOffset\l&#45; mTotalLenght\l&#45; mIndex\l&#45; mFile\l|+ ~cRecordingPlayer()\l+ open()\l+ read()\l+ write()\l+ seek()\l+ close()\l+ newInstance()\l&#45; Scan()\l&#45; cRecordingPlayer()\l&#45; GetFile()\l&#45; NextFile()\l&#45; SeekInFile()\l}" alt="" coords="171,213,323,549"></map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>

<p>
<a href="classcFileHandle-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcFileHandle.html#cdf4f4d07382de675b498d85544ea1b6">open</a> (UpnpOpenFileMode mode)=0</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcFileHandle.html#458f25a4c7f62d528cffc84e66d38e7d">read</a> (char *buf, size_t buflen)=0</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcFileHandle.html#e1495303f52f6f2d7ac37a030f78a937">write</a> (char *buf, size_t buflen)=0</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcFileHandle.html#d2dde523301abe5e79e6109a93ba705b">seek</a> (off_t offset, int whence)=0</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcFileHandle.html#d7eaed7d254a64c85a48c3968238b93d">close</a> ()=0</td></tr>

</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Interface for File Handles<p>
This class is a pure virtual class to act as an interface for file handles used by the webserver. <hr><h2>Member Function Documentation</h2>
<a class="anchor" name="d7eaed7d254a64c85a48c3968238b93d"></a><!-- doxytag: member="cFileHandle::close" ref="d7eaed7d254a64c85a48c3968238b93d" args="()=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void cFileHandle::close           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Closes the open file<p>
This will close open file handles and frees the memory obtained by it. 
<p>Implemented in <a class="el" href="classcLiveReceiver.html#5b8beb2bc6809aacbdb087e31e836a27">cLiveReceiver</a>, and <a class="el" href="classcRecordingPlayer.html#5e81aeecd16f89e432690a9b05d8dd6a">cRecordingPlayer</a>.</p>

</div>
</div><p>
<a class="anchor" name="cdf4f4d07382de675b498d85544ea1b6"></a><!-- doxytag: member="cFileHandle::open" ref="cdf4f4d07382de675b498d85544ea1b6" args="(UpnpOpenFileMode mode)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void cFileHandle::open           </td>
          <td>(</td>
          <td class="paramtype">UpnpOpenFileMode&nbsp;</td>
          <td class="paramname"> <em>mode</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Opens the file<p>
Opens the file at the given mode. These can be:<ul>
<li><b>UPNP_READ</b>, to read from the file</li><li><b>UPNP_WRITE</b>, to write to the file</li></ul>
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>mode</em>&nbsp;</td><td>The file mode, i.e. one of the following<ul>
<li><b>UPNP_READ</b> </li><li><b>UPNP_WRITE</b> </li></ul>
</td></tr>
  </table>
</dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>mode</em>&nbsp;</td><td>The file mode, i.e. one of the following<ul>
<li><b>UPNP_READ</b> </li><li><b>UPNP_WRITE</b> </li></ul>
</td></tr>
  </table>
</dl>

<p>Implemented in <a class="el" href="classcLiveReceiver.html#b8e751f641be1da4a925106e3dd062e9">cLiveReceiver</a>, and <a class="el" href="classcRecordingPlayer.html#e7ad4362d821f38db5143c0aeff15d97">cRecordingPlayer</a>.</p>

</div>
</div><p>
<a class="anchor" name="458f25a4c7f62d528cffc84e66d38e7d"></a><!-- doxytag: member="cFileHandle::read" ref="458f25a4c7f62d528cffc84e66d38e7d" args="(char *buf, size_t buflen)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual int cFileHandle::read           </td>
          <td>(</td>
          <td class="paramtype">char *&nbsp;</td>
          <td class="paramname"> <em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>buflen</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Reads from the file<p>
Reads from the file a certain amount of bytes and stores them in a buffer<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>returns<ul>
<li><b>&lt;0</b>, in case of an error</li><li><b>0</b>, when reading was successful</li></ul>
</dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>buf</em>&nbsp;</td><td>The char buffer </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>buflen</em>&nbsp;</td><td>The size of the buffer </td></tr>
  </table>
</dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>buf</em>&nbsp;</td><td>The char buffer </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>buflen</em>&nbsp;</td><td>The size of the buffer </td></tr>
  </table>
</dl>

<p>Implemented in <a class="el" href="classcLiveReceiver.html#4a19e1fd4e1d043fb091bfb01a9cbf08">cLiveReceiver</a>, and <a class="el" href="classcRecordingPlayer.html#e0fda8b0be8e47133698f1763e649b3d">cRecordingPlayer</a>.</p>

</div>
</div><p>
<a class="anchor" name="d2dde523301abe5e79e6109a93ba705b"></a><!-- doxytag: member="cFileHandle::seek" ref="d2dde523301abe5e79e6109a93ba705b" args="(off_t offset, int whence)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual int cFileHandle::seek           </td>
          <td>(</td>
          <td class="paramtype">off_t&nbsp;</td>
          <td class="paramname"> <em>offset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>whence</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Seeks in the file<p>
Seeks in the file where the offset is the relativ position depending on the second parameter. This means, in case of<p>
<ul>
<li><b>SEEK_SET</b>, the offset is relative to the beginning of the file</li><li><b>SEEK_CUR</b>, it is relative to the current position or</li><li><b>SEEK_END</b>, relative to the end of the file.</li></ul>
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>returns<ul>
<li><b>&lt;0</b>, in case of an error</li><li><b>0</b>, when reading was successful</li></ul>
</dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>offset</em>&nbsp;</td><td>The byte offset in the file </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>whence</em>&nbsp;</td><td>one of the following<ul>
<li><b>SEEK_SET</b>,</li><li><b>SEEK_CUR</b>,</li><li><b>SEEK_END</b> </li></ul>
</td></tr>
  </table>
</dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>offset</em>&nbsp;</td><td>The byte offset in the file </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>whence</em>&nbsp;</td><td>one of the following<ul>
<li><b>SEEK_SET</b>,</li><li><b>SEEK_CUR</b>,</li><li><b>SEEK_END</b> </li></ul>
</td></tr>
  </table>
</dl>

<p>Implemented in <a class="el" href="classcLiveReceiver.html#efb4156ef247773873dee42053e94edf">cLiveReceiver</a>, and <a class="el" href="classcRecordingPlayer.html#43f7ba867374d6be9e78c68c872bf608">cRecordingPlayer</a>.</p>

</div>
</div><p>
<a class="anchor" name="e1495303f52f6f2d7ac37a030f78a937"></a><!-- doxytag: member="cFileHandle::write" ref="e1495303f52f6f2d7ac37a030f78a937" args="(char *buf, size_t buflen)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual int cFileHandle::write           </td>
          <td>(</td>
          <td class="paramtype">char *&nbsp;</td>
          <td class="paramname"> <em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>buflen</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Writes to the file<p>
Writes to the file a certain amount of bytes which are stored in a buffer<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>returns<ul>
<li><b>&lt;0</b>, in case of an error</li><li><b>0</b>, when reading was successful</li></ul>
</dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>buf</em>&nbsp;</td><td>The char buffer </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>buflen</em>&nbsp;</td><td>The size of the buffer </td></tr>
  </table>
</dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>buf</em>&nbsp;</td><td>The char buffer </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>buflen</em>&nbsp;</td><td>The size of the buffer </td></tr>
  </table>
</dl>

<p>Implemented in <a class="el" href="classcLiveReceiver.html#eb56988441b589b6e34ea01825dfb183">cLiveReceiver</a>, and <a class="el" href="classcRecordingPlayer.html#7dd0cb78ae8032eb677f01d71187d6e0">cRecordingPlayer</a>.</p>

</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li>receiver/<a class="el" href="filehandle_8h-source.html">filehandle.h</a></ul>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sun Nov 8 15:44:09 2009 for UPnP/DLNA plugin for VDR by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
</body>
</html>