* more intuitive support for headers and cookies (associative arrays)
[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.3.0"
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 PHP_FUNCTION(http_date);
38 PHP_FUNCTION(http_absolute_uri);
39 PHP_FUNCTION(http_negotiate_language);
40 PHP_FUNCTION(http_negotiate_charset);
41 PHP_FUNCTION(http_redirect);
42 PHP_FUNCTION(http_send_status);
43 PHP_FUNCTION(http_send_last_modified);
44 PHP_FUNCTION(http_match_modified);
45 PHP_FUNCTION(http_match_etag);
46 PHP_FUNCTION(http_cache_last_modified);
47 PHP_FUNCTION(http_cache_etag);
48 PHP_FUNCTION(http_content_type);
49 PHP_FUNCTION(http_content_disposition);
50 PHP_FUNCTION(http_send_data);
51 PHP_FUNCTION(http_send_file);
52 PHP_FUNCTION(http_send_stream);
53 PHP_FUNCTION(http_chunked_decode);
54 PHP_FUNCTION(http_split_response);
55 #if defined(HAVE_CURL) && HAVE_CURL
56 PHP_FUNCTION(http_get);
57 PHP_FUNCTION(http_head);
58 PHP_FUNCTION(http_post_data);
59 PHP_FUNCTION(http_post_array);
60 #endif
61 PHP_FUNCTION(http_auth_basic);
62 PHP_FUNCTION(http_auth_basic_cb);
63
64 PHP_MINIT_FUNCTION(http);
65 PHP_RSHUTDOWN_FUNCTION(http);
66 PHP_MINFO_FUNCTION(http);
67
68 ZEND_BEGIN_MODULE_GLOBALS(http)
69 zend_bool etag_started;
70 PHP_MD5_CTX etag_md5;
71 php_stream_statbuf ssb;
72 char *ctype;
73 #if defined(HAVE_CURL) && HAVE_CURL
74 struct {
75 struct {
76 char *data;
77 size_t used;
78 size_t free;
79 } body;
80 struct {
81 char *data;
82 size_t used;
83 size_t free;
84 } hdrs;
85 } curlbuf;
86 #endif
87 ZEND_END_MODULE_GLOBALS(http)
88
89 #endif /* PHP_HTTP_H */
90
91 /*
92 * Local variables:
93 * tab-width: 4
94 * c-basic-offset: 4
95 * End:
96 * vim600: noet sw=4 ts=4 fdm=marker
97 * vim<600: noet sw=4 ts=4
98 */