- add libevent support
[m6w6/ext-http] / php_http_request_api.h
index bc6e2461cce0dae1363a6b96fcf9394c4c4ad202..22a497271d6908164b1959cf26d43dabd25d6181 100644 (file)
@@ -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 <mike@php.net>            |
+    | Copyright (c) 2004-2007, Michael Wallner <mike@php.net>            |
     +--------------------------------------------------------------------+
 */
 
@@ -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;
 
@@ -53,11 +58,14 @@ typedef struct _http_request_t {
 } 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)