54baa0b106b8891f7b179016afb2b2007997cb39
[m6w6/ext-http] / http_util_object.c
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
19 #ifdef HAVE_CONFIG_H
20 # include "config.h"
21 #endif
22 #include "php.h"
23
24 #ifdef ZEND_ENGINE_2
25
26 #include "php_http.h"
27 #include "php_http_std_defs.h"
28 #include "php_http_util_object.h"
29
30 HTTP_DECLARE_ARG_PASS_INFO();
31
32 zend_class_entry *http_util_object_ce;
33 zend_function_entry http_util_object_fe[] = {
34 HTTP_STATIC_ME_ALIAS(date, http_date, NULL)
35 HTTP_STATIC_ME_ALIAS(absoluteURI, http_absolute_uri, NULL)
36 HTTP_STATIC_ME_ALIAS(negotiateLanguage, http_negotiate_language, NULL)
37 HTTP_STATIC_ME_ALIAS(negotiateCharset, http_negotiate_charset, NULL)
38 HTTP_STATIC_ME_ALIAS(redirect, http_redirect, NULL)
39 HTTP_STATIC_ME_ALIAS(sendStatus, http_send_status, NULL)
40 HTTP_STATIC_ME_ALIAS(sendLastModified, http_send_last_modified, NULL)
41 HTTP_STATIC_ME_ALIAS(sendContentType, http_send_content_type, NULL)
42 HTTP_STATIC_ME_ALIAS(sendContentDisposition, http_send_content_disposition, NULL)
43 HTTP_STATIC_ME_ALIAS(matchModified, http_match_modified, NULL)
44 HTTP_STATIC_ME_ALIAS(matchEtag, http_match_etag, NULL)
45 HTTP_STATIC_ME_ALIAS(cacheLastModified, http_cache_last_modified, NULL)
46 HTTP_STATIC_ME_ALIAS(cacheEtag, http_cache_etag, NULL)
47 HTTP_STATIC_ME_ALIAS(chunkedDecode, http_chunked_decode, NULL)
48 HTTP_STATIC_ME_ALIAS(splitResponse, http_split_response, NULL)
49 HTTP_STATIC_ME_ALIAS(parseHeaders, http_parse_headers, NULL)
50 HTTP_STATIC_ME_ALIAS(getRequestHeaders, http_get_request_headers, NULL)
51 HTTP_STATIC_ME_ALIAS(getRequestBody, http_get_request_body, NULL)
52 #ifdef HTTP_HAVE_CURL
53 HTTP_STATIC_ME_ALIAS(get, http_get, http_arg_pass_ref_3)
54 HTTP_STATIC_ME_ALIAS(head, http_head, http_arg_pass_ref_3)
55 HTTP_STATIC_ME_ALIAS(postData, http_post_data, http_arg_pass_ref_4)
56 HTTP_STATIC_ME_ALIAS(postFields, http_post_fields, http_arg_pass_ref_5)
57 #endif /* HTTP_HAVE_CURL */
58 HTTP_STATIC_ME_ALIAS(authBasic, http_auth_basic, NULL)
59 HTTP_STATIC_ME_ALIAS(authBasicCallback, http_auth_basic_cb, NULL)
60 {NULL, NULL, NULL}
61 };
62
63 void _http_util_object_init(INIT_FUNC_ARGS)
64 {
65 HTTP_REGISTER_CLASS(HttpUtil, http_util_object, NULL, ZEND_ACC_FINAL_CLASS);
66 }
67
68 #endif /* ZEND_ENGINE_2 */
69
70 /*
71 * Local variables:
72 * tab-width: 4
73 * c-basic-offset: 4
74 * End:
75 * vim600: noet sw=4 ts=4 fdm=marker
76 * vim<600: noet sw=4 ts=4
77 */
78