X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;ds=sidebyside;f=php_http_api.h;h=c776ba82e5a904df3d9f696c2a44e258dbc16701;hb=75cb17b3277c71c09660c4e8566483630240e36b;hp=9055e6616e4d1f2f40e8f49aa028ab52a42d1aa9;hpb=8d7fee64c740137b693630ad82374c11d1aaa76a;p=m6w6%2Fext-http diff --git a/php_http_api.h b/php_http_api.h index 9055e66..c776ba8 100644 --- a/php_http_api.h +++ b/php_http_api.h @@ -60,6 +60,7 @@ typedef enum { /* {{{ HAVE_CURL */ #ifdef HTTP_HAVE_CURL +#include /* CURL buffer size */ #define HTTP_CURLBUF_BODYSIZE 16384 @@ -111,6 +112,9 @@ PHP_HTTP_API inline zval *_http_get_server_var(const char *key TSRMLS_DC); #define http_ob_etaghandler(o, l, ho, hl, m) _http_ob_etaghandler((o), (l), (ho), (hl), (m) TSRMLS_CC) PHP_HTTP_API void _http_ob_etaghandler(char *output, uint output_len, char **handled_output, uint *handled_output_len, int mode TSRMLS_DC); +#define http_start_ob_handler(f, h, s, e) _http_start_ob_handler((f), (h), (s), (e) TSRMLS_CC) +PHP_HTTP_API STATUS _http_start_ob_handler(php_output_handler_func_t handler_func, char *handler_name, uint chunk_size, zend_bool erase TSRMLS_DC); + #define http_modified_match(entry, modified) _http_modified_match((entry), (modified) TSRMLS_CC) PHP_HTTP_API int _http_modified_match(const char *entry, const time_t t TSRMLS_DC); @@ -166,12 +170,18 @@ PHP_HTTP_API void _http_get_request_headers(zval *array TSRMLS_DC); #define http_get(u, o, i, d, l) _http_get((u), (o), (i), (d), (l) TSRMLS_CC) PHP_HTTP_API STATUS _http_get(const char *URL, HashTable *options, HashTable *info, char **data, size_t *data_len TSRMLS_DC); +#define http_get_ex(c, u, o, i, d, l) _http_get_ex((c), (u), (o), (i), (d), (l) TSRMLS_CC) +PHP_HTTP_API STATUS _http_get_ex(CURL *ch, const char *URL, HashTable *options, HashTable *info, char **data, size_t *data_len TSRMLS_DC); #define http_head(u, o, i, d, l) _http_head((u), (o), (i), (d), (l) TSRMLS_CC) PHP_HTTP_API STATUS _http_head(const char *URL, HashTable *options, HashTable *info, char **data, size_t *data_len TSRMLS_DC); +#define http_head_ex(c, u, o, i, d, l) _http_head_ex((c), (u), (o), (i), (d), (l) TSRMLS_CC) +PHP_HTTP_API STATUS _http_head_ex(CURL *ch, const char *URL, HashTable *options, HashTable *info, char **data, size_t *data_len TSRMLS_DC); #define http_post_data(u, pd, pl, o, i, d, l) _http_post_data((u), (pd), (pl), (o), (i), (d), (l) TSRMLS_CC) PHP_HTTP_API STATUS _http_post_data(const char *URL, char *postdata, size_t postdata_len, HashTable *options, HashTable *info, char **data, size_t *data_len TSRMLS_DC); +#define http_post_data_ex(c, u, pd, pl, o, i, d, l) _http_post_data_ex((c), (u), (pd), (pl), (o), (i), (d), (l) TSRMLS_CC) +PHP_HTTP_API STATUS _http_post_data_ex(CURL *ch, const char *URL, char *postdata, size_t postdata_len, HashTable *options, HashTable *info, char **data, size_t *data_len TSRMLS_DC); #define http_post_array(u, p, o, i, d, l) _http_post_array((u), (p), (o), (i), (d), (l) TSRMLS_CC) PHP_HTTP_API STATUS _http_post_array(const char *URL, HashTable *postarray, HashTable *options, HashTable *info, char **data, size_t *data_len TSRMLS_DC);