X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=php_http_request_body_api.h;h=8d65e59a556b3699ca261e5bfab1f6986f572757;hp=5786d6c3b109666ffc1d8d3293013fdc31030848;hb=b045ad02a109f508cda8971667f75347ff63cfa1;hpb=7071b19ff84a668f6b9273a4dcf762a3cf7565f7 diff --git a/php_http_request_body_api.h b/php_http_request_body_api.h index 5786d6c..8d65e59 100644 --- a/php_http_request_body_api.h +++ b/php_http_request_body_api.h @@ -6,7 +6,7 @@ | modification, are permitted provided that the conditions mentioned | | in the accompanying LICENSE file are met. | +--------------------------------------------------------------------+ - | Copyright (c) 2004-2006, Michael Wallner | + | Copyright (c) 2004-2010, Michael Wallner | +--------------------------------------------------------------------+ */ @@ -21,11 +21,12 @@ #define HTTP_REQUEST_BODY_CSTRING 1 #define HTTP_REQUEST_BODY_CURLPOST 2 #define HTTP_REQUEST_BODY_UPLOADFILE 3 -typedef struct { - uint type:31; - uint free:1; +typedef struct _http_request_body_t { void *data; size_t size; + uint type:3; + uint free:1; + uint priv:28; } http_request_body; @@ -38,6 +39,9 @@ PHP_HTTP_API http_request_body *_http_request_body_init_ex(http_request_body *bo #define http_request_body_fill(b, fields, files) _http_request_body_fill((b), (fields), (files) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC TSRMLS_CC) PHP_HTTP_API http_request_body *_http_request_body_fill(http_request_body *body, HashTable *fields, HashTable *files ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC TSRMLS_DC); +#define http_request_body_encode(b, s, l) _http_request_body_encode((b), (s), (l) TSRMLS_CC) +PHP_HTTP_API STATUS _http_request_body_encode(http_request_body *body, char **buf, size_t *len TSRMLS_DC); + #define http_request_body_dtor(b) _http_request_body_dtor((b) TSRMLS_CC) PHP_HTTP_API void _http_request_body_dtor(http_request_body *body TSRMLS_DC);