ensure options are applied before the headers are set
[m6w6/ext-http] / php_http_encoding.h
index 23a3302..59bbd27 100644 (file)
@@ -6,15 +6,15 @@
     | modification, are permitted provided that the conditions mentioned |
     | in the accompanying LICENSE file are met.                          |
     +--------------------------------------------------------------------+
     | modification, are permitted provided that the conditions mentioned |
     | in the accompanying LICENSE file are met.                          |
     +--------------------------------------------------------------------+
-    | Copyright (c) 2004-2010, Michael Wallner <mike@php.net>            |
+    | Copyright (c) 2004-2014, Michael Wallner <mike@php.net>            |
     +--------------------------------------------------------------------+
 */
 
     +--------------------------------------------------------------------+
 */
 
-/* $Id: php_http_encoding_api.h 292841 2009-12-31 08:48:57Z mike $ */
-
 #ifndef PHP_HTTP_ENCODING_H
 #define PHP_HTTP_ENCODING_H
 
 #ifndef PHP_HTTP_ENCODING_H
 #define PHP_HTTP_ENCODING_H
 
+#include <zlib.h>
+
 extern PHP_MINIT_FUNCTION(http_encoding);
 extern PHP_RINIT_FUNCTION(http_encoding);
 extern PHP_RSHUTDOWN_FUNCTION(http_encoding);
 extern PHP_MINIT_FUNCTION(http_encoding);
 extern PHP_RINIT_FUNCTION(http_encoding);
 extern PHP_RSHUTDOWN_FUNCTION(http_encoding);
@@ -150,9 +150,9 @@ struct php_http_encoding_stream {
 #endif
 };
 
 #endif
 };
 
-extern php_http_encoding_stream_ops_t *php_http_encoding_stream_get_deflate_ops(void);
-extern php_http_encoding_stream_ops_t *php_http_encoding_stream_get_inflate_ops(void);
-extern php_http_encoding_stream_ops_t *php_http_encoding_stream_get_dechunk_ops(void);
+PHP_HTTP_API php_http_encoding_stream_ops_t *php_http_encoding_stream_get_deflate_ops(void);
+PHP_HTTP_API php_http_encoding_stream_ops_t *php_http_encoding_stream_get_inflate_ops(void);
+PHP_HTTP_API php_http_encoding_stream_ops_t *php_http_encoding_stream_get_dechunk_ops(void);
 
 PHP_HTTP_API php_http_encoding_stream_t *php_http_encoding_stream_init(php_http_encoding_stream_t *s, php_http_encoding_stream_ops_t *ops, unsigned flags TSRMLS_DC);
 PHP_HTTP_API php_http_encoding_stream_t *php_http_encoding_stream_copy(php_http_encoding_stream_t *from, php_http_encoding_stream_t *to);
 
 PHP_HTTP_API php_http_encoding_stream_t *php_http_encoding_stream_init(php_http_encoding_stream_t *s, php_http_encoding_stream_ops_t *ops, unsigned flags TSRMLS_DC);
 PHP_HTTP_API php_http_encoding_stream_t *php_http_encoding_stream_copy(php_http_encoding_stream_t *from, php_http_encoding_stream_t *to);
@@ -170,54 +170,21 @@ PHP_HTTP_API STATUS php_http_encoding_inflate(const char *data, size_t data_len,
 
 typedef struct php_http_encoding_stream_object {
        zend_object zo;
 
 typedef struct php_http_encoding_stream_object {
        zend_object zo;
+       zend_object_value zv;
        php_http_encoding_stream_t *stream;
 } php_http_encoding_stream_object_t;
 
        php_http_encoding_stream_t *stream;
 } php_http_encoding_stream_object_t;
 
-extern zend_class_entry *php_http_encoding_stream_class_entry;
-extern zend_function_entry php_http_encoding_stream_method_entry[];
-
-extern zend_object_value php_http_encoding_stream_object_new(zend_class_entry *ce TSRMLS_DC);
-extern zend_object_value php_http_encoding_stream_object_new_ex(zend_class_entry *ce, php_http_encoding_stream_t *s, php_http_encoding_stream_object_t **ptr TSRMLS_DC);
-extern zend_object_value php_http_encoding_stream_object_clone(zval *object TSRMLS_DC);
-extern void php_http_encoding_stream_object_free(void *object TSRMLS_DC);
+PHP_HTTP_API zend_class_entry *php_http_encoding_stream_class_entry;
 
 
-extern zend_class_entry *php_http_deflate_stream_class_entry;
-extern zend_function_entry php_http_deflate_stream_method_entry[];
-extern zend_class_entry *php_http_inflate_stream_class_entry;
-extern zend_function_entry php_http_inflate_stream_method_entry[];
-extern zend_class_entry *php_http_dechunk_stream_class_entry;
-extern zend_function_entry php_http_dechunk_stream_method_entry[];
+zend_object_value php_http_encoding_stream_object_new(zend_class_entry *ce TSRMLS_DC);
+zend_object_value php_http_encoding_stream_object_new_ex(zend_class_entry *ce, php_http_encoding_stream_t *s, php_http_encoding_stream_object_t **ptr TSRMLS_DC);
+zend_object_value php_http_encoding_stream_object_clone(zval *object TSRMLS_DC);
+void php_http_encoding_stream_object_free(void *object TSRMLS_DC);
 
 
-PHP_METHOD(HttpEncodingStream, __construct);
-PHP_METHOD(HttpEncodingStream, update);
-PHP_METHOD(HttpEncodingStream, flush);
-PHP_METHOD(HttpEncodingStream, done);
-PHP_METHOD(HttpEncodingStream, finish);
+PHP_HTTP_API zend_class_entry *php_http_deflate_stream_class_entry;
+PHP_HTTP_API zend_class_entry *php_http_inflate_stream_class_entry;
+PHP_HTTP_API zend_class_entry *php_http_dechunk_stream_class_entry;
 
 
-PHP_METHOD(HttpDeflateStream, encode);
-PHP_METHOD(HttpInflateStream, decode);
-PHP_METHOD(HttpDechunkStream, decode);
-
-/*
-typedef struct php_http_inflatestream_object {
-       zend_object zo;
-       php_http_encoding_stream_t *stream;
-} php_http_inflatestream_object_t;
-
-extern zend_class_entry *php_http_inflatestream_class_entry;
-extern zend_function_entry php_http_inflatestream_method_entry[];
-
-extern zend_object_value php_http_inflatestream_object_new(zend_class_entry *ce TSRMLS_DC);
-extern zend_object_value php_http_inflatestream_object_new_ex(zend_class_entry *ce, php_http_encoding_stream_t *s, php_http_inflatestream_object_t **ptr TSRMLS_DC);
-extern zend_object_value php_http_inflatestream_object_clone(zval *object TSRMLS_DC);
-extern void php_http_inflatestream_object_free(void *object TSRMLS_DC);
-
-PHP_METHOD(HttpInflateStream, __construct);
-PHP_METHOD(HttpInflateStream, factory);
-PHP_METHOD(HttpInflateStream, update);
-PHP_METHOD(HttpInflateStream, flush);
-PHP_METHOD(HttpInflateStream, finish);
-*/
 #endif
 
 /*
 #endif
 
 /*