Move EventMgr to GUI.
[gemrb.git] / gemrb / core / CachedFileStream.h
blob4a06048bd0ffc5589ba66902fb2bab1ac8fe3cb4
1 /* GemRB - Infinity Engine Emulator
2 * Copyright (C) 2003 The GemRB Project
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 #ifndef CACHEDFILESTREAM_H
22 #define CACHEDFILESTREAM_H
24 #include "exports.h"
26 #include "FileStream.h"
28 class GEM_EXPORT CachedFileStream : public DataStream// : public FileStream
30 private:
31 bool autoFree;
32 unsigned long startpos;
33 _FILE* str;
34 public:
35 CachedFileStream(const char* stream, bool autoFree = true);
36 CachedFileStream(CachedFileStream* cfs, int startpos, int size,
37 bool autoFree = true);
38 ~CachedFileStream(void);
39 int Read(void* dest, unsigned int length);
40 int Write(const void* src, unsigned int length);
41 int Seek(int pos, int startpos);
42 /** No descriptions */
43 int ReadLine(void* buf, unsigned int maxlen);
45 #endif