X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=php_http_request_api.h;h=22a497271d6908164b1959cf26d43dabd25d6181;hp=286792dae8a563c1ecfdcd5feebe16572d3bc4f7;hb=ea76053f1595a10c79735e36a51f54478ff15acf;hpb=b3dd66ed1452139236b7101f7d73f19917bd1ea2 diff --git a/php_http_request_api.h b/php_http_request_api.h index 286792d..22a4972 100644 --- a/php_http_request_api.h +++ b/php_http_request_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-2007, Michael Wallner | +--------------------------------------------------------------------+ */ @@ -41,6 +41,11 @@ typedef struct _http_request_t { struct curl_slist *headers; } _cache; + struct { + uint count; + double delay; + } _retry; + char _error[CURL_ERROR_SIZE+1]; zval *_progress_callback; @@ -48,14 +53,19 @@ typedef struct _http_request_t { void ***tsrm_ls; #endif + uint _in_progress_cb:1; + } http_request; #define http_curl_init(r) http_curl_init_ex(NULL, (r)) -#define http_curl_init_ex(c, r) _http_curl_init_ex((c), (r)) -PHP_HTTP_API CURL *_http_curl_init_ex(CURL *ch, http_request *request); +#define http_curl_init_ex(c, r) _http_curl_init_ex((c), (r) TSRMLS_CC) +PHP_HTTP_API CURL *_http_curl_init_ex(CURL *ch, http_request *request TSRMLS_DC); + +#define http_curl_free(c) _http_curl_free((c) TSRMLS_CC) +PHP_HTTP_API void _http_curl_free(CURL **ch TSRMLS_DC); -#define http_curl_free(c) _http_curl_free(c) -PHP_HTTP_API void _http_curl_free(CURL **ch); +#define http_curl_copy(c) _http_curl_copy((c) TSRMLS_CC) +PHP_HTTP_API CURL *_http_curl_copy(CURL *ch TSRMLS_DC); #define http_request_new() _http_request_init_ex(NULL, NULL, 0, NULL ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC TSRMLS_CC) #define http_request_init(r) _http_request_init_ex((r), NULL, 0, NULL ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC TSRMLS_CC)