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