X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=php_http.h;h=ea2c2559e0262b81f666cb6f131567ac84d53996;hp=b7274e9dad14596b167ac9b9edd55ae35dc06afa;hb=2d5d8aa343778897c7eedb25464a2cb0a789d748;hpb=85e7a5ad7604cdb1096bacfc3db06812e87c0c60 diff --git a/php_http.h b/php_http.h index b7274e9..ea2c255 100644 --- a/php_http.h +++ b/php_http.h @@ -18,7 +18,7 @@ #ifndef PHP_EXT_HTTP_H #define PHP_EXT_HTTP_H -#define PHP_EXT_HTTP_VERSION "0.6.0-dev" +#define PHP_EXT_HTTP_VERSION "0.7.0-dev" /* make compile on Win32 */ #include "php_streams.h" @@ -34,9 +34,7 @@ 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; @@ -44,6 +42,10 @@ typedef struct { #ifdef HTTP_HAVE_CURL +#ifdef PHP_WIN32 +# include +#endif + #include typedef struct { @@ -57,7 +59,7 @@ typedef enum { HTTP_POST, } http_request_method; -#endif +#endif /* HTTP_HAVE _CURL */ PHP_METHOD(HTTPi, date); PHP_METHOD(HTTPi, absoluteURI); @@ -81,7 +83,7 @@ PHP_METHOD(HTTPi, get); PHP_METHOD(HTTPi, head); PHP_METHOD(HTTPi, postData); PHP_METHOD(HTTPi, postArray); -#endif +#endif /* HTTP_HAVE_CURL */ PHP_METHOD(HTTPi, authBasic); PHP_METHOD(HTTPi, authBasicCallback); @@ -133,7 +135,8 @@ PHP_METHOD(HTTPi_Request, getPostFiles); PHP_METHOD(HTTPi_Request, unsetPostFiles); PHP_METHOD(HTTPi_Request, send); PHP_METHOD(HTTPi_Request, getResponseData); -PHP_METHOD(HTTPi_Request, getResponseHeaders); +PHP_METHOD(HTTPi_Request, getResponseHeader); +PHP_METHOD(HTTPi_Request, getResponseCode); PHP_METHOD(HTTPi_Request, getResponseBody); PHP_METHOD(HTTPi_Request, getResponseInfo); @@ -167,10 +170,12 @@ PHP_FUNCTION(http_get); PHP_FUNCTION(http_head); PHP_FUNCTION(http_post_data); PHP_FUNCTION(http_post_array); -#endif +#endif /* HTTP_HAVE_CURL */ PHP_FUNCTION(http_auth_basic); PHP_FUNCTION(http_auth_basic_cb); - +#ifndef ZEND_ENGINE_2 +PHP_FUNCTION(http_build_query); +#endif /* ZEND_ENGINE_2 */ PHP_FUNCTION(ob_httpetaghandler); PHP_MINIT_FUNCTION(http); @@ -195,7 +200,7 @@ ZEND_BEGIN_MODULE_GLOBALS(http) size_t size; } curlbuf; zend_llist to_free; -#endif +#endif /* HTTP_HAVE_CURL */ ZEND_END_MODULE_GLOBALS(http) #endif /* PHP_HTTP_H */