- preparations for HttpMessage
[m6w6/ext-http] / php_http.h
index 3a53a5875495b7c24258f1fba84ed86e716aa521..571be3789dabc5de00b77c579975f4f904e6e0ac 100644 (file)
 #ifndef PHP_EXT_HTTP_H
 #define PHP_EXT_HTTP_H
 
-#define HTTP_PEXT_VERSION "0.7.0"
+#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);*/
@@ -206,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)