X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=php_http_message_object.h;h=e9c849474752d0915d46641a8d5d48dd770c4ef3;hp=b3d4c1487738efe45bdc30dc2f8a23a6d6dd9258;hb=3f048c60b3f3b8151eb86121eed8c9b8927c55dc;hpb=781c90c0447166dd52ef881ae15751fa466c32fb diff --git a/php_http_message_object.h b/php_http_message_object.h index b3d4c14..e9c8494 100644 --- a/php_http_message_object.h +++ b/php_http_message_object.h @@ -1,16 +1,13 @@ /* - +----------------------------------------------------------------------+ - | PECL :: http | - +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, that | - | is bundled with this package in the file LICENSE, and is available | - | through the world-wide-web at http://www.php.net/license/3_0.txt. | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@php.net so we can mail you a copy immediately. | - +----------------------------------------------------------------------+ - | Copyright (c) 2004-2005 Michael Wallner | - +----------------------------------------------------------------------+ + +--------------------------------------------------------------------+ + | PECL :: http | + +--------------------------------------------------------------------+ + | Redistribution and use in source and binary forms, with or without | + | modification, are permitted provided that the conditions mentioned | + | in the accompanying LICENSE file are met. | + +--------------------------------------------------------------------+ + | Copyright (c) 2004-2005, Michael Wallner | + +--------------------------------------------------------------------+ */ /* $Id$ */ @@ -30,16 +27,15 @@ typedef struct { extern zend_class_entry *http_message_object_ce; extern zend_function_entry http_message_object_fe[]; -#define http_message_object_init() _http_message_object_init(INIT_FUNC_ARGS_PASSTHRU) -extern void _http_message_object_init(INIT_FUNC_ARGS); -#define http_message_object_new _http_message_object_new +extern PHP_MINIT_FUNCTION(http_message_object); + +#define http_message_object_new(ce) _http_message_object_new((ce) TSRMLS_CC) extern zend_object_value _http_message_object_new(zend_class_entry *ce TSRMLS_DC); -#define http_message_object_new_ex(ce, msg) _http_message_object_new_ex(ce, msg TSRMLS_CC) -#define http_message_object_from_msg(msg) _http_message_object_new_ex(http_message_object_ce, msg TSRMLS_CC) -extern zend_object_value _http_message_object_new_ex(zend_class_entry *ce, http_message *msg TSRMLS_DC); -#define http_message_object_clone(zobj) _http_message_object_clone(zobj TSRMLS_CC) -extern zend_object_value _http_message_object_clone(zval *object TSRMLS_DC); -#define http_message_object_free _http_message_object_free +#define http_message_object_new_ex(ce, msg, ptr) _http_message_object_new_ex((ce), (msg), (ptr) TSRMLS_CC) +extern zend_object_value _http_message_object_new_ex(zend_class_entry *ce, http_message *msg, http_message_object **ptr TSRMLS_DC); +#define http_message_object_clone(zobj) _http_message_object_clone_obj(zobj TSRMLS_CC) +extern zend_object_value _http_message_object_clone_obj(zval *object TSRMLS_DC); +#define http_message_object_free(o) _http_message_object_free((o) TSRMLS_CC) extern void _http_message_object_free(zend_object *object TSRMLS_DC); #define HTTP_MSG_PROPHASH_TYPE 276192743LU @@ -52,6 +48,16 @@ extern void _http_message_object_free(zend_object *object TSRMLS_DC); #define HTTP_MSG_PROPHASH_RESPONSE_STATUS 3857097400LU #define HTTP_MSG_PROPHASH_RESPONSE_CODE 1305615119LU +#define HTTP_MSG_CHILD_PROPHASH_TYPE 624467825LU +#define HTTP_MSG_CHILD_PROPHASH_HTTP_VERSION 1021966997LU +#define HTTP_MSG_CHILD_PROPHASH_BODY 602749469LU +#define HTTP_MSG_CHILD_PROPHASH_HEADERS 3626850379LU +#define HTTP_MSG_CHILD_PROPHASH_PARENT_MESSAGE 3910157662LU +#define HTTP_MSG_CHILD_PROPHASH_REQUEST_METHOD 3473464985LU +#define HTTP_MSG_CHILD_PROPHASH_REQUEST_URI 3855912904LU +#define HTTP_MSG_CHILD_PROPHASH_RESPONSE_STATUS 3274168514LU +#define HTTP_MSG_CHILD_PROPHASH_RESPONSE_CODE 1750746777LU + #define HTTP_MSG_CHECK_OBJ(obj, dofail) \ if (!(obj)->message) { \ http_error(E_WARNING, HTTP_E_MSG, "HttpMessage is empty"); \ @@ -67,6 +73,7 @@ extern void _http_message_object_free(zend_object *object TSRMLS_DC); PHP_METHOD(HttpMessage, __construct); PHP_METHOD(HttpMessage, getBody); +PHP_METHOD(HttpMessage, setBody); PHP_METHOD(HttpMessage, getHeaders); PHP_METHOD(HttpMessage, setHeaders); PHP_METHOD(HttpMessage, addHeaders); @@ -84,6 +91,10 @@ PHP_METHOD(HttpMessage, getParentMessage); PHP_METHOD(HttpMessage, send); PHP_METHOD(HttpMessage, toString); +PHP_METHOD(HttpMessage, count); +PHP_METHOD(HttpMessage, serialize); +PHP_METHOD(HttpMessage, unserialize); + PHP_METHOD(HttpMessage, fromString); #endif