~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/csv/transparent_file.h

  • Committer: Monty Taylor
  • Date: 2011-02-13 17:26:39 UTC
  • mfrom: (2157.2.2 give-in-to-pkg-config)
  • mto: This revision was merged to the branch mainline in revision 2166.
  • Revision ID: mordred@inaugust.com-20110213172639-nhy7i72sfhoq13ms
Merged in pkg-config fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Copyright (C) 2003 MySQL AB
 
2
 
 
3
   This program is free software; you can redistribute it and/or modify
 
4
   it under the terms of the GNU General Public License as published by
 
5
   the Free Software Foundation; version 2 of the License.
 
6
 
 
7
   This program is distributed in the hope that it will be useful,
 
8
   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
9
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
10
   GNU General Public License for more details.
 
11
 
 
12
   You should have received a copy of the GNU General Public License
 
13
   along with this program; if not, write to the Free Software
 
14
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
 
15
 
 
16
#ifndef PLUGIN_CSV_TRANSPARENT_FILE_H
 
17
#define PLUGIN_CSV_TRANSPARENT_FILE_H
 
18
 
 
19
#include <sys/types.h>
 
20
#include <sys/stat.h>
 
21
 
 
22
 
 
23
class Transparent_file
 
24
{
 
25
  int filedes;
 
26
  unsigned char *buff;  /* in-memory window to the file or mmaped area */
 
27
  /* current window sizes */
 
28
  off_t lower_bound;
 
29
  off_t upper_bound;
 
30
  uint32_t buff_size;
 
31
 
 
32
public:
 
33
 
 
34
  Transparent_file();
 
35
  ~Transparent_file();
 
36
 
 
37
  void init_buff(int filedes_arg);
 
38
  unsigned char *ptr();
 
39
  off_t start();
 
40
  off_t end();
 
41
  char get_value (off_t offset);
 
42
  off_t read_next();
 
43
};
 
44
 
 
45
#endif /* PLUGIN_CSV_TRANSPARENT_FILE_H */