Back to index

php5  5.3.10
url_scanner_ex.h
Go to the documentation of this file.
00001 /*
00002   +----------------------------------------------------------------------+
00003   | PHP Version 5                                                        |
00004   +----------------------------------------------------------------------+
00005   | Copyright (c) 1997-2012 The PHP Group                                |
00006   +----------------------------------------------------------------------+
00007   | This source file is subject to version 3.01 of the PHP license,      |
00008   | that is bundled with this package in the file LICENSE, and is        |
00009   | available through the world-wide-web at the following url:           |
00010   | http://www.php.net/license/3_01.txt                                  |
00011   | If you did not receive a copy of the PHP license and are unable to   |
00012   | obtain it through the world-wide-web, please send a note to          |
00013   | license@php.net so we can mail you a copy immediately.               |
00014   +----------------------------------------------------------------------+
00015   | Author: Sascha Schumann <sascha@schumann.cx>                         |
00016   +----------------------------------------------------------------------+
00017 */
00018 
00019 /* $Id: url_scanner_ex.h 321634 2012-01-01 13:15:04Z felipe $ */
00020 
00021 #ifndef URL_SCANNER_EX_H
00022 #define URL_SCANNER_EX_H
00023 
00024 PHP_MINIT_FUNCTION(url_scanner_ex);
00025 PHP_MSHUTDOWN_FUNCTION(url_scanner_ex);
00026 
00027 PHP_RINIT_FUNCTION(url_scanner_ex);
00028 PHP_RSHUTDOWN_FUNCTION(url_scanner_ex);
00029 
00030 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);
00031 PHPAPI int php_url_scanner_add_var(char *name, int name_len, char *value, int value_len, int urlencode TSRMLS_DC);
00032 PHPAPI int php_url_scanner_reset_vars(TSRMLS_D);
00033 
00034 #include "php_smart_str_public.h"
00035 
00036 typedef struct {
00037        /* Used by the mainloop of the scanner */
00038        smart_str tag; /* read only */
00039        smart_str arg; /* read only */
00040        smart_str val; /* read only */
00041        smart_str buf;
00042 
00043        /* The result buffer */
00044        smart_str result;
00045 
00046        /* The data which is appended to each relative URL/FORM */
00047        smart_str form_app, url_app;
00048 
00049        int active;
00050 
00051        char *lookup_data;
00052        int state;
00053        
00054        /* Everything above is zeroed in RINIT */
00055        HashTable *tags;
00056 } url_adapt_state_ex_t;
00057 
00058 #endif