-#include <curl/curl.h>
-
-#define HTTP_REQUEST_BODY_CSTRING 1
-#define HTTP_REQUEST_BODY_CURLPOST 2
-#define HTTP_REQUEST_BODY_UPLOADFILE 3
-typedef struct {
- int type;
- void *data;
- size_t size;
-} http_request_body;
-
-typedef struct {
- void ***tsrm_ctx;
- void *data;
-} http_request_callback_ctx;
-
-typedef struct {
- phpstr *response;
- phpstr *request;
- curl_infotype last_info;
-} http_request_conv;
-
-
-#define HTTP_REQUEST_CALLBACK_DATA(from, type, var) \
- http_request_callback_ctx *__CTX = (http_request_callback_ctx *) (from); \
- TSRMLS_FETCH_FROM_CTX(__CTX->tsrm_ctx); \
- type (var) = (type) (__CTX->data)
-
-#define http_request_callback_data(data) _http_request_callback_data_ex((data), 1 TSRMLS_CC)
-#define http_request_callback_data_ex(data, copy) _http_request_callback_data_ex((data), (copy) TSRMLS_CC)
-extern http_request_callback_ctx *_http_request_callback_data_ex(void *data, zend_bool cpy TSRMLS_DC);
-
-
-#define COPY_STRING 1
-#define COPY_SLIST 2
-#define COPY_CONTEXT 3
-#define COPY_CONV 4
-#define http_request_data_copy(type, data) _http_request_data_copy((type), (data) TSRMLS_CC)
-extern void *_http_request_data_copy(int type, void *data TSRMLS_DC);
-#define http_request_data_free_string _http_request_data_free_string
-extern void _http_request_data_free_string(void *string);
-#define http_request_data_free_slist _http_request_data_free_slist
-extern void _http_request_data_free_slist(void *list);
-#define http_request_data_free_context _http_request_data_free_context
-extern void _http_request_data_free_context(void *context);
-#define http_request_data_free_conv _http_request_data_free_conv
-extern void _http_request_data_free_conv(void *conv);
-
-#define http_request_conv(ch, rs, rq) _http_request_conv((ch), (rs), (rq) TSRMLS_CC)
-extern void _http_request_conv(CURL *ch, phpstr* response, phpstr *request TSRMLS_DC);
-
-#define http_request_body_new() _http_request_body_new(TSRMLS_C)
-PHP_HTTP_API http_request_body *_http_request_body_new(TSRMLS_D);