X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=php_http.h;h=55b59891ab71063256637cd1633b1dfa31a4110b;hp=0de3905e957ec065c36b6c15b8d05db9c4bbe8d5;hb=01a7fd61aae8bfb11ce8cb1e39c0653511de665b;hpb=3e711605ee28d986db49a9a678ca055cf526d129 diff --git a/php_http.h b/php_http.h index 0de3905..55b5989 100644 --- a/php_http.h +++ b/php_http.h @@ -34,16 +34,27 @@ extern zend_module_entry http_module_entry; # define HTTP_G(v) (http_globals.v) #endif -#ifndef ZEND_ENGINE_2 -# include "php_http_build_query.h" -#else +#ifdef ZEND_ENGINE_2 + +typedef struct { + zend_object zo; +} httpi_response_object; #ifdef HTTP_HAVE_CURL + +#include + +typedef struct { + zend_object zo; + CURL *ch; +} httpi_request_object; + typedef enum { HTTP_GET, HTTP_HEAD, HTTP_POST, } http_request_method; + #endif PHP_METHOD(HTTPi, date); @@ -157,7 +168,9 @@ PHP_FUNCTION(http_post_array); #endif PHP_FUNCTION(http_auth_basic); PHP_FUNCTION(http_auth_basic_cb); - +#ifndef ZEND_ENGINE_2 +PHP_FUNCTION(http_build_query); +#endif PHP_FUNCTION(ob_httpetaghandler); PHP_MINIT_FUNCTION(http); @@ -176,17 +189,12 @@ ZEND_BEGIN_MODULE_GLOBALS(http) char *allowed_methods; #ifdef HTTP_HAVE_CURL struct { - struct { - char *data; - size_t used; - size_t free; - } body; - struct { - char *data; - size_t used; - size_t free; - } hdrs; + char *data; + size_t used; + size_t free; + size_t size; } curlbuf; + zend_llist to_free; #endif ZEND_END_MODULE_GLOBALS(http)