X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=src%2Fphp_http_client_curl_user.h;h=a6ea847f8ca751061a84fce4c20b5c2973917427;hp=8a6778fd71c9e15d2e8b7054a6758633d5c0088f;hb=567a61130ed7f4fd7b47fe104ec32990f84bc06e;hpb=55d74c2d07edcf6d51fe62bc257c3bde0f7f25d4 diff --git a/src/php_http_client_curl_user.h b/src/php_http_client_curl_user.h index 8a6778f..a6ea847 100644 --- a/src/php_http_client_curl_user.h +++ b/src/php_http_client_curl_user.h @@ -10,9 +10,23 @@ +--------------------------------------------------------------------+ */ -#if PHP_HTTP_HAVE_CURL +#ifndef PHP_HTTP_CLIENT_CURL_USER_H +#define PHP_HTTP_CLIENT_CURL_USER_H -PHP_HTTP_API zend_class_entry *php_http_client_curl_user_class_entry; +#if PHP_HTTP_HAVE_LIBCURL + +typedef struct php_http_client_curl_user_context { + php_http_client_t *client; + zval user; + zend_function closure; + php_http_object_method_t timer; + php_http_object_method_t socket; + php_http_object_method_t once; + php_http_object_method_t wait; + php_http_object_method_t send; +} php_http_client_curl_user_context_t; + +PHP_HTTP_API zend_class_entry *php_http_client_curl_user_get_class_entry(); PHP_HTTP_API php_http_client_curl_ops_t *php_http_client_curl_user_ops_get(); PHP_MINIT_FUNCTION(http_client_curl_user); @@ -36,7 +50,7 @@ interface http\Client\Curl\User * - timeout occurs * - a watched socket needs action * - * @param callable $run callback as function(http\Client $client, resource $socket = null, int $action = http\Client\Curl\User::POLL_NONE) + * @param callable $run callback as function(http\Client $client, resource $socket = null, int $action = http\Client\Curl\User::POLL_NONE):int (returns unfinished requests pending) */ function init(callable $run); @@ -79,6 +93,8 @@ interface http\Client\Curl\User } #endif +#endif + /* * Local variables: * tab-width: 4