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-2011, Michael Wallner <mike@php.net> |
10 +--------------------------------------------------------------------+
13 #ifndef PHP_HTTP_REQUEST_FACTORY_H
14 #define PHP_HTTP_REQUEST_FACTORY_H
16 #include "php_http_request.h"
17 #include "php_http_request_pool.h"
18 #include "php_http_request_datashare.h"
20 typedef struct php_http_request_factory_driver
{
21 php_http_request_ops_t
*request_ops
;
22 php_http_request_pool_ops_t
*request_pool_ops
;
23 php_http_request_datashare_ops_t
*request_datashare_ops
;
24 } php_http_request_factory_driver_t
;
26 PHP_HTTP_API STATUS
php_http_request_factory_add_driver(const char *name_str
, size_t name_len
, php_http_request_factory_driver_t
*driver
);
27 PHP_HTTP_API STATUS
php_http_request_factory_get_driver(const char *name_str
, size_t name_len
, php_http_request_factory_driver_t
*driver
);
29 extern zend_class_entry
*php_http_request_factory_class_entry
;
30 extern zend_function_entry php_http_request_factory_method_entry
[];
32 #define php_http_request_factory_new php_http_object_new
34 PHP_METHOD(HttpRequestFactory
, __construct
);
35 PHP_METHOD(HttpRequestFactory
, createRequest
);
36 PHP_METHOD(HttpRequestFactory
, createPool
);
37 PHP_METHOD(HttpRequestFactory
, createDataShare
);
38 PHP_METHOD(HttpRequestFactory
, getGlobalDataShareInstance
);
39 PHP_METHOD(HttpRequestFactory
, getDriver
);
40 PHP_METHOD(HttpRequestFactory
, getAvailableDrivers
);
42 extern PHP_MINIT_FUNCTION(http_request_factory
);
43 extern PHP_MSHUTDOWN_FUNCTION(http_request_factory
);
45 #endif /* PHP_HTTP_REQUEST_FACTORY_H */
52 * vim600: noet sw=4 ts=4 fdm=marker
53 * vim<600: noet sw=4 ts=4