- module/includes cleanup
[m6w6/ext-http] / php_http_encoding_api.h
index 8c651a5261bf6c91bfed18b08d0b0c0d56b519d4..bc3e7da6504d050270b83fe6176422ea6fec6a03 100644 (file)
@@ -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 <mike@php.net>               |
-   +----------------------------------------------------------------------+
+    +--------------------------------------------------------------------+
+    | 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 <mike@php.net>            |
+    +--------------------------------------------------------------------+
 */
 
 /* $Id$ */
 #ifndef PHP_HTTP_ENCODING_API_H
 #define PHP_HTTP_ENCODING_API_H
 
-#include "php_http_std_defs.h"
-#include "phpstr/phpstr.h"
+#ifdef HTTP_HAVE_ZLIB
+#      include <zlib.h>
+#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 +50,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)