Last change
on this file was
80,
checked in by Sam Hocevar, 15 years ago
|
- Adding the Golgotha source code. Not sure what's going to be interesting
in there, but since it's all public domain, there's certainly stuff to
pick up.
|
File size:
1.4 KB
|
Line | |
---|
1 | /********************************************************************** <BR>
|
---|
2 | This file is part of Crack dot Com's free source code release of
|
---|
3 | Golgotha. <a href="http://www.crack.com/golgotha_release"> <BR> for
|
---|
4 | information about compiling & licensing issues visit this URL</a>
|
---|
5 | <PRE> If that doesn't help, contact Jonathan Clark at
|
---|
6 | golgotha_source@usa.net (Subject should have "GOLG" in it)
|
---|
7 | ***********************************************************************/
|
---|
8 |
|
---|
9 | #ifndef __I4BUF_FILE_HPP
|
---|
10 | #define __I4BUF_FILE_HPP
|
---|
11 |
|
---|
12 | #include "file/file.hh"
|
---|
13 |
|
---|
14 |
|
---|
15 | // This file provides buffering for another i4_file_class
|
---|
16 |
|
---|
17 | class i4_buffered_file_class : public i4_file_class
|
---|
18 | {
|
---|
19 | protected:
|
---|
20 | friend void i4_async_buf_read_callback(w32 count, void *context);
|
---|
21 | i4_file_class *from;
|
---|
22 | void *buf;
|
---|
23 | w32 buf_size,buf_start,buf_end,offset;
|
---|
24 | i4_bool write_file;
|
---|
25 | public:
|
---|
26 | i4_buffered_file_class(i4_file_class *from,
|
---|
27 | w32 buffer_size=0x1000,
|
---|
28 | w32 current_offset=0);
|
---|
29 |
|
---|
30 |
|
---|
31 | virtual w32 read (void *buffer, w32 size);
|
---|
32 | virtual w32 write(const void *buffer, w32 size);
|
---|
33 | virtual w32 seek (w32 offset);
|
---|
34 | virtual w32 size ();
|
---|
35 | virtual w32 tell ();
|
---|
36 |
|
---|
37 | virtual i4_bool async_read (void *buffer, w32 size,
|
---|
38 | async_callback call,
|
---|
39 | void *context);
|
---|
40 |
|
---|
41 | ~i4_buffered_file_class();
|
---|
42 | };
|
---|
43 |
|
---|
44 | #endif
|
---|
Note: See
TracBrowser
for help on using the repository browser.