29d868c06f8e09f467526b723d6693a0e4e37fb5
[m6w6/ext-http] / php_http.h
1 /*
2 +----------------------------------------------------------------------+
3 | PECL :: http |
4 +----------------------------------------------------------------------+
5 | This source file is subject to version 3.0 of the PHP license, that |
6 | is bundled with this package in the file LICENSE, and is available |
7 | through the world-wide-web at http://www.php.net/license/3_0.txt. |
8 | If you did not receive a copy of the PHP license and are unable to |
9 | obtain it through the world-wide-web, please send a note to |
10 | license@php.net so we can mail you a copy immediately. |
11 +----------------------------------------------------------------------+
12 | Copyright (c) 2004-2005 Michael Wallner <mike@php.net> |
13 +----------------------------------------------------------------------+
14 */
15
16 /* $Id$ */
17
18 #ifndef PHP_EXT_HTTP_H
19 #define PHP_EXT_HTTP_H
20
21 #define PHP_EXT_HTTP_VERSION "0.5.0-dev"
22
23 /* make compile on Win32 */
24 #include "php_streams.h"
25 #include "ext/standard/md5.h"
26
27 extern zend_module_entry http_module_entry;
28 #define phpext_http_ptr &http_module_entry
29
30 #ifdef ZTS
31 # include "TSRM.h"
32 # define HTTP_G(v) TSRMG(http_globals_id, zend_http_globals *, v)
33 #else
34 # define HTTP_G(v) (http_globals.v)
35 #endif
36
37 #ifndef ZEND_ENGINE_2
38 # include "php_http_build_query.h"
39 #endif
40
41 PHP_FUNCTION(http_date);
42 PHP_FUNCTION(http_absolute_uri);
43 PHP_FUNCTION(http_negotiate_language);
44 PHP_FUNCTION(http_negotiate_charset);
45 PHP_FUNCTION(http_redirect);
46 PHP_FUNCTION(http_send_status);
47 PHP_FUNCTION(http_send_last_modified);
48 PHP_FUNCTION(http_match_modified);
49 PHP_FUNCTION(http_match_etag);
50 PHP_FUNCTION(http_cache_last_modified);
51 PHP_FUNCTION(http_cache_etag);
52 PHP_FUNCTION(http_content_type);
53 PHP_FUNCTION(http_content_disposition);
54 PHP_FUNCTION(http_send_data);
55 PHP_FUNCTION(http_send_file);
56 PHP_FUNCTION(http_send_stream);
57 PHP_FUNCTION(http_chunked_decode);
58 PHP_FUNCTION(http_split_response);
59 PHP_FUNCTION(http_parse_headers);
60 PHP_FUNCTION(http_get_request_headers);
61 #ifdef HTTP_HAVE_CURL
62 PHP_FUNCTION(http_get);
63 PHP_FUNCTION(http_head);
64 PHP_FUNCTION(http_post_data);
65 PHP_FUNCTION(http_post_array);
66 #endif
67 PHP_FUNCTION(http_auth_basic);
68 PHP_FUNCTION(http_auth_basic_cb);
69
70 PHP_FUNCTION(ob_httpetaghandler);
71
72 PHP_MINIT_FUNCTION(http);
73 PHP_MSHUTDOWN_FUNCTION(http);
74 PHP_RSHUTDOWN_FUNCTION(http);
75 PHP_MINFO_FUNCTION(http);
76
77 ZEND_BEGIN_MODULE_GLOBALS(http)
78 zend_bool etag_started;
79 PHP_MD5_CTX etag_md5;
80 php_stream_statbuf ssb;
81 char *ctype;
82 char *etag;
83 time_t lmod;
84 char *allowed_methods;
85 #ifdef HTTP_HAVE_CURL
86 struct {
87 struct {
88 char *data;
89 size_t used;
90 size_t free;
91 } body;
92 struct {
93 char *data;
94 size_t used;
95 size_t free;
96 } hdrs;
97 } curlbuf;
98 #endif
99 ZEND_END_MODULE_GLOBALS(http)
100
101 #endif /* PHP_HTTP_H */
102
103 /*
104 * Local variables:
105 * tab-width: 4
106 * c-basic-offset: 4
107 * End:
108 * vim600: noet sw=4 ts=4 fdm=marker
109 * vim<600: noet sw=4 ts=4
110 */
111