X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=php_http_encoding_api.h;h=a87a8c6dfde985ae445e54408042970f1885b879;hp=8c651a5261bf6c91bfed18b08d0b0c0d56b519d4;hb=e7e38363a2e833933519deb5f649d34fd7cc658d;hpb=5c5ddf9042732a05100245844fe2fb70bfe6d495 diff --git a/php_http_encoding_api.h b/php_http_encoding_api.h index 8c651a5..a87a8c6 100644 --- a/php_http_encoding_api.h +++ b/php_http_encoding_api.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$ */ @@ -19,11 +16,17 @@ #define PHP_HTTP_ENCODING_API_H #include "php_http_std_defs.h" -#include "phpstr/phpstr.h" + +#ifdef HTTP_HAVE_ZLIB +# include "phpstr/phpstr.h" +# include +#endif #define http_encoding_dechunk(e, el, d, dl) _http_encoding_dechunk((e), (el), (d), (dl) TSRMLS_CC) PHP_HTTP_API const char *_http_encoding_dechunk(const char *encoded, size_t encoded_len, char **decoded, size_t *decoded_len TSRMLS_DC); +#define http_encoding_response_start(cl) _http_encoding_response_start((cl) TSRMLS_CC) +PHP_HTTP_API zend_bool _http_encoding_response_start(size_t content_length TSRMLS_DC); #ifdef HTTP_HAVE_ZLIB @@ -50,20 +53,17 @@ PHP_HTTP_API STATUS _http_decode(http_encoding_type type, const char *data, size typedef struct { z_stream Z; int gzip; - unsigned long crc; + ulong crc; phpstr *storage; } http_encoding_stream; -#define http_encoding_stream_init(s, g, l, e, el) _http_encoding_stream_init((s), g, (l), (e), (el) TSRMLS_CC) +#define http_encoding_stream_init(s, g, l, e, el) _http_encoding_stream_init((s), (g), (l), (e), (el) TSRMLS_CC) PHP_HTTP_API STATUS _http_encoding_stream_init(http_encoding_stream *s, int gzip, int level, char **encoded, size_t *encoded_len TSRMLS_DC); #define http_encoding_stream_update(s, d, dl, e, el) _http_encoding_stream_update((s), (d), (dl), (e), (el) TSRMLS_CC) PHP_HTTP_API STATUS _http_encoding_stream_update(http_encoding_stream *s, const char *data, size_t data_len, char **encoded, size_t *encoded_len TSRMLS_DC); #define http_encoding_stream_finish(s, e, el) _http_encoding_stream_finish((s), (e), (el) TSRMLS_CC) PHP_HTTP_API STATUS _http_encoding_stream_finish(http_encoding_stream *s, char **encoded, size_t *encoded_len TSRMLS_DC); -#define http_encoding_response_start(cl) _http_encoding_response_start((cl) TSRMS_CC) -PHP_HTTP_API zend_bool _http_encoding_response_start(size_t content_length TSRMLS_DC); - #define http_encoding_gzencode(l, d, dl, r, rl) _http_encoding_gzencode((l), (d), (dl), (r), (rl) TSRMLS_CC) PHP_HTTP_API STATUS _http_encoding_gzencode(int level, const char *data, size_t data_len, char **encoded, size_t *encoded_len TSRMLS_DC); #define http_encoding_gzdecode(d, dl, r, rl) _http_encoding_gzdecode((d), (dl), (r), (rl) TSRMLS_CC)