2 +--------------------------------------------------------------------+
4 +--------------------------------------------------------------------+
5 | Redistribution and use in source and binary forms, with or without |
6 | modification, are permitted provided that the conditions mentioned |
7 | in the accompanying LICENSE file are met. |
8 +--------------------------------------------------------------------+
9 | Copyright (c) 2004-2007, Michael Wallner <mike@php.net> |
10 +--------------------------------------------------------------------+
15 #ifndef PHP_HTTP_REQUEST_POOL_API_H
16 #define PHP_HTTP_REQUEST_POOL_API_H
20 typedef struct _http_request_pool_t
{
27 typedef int (*http_request_pool_apply_func
)(http_request_pool
*pool
, zval
*request TSRMLS_DC
);
28 typedef int (*http_request_pool_apply_with_arg_func
)(http_request_pool
*pool
, zval
*request
, void *arg TSRMLS_DC
);
30 PHP_MINIT_FUNCTION(http_request_pool
);
32 #define http_request_pool_responsehandler(p, r, c) _http_request_pool_responsehandler((p), (r), (c) TSRMLS_CC)
33 extern int _http_request_pool_responsehandler(http_request_pool
*pool
, zval
*req
, void *ch TSRMLS_DC
);
35 #define http_request_pool_init(p) _http_request_pool_init((p) TSRMLS_CC)
36 PHP_HTTP_API http_request_pool
*_http_request_pool_init(http_request_pool
*pool TSRMLS_DC
);
38 #define http_request_pool_attach(p, r) _http_request_pool_attach((p), (r) TSRMLS_CC)
39 PHP_HTTP_API STATUS
_http_request_pool_attach(http_request_pool
*pool
, zval
*request TSRMLS_DC
);
41 #define http_request_pool_detach(p, r) _http_request_pool_detach((p), (r) TSRMLS_CC)
42 PHP_HTTP_API STATUS
_http_request_pool_detach(http_request_pool
*pool
, zval
*request TSRMLS_DC
);
44 #define http_request_pool_apply(p, f) _http_request_pool_apply((p), (f) TSRMLS_CC)
45 PHP_HTTP_API
void _http_request_pool_apply(http_request_pool
*pool
, http_request_pool_apply_func cb TSRMLS_DC
);
47 #define http_request_pool_apply_with_arg(p, f, a) _http_request_pool_apply_with_arg((p), (f), (a) TSRMLS_CC)
48 PHP_HTTP_API
void _http_request_pool_apply_with_arg(http_request_pool
*pool
, http_request_pool_apply_with_arg_func cb
, void *arg TSRMLS_DC
);
50 #define http_request_pool_detach_all(p) _http_request_pool_detach_all((p) TSRMLS_CC)
51 PHP_HTTP_API
void _http_request_pool_detach_all(http_request_pool
*pool TSRMLS_DC
);
53 #define http_request_pool_send(p) _http_request_pool_send((p) TSRMLS_CC)
54 PHP_HTTP_API STATUS
_http_request_pool_send(http_request_pool
*pool TSRMLS_DC
);
56 #define http_request_pool_select _http_request_pool_select
57 PHP_HTTP_API STATUS
_http_request_pool_select(http_request_pool
*pool
);
59 #define http_request_pool_perform(p) _http_request_pool_perform((p) TSRMLS_CC)
60 PHP_HTTP_API
int _http_request_pool_perform(http_request_pool
*pool TSRMLS_DC
);
62 #define http_request_pool_dtor(p) _http_request_pool_dtor((p) TSRMLS_CC)
63 PHP_HTTP_API
void _http_request_pool_dtor(http_request_pool
*pool TSRMLS_DC
);
74 * vim600: noet sw=4 ts=4 fdm=marker
75 * vim<600: noet sw=4 ts=4