- remove dbg code
[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
23 #include "php.h"
24 #include "php_http.h"
25 #include "php_http_std_defs.h"
26 #include "php_http_util_object.h"
27
28 #ifdef ZEND_ENGINE_2
29
30 #ifdef HTTP_HAVE_CURL
31 static
32 ZEND_BEGIN_ARG_INFO(http_request_info_ref_3, 0)
33 ZEND_ARG_PASS_INFO(0)
34 ZEND_ARG_PASS_INFO(0)
35 ZEND_ARG_PASS_INFO(1)
36 ZEND_END_ARG_INFO();
37
38 static
39 ZEND_BEGIN_ARG_INFO(http_request_info_ref_4, 0)
40 ZEND_ARG_PASS_INFO(0)
41 ZEND_ARG_PASS_INFO(0)
42 ZEND_ARG_PASS_INFO(0)
43 ZEND_ARG_PASS_INFO(1)
44 ZEND_END_ARG_INFO();
45 #endif /* HTTP_HAVE_CURL */
46
47 zend_class_entry *http_util_object_ce;
48 zend_function_entry http_util_object_fe[] = {
49 #define HTTP_UTIL_ME(me, al, ai) ZEND_FENTRY(me, ZEND_FN(al), ai, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
50 HTTP_UTIL_ME(date, http_date, NULL)
51 HTTP_UTIL_ME(absoluteURI, http_absolute_uri, NULL)
52 HTTP_UTIL_ME(negotiateLanguage, http_negotiate_language, NULL)
53 HTTP_UTIL_ME(negotiateCharset, http_negotiate_charset, NULL)
54 HTTP_UTIL_ME(redirect, http_redirect, NULL)
55 HTTP_UTIL_ME(sendStatus, http_send_status, NULL)
56 HTTP_UTIL_ME(sendLastModified, http_send_last_modified, NULL)
57 HTTP_UTIL_ME(sendContentType, http_send_content_type, NULL)
58 HTTP_UTIL_ME(sendContentDisposition, http_send_content_disposition, NULL)
59 HTTP_UTIL_ME(matchModified, http_match_modified, NULL)
60 HTTP_UTIL_ME(matchEtag, http_match_etag, NULL)
61 HTTP_UTIL_ME(cacheLastModified, http_cache_last_modified, NULL)
62 HTTP_UTIL_ME(cacheEtag, http_cache_etag, NULL)
63 HTTP_UTIL_ME(chunkedDecode, http_chunked_decode, NULL)
64 HTTP_UTIL_ME(splitResponse, http_split_response, NULL)
65 HTTP_UTIL_ME(parseHeaders, http_parse_headers, NULL)
66 HTTP_UTIL_ME(getRequestHeaders, http_get_request_headers, NULL)
67 #ifdef HTTP_HAVE_CURL
68 HTTP_UTIL_ME(get, http_get, http_request_info_ref_3)
69 HTTP_UTIL_ME(head, http_head, http_request_info_ref_3)
70 HTTP_UTIL_ME(postData, http_post_data, http_request_info_ref_4)
71 HTTP_UTIL_ME(postArray, http_post_array, http_request_info_ref_4)
72 #endif /* HTTP_HAVE_CURL */
73 HTTP_UTIL_ME(authBasic, http_auth_basic, NULL)
74 HTTP_UTIL_ME(authBasicCallback, http_auth_basic_cb, NULL)
75 {NULL, NULL, NULL}
76 };
77
78 void _http_util_object_init(INIT_FUNC_ARGS)
79 {
80 HTTP_REGISTER_CLASS(HttpUtil, http_util_object, NULL, ZEND_ACC_FINAL_CLASS);
81 }
82
83 #endif /* ZEND_ENGINE_2 */
84
85 /*
86 * Local variables:
87 * tab-width: 4
88 * c-basic-offset: 4
89 * End:
90 * vim600: noet sw=4 ts=4 fdm=marker
91 * vim<600: noet sw=4 ts=4
92 */
93