X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;ds=sidebyside;f=php_http.h;h=571be3789dabc5de00b77c579975f4f904e6e0ac;hb=ebe82996a0b4e436ea91d460c88165dbeb398188;hp=95624e5e2ef37ffa11ef402ad961ea9bbd96d4b5;hpb=ac27503d8f6b671d2c7e19dda55e943c1cb57e50;p=m6w6%2Fext-http diff --git a/php_http.h b/php_http.h index 95624e5..571be37 100644 --- a/php_http.h +++ b/php_http.h @@ -18,12 +18,13 @@ #ifndef PHP_EXT_HTTP_H #define PHP_EXT_HTTP_H -#define HTTP_PEXT_VERSION "0.7.0-dev" +#define HTTP_PEXT_VERSION "0.8.0-dev" /* make compile on Win32 */ #include "php_streams.h" #include "ext/standard/md5.h" #include "phpstr/phpstr.h" +#include "php_http_message_api.h" extern zend_module_entry http_module_entry; #define phpext_http_ptr &http_module_entry @@ -37,6 +38,11 @@ extern zend_module_entry http_module_entry; #ifdef ZEND_ENGINE_2 +typedef struct { + zend_object zo; + http_message *message; +} http_message_object; + typedef struct { zend_object zo; } http_response_object; @@ -88,6 +94,8 @@ PHP_METHOD(HttpUtil, postArray); PHP_METHOD(HttpUtil, authBasic); PHP_METHOD(HttpUtil, authBasicCallback); +PHP_METHOD(HttpMessage, __construct); +PHP_METHOD(HttpMessage, __destruct); PHP_METHOD(HttpResponse, __construct);/* PHP_METHOD(HttpResponse, __destruct);*/ @@ -118,8 +126,15 @@ PHP_METHOD(HttpRequest, __destruct); PHP_METHOD(HttpRequest, setOptions); PHP_METHOD(HttpRequest, getOptions); PHP_METHOD(HttpRequest, unsetOptions); -PHP_METHOD(HttpRequest, addHeader); -PHP_METHOD(HttpRequest, addCookie); +PHP_METHOD(HttpRequest, setSslOptions); +PHP_METHOD(HttpRequest, getSslOptions); +PHP_METHOD(HttpRequest, unsetSslOptions); +PHP_METHOD(HttpRequest, addHeaders); +PHP_METHOD(HttpRequest, getHeaders); +PHP_METHOD(HttpRequest, unsetHeaders); +PHP_METHOD(HttpRequest, addCookies); +PHP_METHOD(HttpRequest, getCookies); +PHP_METHOD(HttpRequest, unsetCookies); PHP_METHOD(HttpRequest, setMethod); PHP_METHOD(HttpRequest, getMethod); PHP_METHOD(HttpRequest, setURL); @@ -140,6 +155,7 @@ PHP_METHOD(HttpRequest, unsetPostFiles); PHP_METHOD(HttpRequest, send); PHP_METHOD(HttpRequest, getResponseData); PHP_METHOD(HttpRequest, getResponseHeader); +PHP_METHOD(HttpRequest, getResponseCookie); PHP_METHOD(HttpRequest, getResponseCode); PHP_METHOD(HttpRequest, getResponseBody); PHP_METHOD(HttpRequest, getResponseInfo); @@ -198,6 +214,9 @@ ZEND_BEGIN_MODULE_GLOBALS(http) char *allowed_methods; #ifdef HTTP_HAVE_CURL phpstr curlbuf; +# if LIBCURL_VERSION_NUM < 0x070c00 + char curlerr[CURL_ERROR_SIZE + 1]; +# endif zend_llist to_free; #endif /* HTTP_HAVE_CURL */ ZEND_END_MODULE_GLOBALS(http)