* typo
[m6w6/ext-http] / php_http_request_object.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_HTTP_REQUEST_OBJECT_H
19 #define PHP_HTTP_REQUEST_OBJECT_H
20 #ifdef HTTP_HAVE_CURL
21 #ifdef ZEND_ENGINE_2
22
23 #ifdef PHP_WIN32
24 # include <winsock2.h>
25 #endif
26
27 #include <curl/curl.h>
28
29 typedef struct {
30 zend_object zo;
31 CURL *ch;
32 } http_request_object;
33
34 typedef enum {
35 HTTP_GET = 1,
36 HTTP_HEAD,
37 HTTP_POST,
38 } http_request_method;
39
40 extern zend_class_entry *http_request_object_ce;
41 extern zend_function_entry http_request_object_fe[];
42
43 #define http_request_object_init _http_request_object_init
44 extern void _http_request_object_init(INIT_FUNC_ARGS);
45 #define http_request_object_new _http_request_object_new
46 extern zend_object_value _http_request_object_new(zend_class_entry *ce TSRMLS_DC);
47 #define http_request_object_free _http_request_object_free
48 extern void _http_request_object_free(zend_object *object TSRMLS_DC);
49
50 PHP_METHOD(HttpRequest, __construct);
51 PHP_METHOD(HttpRequest, __destruct);
52 PHP_METHOD(HttpRequest, setOptions);
53 PHP_METHOD(HttpRequest, getOptions);
54 PHP_METHOD(HttpRequest, unsetOptions);
55 PHP_METHOD(HttpRequest, setSslOptions);
56 PHP_METHOD(HttpRequest, getSslOptions);
57 PHP_METHOD(HttpRequest, unsetSslOptions);
58 PHP_METHOD(HttpRequest, addHeaders);
59 PHP_METHOD(HttpRequest, getHeaders);
60 PHP_METHOD(HttpRequest, unsetHeaders);
61 PHP_METHOD(HttpRequest, addCookies);
62 PHP_METHOD(HttpRequest, getCookies);
63 PHP_METHOD(HttpRequest, unsetCookies);
64 PHP_METHOD(HttpRequest, setMethod);
65 PHP_METHOD(HttpRequest, getMethod);
66 PHP_METHOD(HttpRequest, setURL);
67 PHP_METHOD(HttpRequest, getURL);
68 PHP_METHOD(HttpRequest, setContentType);
69 PHP_METHOD(HttpRequest, getContentType);
70 PHP_METHOD(HttpRequest, setQueryData);
71 PHP_METHOD(HttpRequest, getQueryData);
72 PHP_METHOD(HttpRequest, addQueryData);
73 PHP_METHOD(HttpRequest, unsetQueryData);
74 PHP_METHOD(HttpRequest, setPostData);
75 PHP_METHOD(HttpRequest, getPostData);
76 PHP_METHOD(HttpRequest, addPostData);
77 PHP_METHOD(HttpRequest, unsetPostData);
78 PHP_METHOD(HttpRequest, addPostFile);
79 PHP_METHOD(HttpRequest, getPostFiles);
80 PHP_METHOD(HttpRequest, unsetPostFiles);
81 PHP_METHOD(HttpRequest, send);
82 PHP_METHOD(HttpRequest, getResponseData);
83 PHP_METHOD(HttpRequest, getResponseHeader);
84 PHP_METHOD(HttpRequest, getResponseCookie);
85 PHP_METHOD(HttpRequest, getResponseCode);
86 PHP_METHOD(HttpRequest, getResponseBody);
87 PHP_METHOD(HttpRequest, getResponseInfo);
88
89 #endif
90 #endif
91 #endif
92
93 /*
94 * Local variables:
95 * tab-width: 4
96 * c-basic-offset: 4
97 * End:
98 * vim600: noet sw=4 ts=4 fdm=marker
99 * vim<600: noet sw=4 ts=4
100 */
101