summaryrefslogtreecommitdiff
path: root/tools.h
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2006-02-04 14:12:17 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2006-02-04 14:12:17 +0100
commit116abbe05e491b61c6cd3541e5c8db1e72122ab6 (patch)
tree77045ab0c2615389d3bc51274a029733b876c6df /tools.h
parentc7120275206511042ddca4f56239ae5e0cb83835 (diff)
downloadvdr-116abbe05e491b61c6cd3541e5c8db1e72122ab6.tar.gz
vdr-116abbe05e491b61c6cd3541e5c8db1e72122ab6.tar.bz2
Improved cUnbufferedFile
Diffstat (limited to 'tools.h')
-rw-r--r--tools.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/tools.h b/tools.h
index 7e57744b..bd2e97ce 100644
--- a/tools.h
+++ b/tools.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: tools.h 1.90 2006/01/15 16:19:56 kls Exp $
+ * $Id: tools.h 1.91 2006/02/04 13:58:01 kls Exp $
*/
#ifndef __TOOLS_H
@@ -242,15 +242,22 @@ public:
class cUnbufferedFile {
private:
int fd;
+ off_t curpos;
+ off_t cachedstart;
+ off_t cachedend;
off_t begin;
- off_t end;
+ off_t lastpos;
off_t ahead;
- ssize_t written;
+ size_t readahead;
+ size_t written;
+ size_t totwritten;
public:
cUnbufferedFile(void);
~cUnbufferedFile();
int Open(const char *FileName, int Flags, mode_t Mode = DEFFILEMODE);
int Close(void);
+ void SetReadAhead(size_t ra);
+ int FadviseDrop(off_t Offset, off_t Len);
off_t Seek(off_t Offset, int Whence);
ssize_t Read(void *Data, size_t Size);
ssize_t Write(const void *Data, size_t Size);