- even better use a object struct member for that crap
[m6w6/ext-http] / php_http_message_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_MESSAGE_OBJECT_H
19 #define PHP_HTTP_MESSAGE_OBJECT_H
20 #ifdef ZEND_ENGINE_2
21
22 #include "php_http_message_api.h"
23
24 typedef struct {
25 zend_object zo;
26 http_message *message;
27 zval _tmp_property;
28 } http_message_object;
29
30 extern zend_class_entry *http_message_object_ce;
31 extern zend_function_entry http_message_object_fe[];
32
33 #define http_message_object_init _http_message_object_init
34 extern void _http_message_object_init(INIT_FUNC_ARGS);
35 #define http_message_object_new _http_message_object_new
36 extern zend_object_value _http_message_object_new(zend_class_entry *ce TSRMLS_DC);
37 #define http_message_object_free _http_message_object_free
38 extern void _http_message_object_free(zend_object *object TSRMLS_DC);
39
40 #define HTTP_MSG_PROPHASH_TYPE 276192743LU
41 #define HTTP_MSG_PROPHASH_HTTP_VERSION 1138628683LU
42 #define HTTP_MSG_PROPHASH_RAW 2090679983LU
43 #define HTTP_MSG_PROPHASH_BODY 254474387LU
44 #define HTTP_MSG_PROPHASH_HEADERS 3199929089LU
45 #define HTTP_MSG_PROPHASH_NESTED_MESSAGE 3652857165LU
46 #define HTTP_MSG_PROPHASH_REQUEST_METHOD 1669022159LU
47 #define HTTP_MSG_PROPHASH_REQUEST_URI 3208695486LU
48 #define HTTP_MSG_PROPHASH_RESPONSE_STATUS 3857097400LU
49
50 PHP_METHOD(HttpMessage, __construct);
51 PHP_METHOD(HttpMessage, setRaw);
52 PHP_METHOD(HttpMessage, getBody);
53 PHP_METHOD(HttpMessage, getHeaders);
54
55 #endif
56 #endif