xref: /PHP-5.5/ext/mysqlnd/mysqlnd_charset.h (revision 73c1be26)
1 /*
2   +----------------------------------------------------------------------+
3   | PHP Version 5                                                        |
4   +----------------------------------------------------------------------+
5   | Copyright (c) 2006-2015 The PHP Group                                |
6   +----------------------------------------------------------------------+
7   | This source file is subject to version 3.01 of the PHP license,      |
8   | that is bundled with this package in the file LICENSE, and is        |
9   | available through the world-wide-web at the following url:           |
10   | http://www.php.net/license/3_01.txt                                  |
11   | If you did not receive a copy of the PHP license and are unable to   |
12   | obtain it through the world-wide-web, please send a note to          |
13   | license@php.net so we can mail you a copy immediately.               |
14   +----------------------------------------------------------------------+
15   | Authors: Georg Richter <georg@mysql.com>                             |
16   |          Andrey Hristov <andrey@mysql.com>                           |
17   |          Ulf Wendel <uwendel@mysql.com>                              |
18   +----------------------------------------------------------------------+
19 */
20 
21 #ifndef MYSQLND_CHARSET_H
22 #define MYSQLND_CHARSET_H
23 
24 PHPAPI ulong mysqlnd_cset_escape_quotes(const MYSQLND_CHARSET * const charset, char *newstr,
25 										const char *escapestr, size_t escapestr_len TSRMLS_DC);
26 
27 PHPAPI ulong mysqlnd_cset_escape_slashes(const MYSQLND_CHARSET * const cset, char *newstr,
28 										 const char *escapestr, size_t escapestr_len TSRMLS_DC);
29 
30 struct st_mysqlnd_plugin_charsets
31 {
32 	const struct st_mysqlnd_plugin_header plugin_header;
33 	struct
34 	{
35 		const MYSQLND_CHARSET * (*const find_charset_by_nr)(unsigned int charsetnr);
36 		const MYSQLND_CHARSET * (*const find_charset_by_name)(const char * const name);
37 		unsigned long 			(*const escape_quotes)(const MYSQLND_CHARSET * const cset, char * newstr, const char * escapestr, size_t escapestr_len TSRMLS_DC);
38 		unsigned long			(*const escape_slashes)(const MYSQLND_CHARSET * const cset, char * newstr, const char * escapestr, size_t escapestr_len TSRMLS_DC);
39 	} methods;
40 };
41 
42 void mysqlnd_charsets_plugin_register(TSRMLS_D);
43 
44 #endif /* MYSQLND_CHARSET_H */
45 
46 /*
47  * Local variables:
48  * tab-width: 4
49  * c-basic-offset: 4
50  * End:
51  * vim600: noet sw=4 ts=4 fdm=marker
52  * vim<600: noet sw=4 ts=4
53  */
54