mysqlnd_charset.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. +----------------------------------------------------------------------+
  3. | Copyright (c) The PHP Group |
  4. +----------------------------------------------------------------------+
  5. | This source file is subject to version 3.01 of the PHP license, |
  6. | that is bundled with this package in the file LICENSE, and is |
  7. | available through the world-wide-web at the following url: |
  8. | https://www.php.net/license/3_01.txt |
  9. | If you did not receive a copy of the PHP license and are unable to |
  10. | obtain it through the world-wide-web, please send a note to |
  11. | license@php.net so we can mail you a copy immediately. |
  12. +----------------------------------------------------------------------+
  13. | Authors: Andrey Hristov <andrey@php.net> |
  14. | Ulf Wendel <uw@php.net> |
  15. | Georg Richter <georg@php.net> |
  16. +----------------------------------------------------------------------+
  17. */
  18. #ifndef MYSQLND_CHARSET_H
  19. #define MYSQLND_CHARSET_H
  20. PHPAPI zend_ulong mysqlnd_cset_escape_quotes(const MYSQLND_CHARSET * const charset, char * newstr,
  21. const char * escapestr, const size_t escapestr_len);
  22. PHPAPI zend_ulong mysqlnd_cset_escape_slashes(const MYSQLND_CHARSET * const cset, char * newstr,
  23. const char * escapestr, const size_t escapestr_len);
  24. struct st_mysqlnd_plugin_charsets
  25. {
  26. const struct st_mysqlnd_plugin_header plugin_header;
  27. struct
  28. {
  29. const MYSQLND_CHARSET * (*const find_charset_by_nr)(unsigned int charsetnr);
  30. const MYSQLND_CHARSET * (*const find_charset_by_name)(const char * const name);
  31. zend_ulong (*const escape_quotes)(const MYSQLND_CHARSET * const cset, char * newstr, const char * escapestr, const size_t escapestr_len);
  32. zend_ulong (*const escape_slashes)(const MYSQLND_CHARSET * const cset, char * newstr, const char * escapestr, const size_t escapestr_len);
  33. } methods;
  34. };
  35. void mysqlnd_charsets_plugin_register(void);
  36. #endif /* MYSQLND_CHARSET_H */