X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=php_http_client_curl.h;h=c82a09cb94609c6a719acd6ca7437d2293b981fc;hp=b22e2664abc87c3b14a1a1ccf45ece734f35cdda;hb=791511f3bc18cdc68b3f27b43d9396cf56d99e5a;hpb=759c822dcd99fdf733399a5ed92dbea382ddc474 diff --git a/php_http_client_curl.h b/php_http_client_curl.h index b22e266..c82a09c 100644 --- a/php_http_client_curl.h +++ b/php_http_client_curl.h @@ -6,7 +6,7 @@ | modification, are permitted provided that the conditions mentioned | | in the accompanying LICENSE file are met. | +--------------------------------------------------------------------+ - | Copyright (c) 2004-2011, Michael Wallner | + | Copyright (c) 2004-2014, Michael Wallner | +--------------------------------------------------------------------+ */ @@ -15,65 +15,11 @@ #if PHP_HTTP_HAVE_CURL -PHP_HTTP_API php_http_client_ops_t *php_http_client_curl_get_ops(void); - -typedef struct php_http_client_curl { - CURL *handle; - - struct { - HashTable cache; - - struct curl_slist *headers; - struct curl_slist *resolve; - php_http_buffer_t cookies; - - long redirects; - unsigned range_request:1; - - struct { - uint count; - double delay; - } retry; - - } options; - - php_http_client_progress_t progress; - -} php_http_client_curl_t; - -typedef struct php_http_client_curl_storage { - char *url; - char *cookiestore; - char errorbuffer[0x100]; -} php_http_client_curl_storage_t; - -static inline php_http_client_curl_storage_t *get_storage(CURL *ch) { - php_http_client_curl_storage_t *st = NULL; - - curl_easy_getinfo(ch, CURLINFO_PRIVATE, &st); - - if (!st) { - st = pecalloc(1, sizeof(*st), 1); - curl_easy_setopt(ch, CURLOPT_PRIVATE, st); - curl_easy_setopt(ch, CURLOPT_ERRORBUFFER, st->errorbuffer); - } - - return st; -} - -extern STATUS php_http_client_curl_prepare(php_http_client_t *h, php_http_message_t *msg); - -extern zend_class_entry *php_http_client_curl_class_entry; -extern zend_function_entry php_http_client_curl_method_entry[]; - -extern zend_object_value php_http_client_curl_object_new(zend_class_entry *ce TSRMLS_DC); -extern zend_object_value php_http_client_curl_object_new_ex(zend_class_entry *ce, php_http_client_t *r, php_http_client_object_t **ptr TSRMLS_DC); - PHP_MINIT_FUNCTION(http_client_curl); - +PHP_MSHUTDOWN_FUNCTION(http_client_curl); #endif /* PHP_HTTP_HAVE_CURL */ -#endif /* PHP_HTTP_CLIENT_CURL_H */ +#endif /* PHP_HTTP_CLIENT_CURL_H */ /* * Local variables: