- unified cache_api function names
[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 HTTP_PEXT_VERSION "0.8.0-dev"
22
23 /* make compile on Win32 */
24 #ifdef HTTP_HAVE_CURL
25 # ifdef PHP_WIN32
26 # include <winsock2.h>
27 # endif
28 # include <curl/curl.h>
29 #endif
30 #include "ext/standard/md5.h"
31 #include "phpstr/phpstr.h"
32
33 extern zend_module_entry http_module_entry;
34 #define phpext_http_ptr &http_module_entry
35
36 ZEND_BEGIN_MODULE_GLOBALS(http)
37 zend_bool etag_started;
38 PHP_MD5_CTX etag_md5;
39 php_stream_statbuf ssb;
40 char *ctype;
41 char *etag;
42 time_t lmod;
43 char *allowed_methods;
44 #ifdef HTTP_HAVE_CURL
45 # if LIBCURL_VERSION_NUM < 0x070c00
46 char curlerr[CURL_ERROR_SIZE + 1];
47 # endif
48 zend_llist to_free;
49 #endif /* HTTP_HAVE_CURL */
50 ZEND_END_MODULE_GLOBALS(http)
51
52 #ifdef ZTS
53 # include "TSRM.h"
54 # define HTTP_G(v) TSRMG(http_globals_id, zend_http_globals *, v)
55 #else
56 # define HTTP_G(v) (http_globals.v)
57 #endif
58
59 PHP_FUNCTION(http_test);
60 PHP_FUNCTION(http_date);
61 PHP_FUNCTION(http_absolute_uri);
62 PHP_FUNCTION(http_negotiate_language);
63 PHP_FUNCTION(http_negotiate_charset);
64 PHP_FUNCTION(http_redirect);
65 PHP_FUNCTION(http_send_status);
66 PHP_FUNCTION(http_send_last_modified);
67 PHP_FUNCTION(http_send_content_type);
68 PHP_FUNCTION(http_send_content_disposition);
69 PHP_FUNCTION(http_match_modified);
70 PHP_FUNCTION(http_match_etag);
71 PHP_FUNCTION(http_cache_last_modified);
72 PHP_FUNCTION(http_cache_etag);
73 PHP_FUNCTION(http_send_data);
74 PHP_FUNCTION(http_send_file);
75 PHP_FUNCTION(http_send_stream);
76 PHP_FUNCTION(http_chunked_decode);
77 PHP_FUNCTION(http_split_response);
78 PHP_FUNCTION(http_parse_headers);
79 PHP_FUNCTION(http_get_request_headers);
80 #ifdef HTTP_HAVE_CURL
81 PHP_FUNCTION(http_get);
82 PHP_FUNCTION(http_head);
83 PHP_FUNCTION(http_post_data);
84 PHP_FUNCTION(http_post_array);
85 #endif /* HTTP_HAVE_CURL */
86 PHP_FUNCTION(http_auth_basic);
87 PHP_FUNCTION(http_auth_basic_cb);
88 #ifndef ZEND_ENGINE_2
89 PHP_FUNCTION(http_build_query);
90 #endif /* ZEND_ENGINE_2 */
91 PHP_FUNCTION(ob_etaghandler);
92
93 PHP_MINIT_FUNCTION(http);
94 PHP_MSHUTDOWN_FUNCTION(http);
95 PHP_RINIT_FUNCTION(http);
96 PHP_RSHUTDOWN_FUNCTION(http);
97 PHP_MINFO_FUNCTION(http);
98
99 #endif /* PHP_HTTP_H */
100
101 /*
102 * Local variables:
103 * tab-width: 4
104 * c-basic-offset: 4
105 * End:
106 * vim600: noet sw=4 ts=4 fdm=marker
107 * vim<600: noet sw=4 ts=4
108 */
109