X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=php_http_requestpool_object.h;h=51a1dcc64b20e036a1fe29f5f40f67e555d0152e;hp=d3954f84f68d2baba6c78d65c547be9500b265ca;hb=refs%2Fheads%2Fv1.7.x;hpb=19cad54672b6babfac2b7c9c64c415c9a24b888a diff --git a/php_http_requestpool_object.h b/php_http_requestpool_object.h index d3954f8..51a1dcc 100644 --- a/php_http_requestpool_object.h +++ b/php_http_requestpool_object.h @@ -1,16 +1,13 @@ /* - +----------------------------------------------------------------------+ - | PECL :: http | - +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, that | - | is bundled with this package in the file LICENSE, and is available | - | through the world-wide-web at http://www.php.net/license/3_0.txt. | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@php.net so we can mail you a copy immediately. | - +----------------------------------------------------------------------+ - | Copyright (c) 2004-2005 Michael Wallner | - +----------------------------------------------------------------------+ + +--------------------------------------------------------------------+ + | PECL :: http | + +--------------------------------------------------------------------+ + | Redistribution and use in source and binary forms, with or without | + | modification, are permitted provided that the conditions mentioned | + | in the accompanying LICENSE file are met. | + +--------------------------------------------------------------------+ + | Copyright (c) 2004-2010, Michael Wallner | + +--------------------------------------------------------------------+ */ /* $Id$ */ @@ -20,15 +17,7 @@ #ifdef HTTP_HAVE_CURL #ifdef ZEND_ENGINE_2 -#ifdef PHP_WIN32 -# include -#endif - -#include - -#include "php_http_request_pool_api.h" - -typedef struct { +typedef struct _http_requestpool_object_t { zend_object zo; http_request_pool pool; struct { @@ -39,11 +28,11 @@ typedef struct { extern zend_class_entry *http_requestpool_object_ce; extern zend_function_entry http_requestpool_object_fe[]; -#define http_requestpool_object_init() _http_requestpool_object_init(INIT_FUNC_ARGS_PASSTHRU) -extern void _http_requestpool_object_init(INIT_FUNC_ARGS); -#define http_requestpool_object_new _http_requestpool_object_new +extern PHP_MINIT_FUNCTION(http_requestpool_object); + +#define http_requestpool_object_new(ce) _http_requestpool_object_new(ce TSRMLS_CC) extern zend_object_value _http_requestpool_object_new(zend_class_entry *ce TSRMLS_DC); -#define http_requestpool_object_free _http_requestpool_object_free +#define http_requestpool_object_free(o) _http_requestpool_object_free(o TSRMLS_CC) extern void _http_requestpool_object_free(zend_object *object TSRMLS_DC); PHP_METHOD(HttpRequestPool, __construct); @@ -52,14 +41,18 @@ PHP_METHOD(HttpRequestPool, attach); PHP_METHOD(HttpRequestPool, detach); PHP_METHOD(HttpRequestPool, send); PHP_METHOD(HttpRequestPool, reset); -PHP_METHOD(HttpRequestPool, socketSend); +PHP_METHOD(HttpRequestPool, socketPerform); PHP_METHOD(HttpRequestPool, socketSelect); -PHP_METHOD(HttpRequestPool, socketRead); PHP_METHOD(HttpRequestPool, valid); PHP_METHOD(HttpRequestPool, current); PHP_METHOD(HttpRequestPool, key); PHP_METHOD(HttpRequestPool, next); PHP_METHOD(HttpRequestPool, rewind); +PHP_METHOD(HttpRequestPool, count); +PHP_METHOD(HttpRequestPool, getAttachedRequests); +PHP_METHOD(HttpRequestPool, getFinishedRequests); +PHP_METHOD(HttpRequestPool, enablePipelining); +PHP_METHOD(HttpRequestPool, enableEvents); #endif #endif