~drizzle-trunk/drizzle/development

1241.9.57 by Monty Taylor
Oy. Bigger change than I normally like - but this stuff is all intertwined.
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
 *
1999.6.1 by kalebral at gmail
update Copyright strings to a more common format to help with creating the master debian copyright file
4
 *  Copyright (C) 2008 Sun Microsystems, Inc.
1241.9.57 by Monty Taylor
Oy. Bigger change than I normally like - but this stuff is all intertwined.
5
 *
6
 *  This program is free software; you can redistribute it and/or modify
7
 *  it under the terms of the GNU General Public License as published by
8
 *  the Free Software Foundation; version 2 of the License.
9
 *
10
 *  This program is distributed in the hope that it will be useful,
11
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 *  GNU General Public License for more details.
14
 *
15
 *  You should have received a copy of the GNU General Public License
16
 *  along with this program; if not, write to the Free Software
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
 */
19
20
#ifndef DRIZZLED_CHARSET_H
21
#define DRIZZLED_CHARSET_H
22
23
#include <cstddef>
2173.2.1 by Monty Taylor
Fixes incorrect usage of include
24
#include <drizzled/definitions.h>
1241.9.57 by Monty Taylor
Oy. Bigger change than I normally like - but this stuff is all intertwined.
25
2173.2.1 by Monty Taylor
Fixes incorrect usage of include
26
#include <drizzled/visibility.h>
2119.4.1 by Monty Taylor
Turns on -fvisibility=hidden by default. Symbols intended to be used by
27
1280.1.10 by Monty Taylor
Put everything in drizzled into drizzled namespace.
28
namespace drizzled
29
{
30
1241.9.57 by Monty Taylor
Oy. Bigger change than I normally like - but this stuff is all intertwined.
31
typedef struct charset_info_st CHARSET_INFO;
32
2119.4.3 by Monty Taylor
We want to add visibility markers into the headers... not take them away
33
extern DRIZZLED_API CHARSET_INFO *all_charsets[256];
1241.9.57 by Monty Taylor
Oy. Bigger change than I normally like - but this stuff is all intertwined.
34
extern CHARSET_INFO compiled_charsets[];
35
1280.1.10 by Monty Taylor
Put everything in drizzled into drizzled namespace.
36
extern uint32_t get_charset_number(const char *cs_name, uint32_t cs_flags);
37
extern uint32_t get_collation_number(const char *name);
38
extern const char *get_charset_name(uint32_t cs_number);
39
2119.4.1 by Monty Taylor
Turns on -fvisibility=hidden by default. Symbols intended to be used by
40
DRIZZLED_API const CHARSET_INFO *get_charset(uint32_t cs_number);
41
DRIZZLED_API const CHARSET_INFO *get_charset_by_name(const char *cs_name);
42
DRIZZLED_API const CHARSET_INFO *get_charset_by_csname(const char *cs_name, uint32_t cs_flags);
1280.1.10 by Monty Taylor
Put everything in drizzled into drizzled namespace.
43
44
extern bool resolve_charset(const char *cs_name,
45
			    const CHARSET_INFO *default_cs,
46
			    const CHARSET_INFO **cs);
47
extern bool resolve_collation(const char *cl_name,
48
			     const CHARSET_INFO *default_cl,
49
			     const CHARSET_INFO **cl);
50
51
extern void free_charsets(void);
52
extern char *get_charsets_dir(char *buf);
53
extern bool my_charset_same(const CHARSET_INFO *cs1, const CHARSET_INFO *cs2);
54
extern bool init_compiled_charsets(myf flags);
55
extern void add_compiled_collation(CHARSET_INFO *cs);
56
extern size_t escape_string_for_drizzle(const CHARSET_INFO *charset_info,
57
					char *to, size_t to_length,
58
					const char *from, size_t length);
59
extern size_t escape_quotes_for_drizzle(const CHARSET_INFO *charset_info,
60
					char *to, size_t to_length,
61
					const char *from, size_t length);
62
63
} /* namespace drizzled */
1241.9.57 by Monty Taylor
Oy. Bigger change than I normally like - but this stuff is all intertwined.
64
65
#endif /* DRIZZLED_CHARSET_H */