mySQL 5.0.11 sources for tomato
[tomato.git] / release / src / router / mysql / storage / csv / transparent_file.h
blob575ae0b6f6b0e4eea101d3b4311f206dee1bfb8a
1 /*
2 Copyright (c) 2007 MySQL AB, 2009 Sun Microsystems, Inc.
3 Use is subject to license terms.
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; version 2 of the License.
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 St, Fifth Floor, Boston, MA 02110-1301 USA
19 #include <sys/types.h>
20 #include <sys/stat.h>
21 #include <my_dir.h>
24 class Transparent_file
26 File filedes;
27 uchar *buff; /* in-memory window to the file or mmaped area */
28 /* current window sizes */
29 my_off_t lower_bound;
30 my_off_t upper_bound;
31 uint buff_size;
33 public:
35 Transparent_file();
36 ~Transparent_file();
38 void init_buff(File filedes_arg);
39 uchar *ptr();
40 my_off_t start();
41 my_off_t end();
42 char get_value (my_off_t offset);
43 my_off_t read_next();