mysqlnd_charset.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. +----------------------------------------------------------------------+
  3. | PHP Version 5 |
  4. +----------------------------------------------------------------------+
  5. | Copyright (c) 2006-2016 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. #ifndef MYSQLND_CHARSET_H
  21. #define MYSQLND_CHARSET_H
  22. PHPAPI ulong mysqlnd_cset_escape_quotes(const MYSQLND_CHARSET * const charset, char *newstr,
  23. const char *escapestr, size_t escapestr_len TSRMLS_DC);
  24. PHPAPI ulong mysqlnd_cset_escape_slashes(const MYSQLND_CHARSET * const cset, char *newstr,
  25. const char *escapestr, size_t escapestr_len TSRMLS_DC);
  26. struct st_mysqlnd_plugin_charsets
  27. {
  28. const struct st_mysqlnd_plugin_header plugin_header;
  29. struct
  30. {
  31. const MYSQLND_CHARSET * (*const find_charset_by_nr)(unsigned int charsetnr);
  32. const MYSQLND_CHARSET * (*const find_charset_by_name)(const char * const name);
  33. unsigned long (*const escape_quotes)(const MYSQLND_CHARSET * const cset, char * newstr, const char * escapestr, size_t escapestr_len TSRMLS_DC);
  34. unsigned long (*const escape_slashes)(const MYSQLND_CHARSET * const cset, char * newstr, const char * escapestr, size_t escapestr_len TSRMLS_DC);
  35. } methods;
  36. };
  37. void mysqlnd_charsets_plugin_register(TSRMLS_D);
  38. #endif /* MYSQLND_CHARSET_H */
  39. /*
  40. * Local variables:
  41. * tab-width: 4
  42. * c-basic-offset: 4
  43. * End:
  44. * vim600: noet sw=4 ts=4 fdm=marker
  45. * vim<600: noet sw=4 ts=4
  46. */