load alternatives.xml in autostart plugin
[enigma2.git] / lib / base / rawfile.h
1 #ifndef __lib_base_rawfile_h
2 #define __lib_base_rawfile_h
3
4 #include <string>
5
6 class eRawFile
7 {
8 public:
9         eRawFile();
10         ~eRawFile();
11         
12         int open(const char *filename);
13         void setfd(int fd);
14         off_t lseek(off_t offset, int whence);
15         int close();
16         ssize_t read(void *buf, size_t count); /* NOTE: you must be able to handle short reads! */
17         off_t length();
18         int valid();
19 private:
20         int m_fd;
21         std::string m_basename;
22         off_t m_splitsize, m_totallength, m_current_offset, m_base_offset, m_last_offset;
23         int m_nrfiles;
24         void scan();
25         int m_current_file;
26         int switchOffset(off_t off);
27         int openFile(int nr);
28 };
29
30 #endif