url_scanner_ex.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*
  2. +----------------------------------------------------------------------+
  3. | PHP Version 5 |
  4. +----------------------------------------------------------------------+
  5. | Copyright (c) 1997-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. | Author: Sascha Schumann <sascha@schumann.cx> |
  16. +----------------------------------------------------------------------+
  17. */
  18. /* $Id$ */
  19. #ifndef URL_SCANNER_EX_H
  20. #define URL_SCANNER_EX_H
  21. PHP_MINIT_FUNCTION(url_scanner_ex);
  22. PHP_MSHUTDOWN_FUNCTION(url_scanner_ex);
  23. PHP_RINIT_FUNCTION(url_scanner_ex);
  24. PHP_RSHUTDOWN_FUNCTION(url_scanner_ex);
  25. PHPAPI char *php_url_scanner_adapt_single_url(const char *url, size_t urllen, const char *name, const char *value, size_t *newlen TSRMLS_DC);
  26. PHPAPI int php_url_scanner_add_var(char *name, int name_len, char *value, int value_len, int urlencode TSRMLS_DC);
  27. PHPAPI int php_url_scanner_reset_vars(TSRMLS_D);
  28. #include "php_smart_str_public.h"
  29. typedef struct {
  30. /* Used by the mainloop of the scanner */
  31. smart_str tag; /* read only */
  32. smart_str arg; /* read only */
  33. smart_str val; /* read only */
  34. smart_str buf;
  35. /* The result buffer */
  36. smart_str result;
  37. /* The data which is appended to each relative URL/FORM */
  38. smart_str form_app, url_app;
  39. int active;
  40. char *lookup_data;
  41. int state;
  42. /* Everything above is zeroed in RINIT */
  43. HashTable *tags;
  44. } url_adapt_state_ex_t;
  45. #endif