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 HTTP_PERSISTENT_HANDLE_H
16 #define HTTP_PERSISTENT_HANDLE_H
18 typedef void *(*http_persistent_handle_ctor
)(void);
19 typedef void (*http_persistent_handle_dtor
)(void *handle
);
20 typedef void *(*http_persistent_handle_copy
)(void *handle
);
22 PHP_MINIT_FUNCTION(http_persistent_handle
);
23 PHP_MSHUTDOWN_FUNCTION(http_persistent_handle
);
25 #define http_persistent_handle_provide(n, c, d, cc) _http_persistent_handle_provide_ex((n), strlen(n), (c), (d), (cc))
26 #define http_persistent_handle_provide_ex(n, l, c, d, cc) _http_persistent_handle_provide_ex((n), (l), (c), (d), (cc))
27 PHP_HTTP_API STATUS
_http_persistent_handle_provide_ex(const char *name_str
, size_t name_len
, http_persistent_handle_ctor ctor
, http_persistent_handle_dtor dtor
, http_persistent_handle_copy copy
);
29 #define http_persistent_handle_cleanup(n, c) _http_persistent_handle_cleanup_ex((n), strlen(n), (c) TSRMLS_CC)
30 #define http_persistent_handle_cleanup_ex(n, l,c ) _http_persistent_handle_cleanup_ex((n), (l), (c) TSRMLS_CC)
31 PHP_HTTP_API
void _http_persistent_handle_cleanup_ex(const char *name_str
, size_t name_len
, int current_ident_only TSRMLS_DC
);
33 #define http_persistent_handle_statall() _http_persistent_handle_statall_ex(NULL TSRMLS_CC)
34 #define http_persistent_handle_statall_ex(ht) _http_persistent_handle_statall_ex((ht) TSRMLS_CC)
35 PHP_HTTP_API HashTable
*_http_persistent_handle_statall_ex(HashTable
*ht TSRMLS_DC
);
37 #define http_persistent_handle_acquire(n, h) _http_persistent_handle_acquire_ex((n), strlen(n), (h) TSRMLS_CC)
38 #define http_persistent_handle_acquire_ex(n, l, h) _http_persistent_handle_acquire_ex((n), (l), (h) TSRMLS_CC)
39 PHP_HTTP_API STATUS
_http_persistent_handle_acquire_ex(const char *name_str
, size_t name_len
, void **handle TSRMLS_DC
);
41 #define http_persistent_handle_release(n, h) _http_persistent_handle_release_ex((n), strlen(n), (h) TSRMLS_CC)
42 #define http_persistent_handle_release_ex(n, l, h) _http_persistent_handle_release_ex((n), (l), (h) TSRMLS_CC)
43 PHP_HTTP_API STATUS
_http_persistent_handle_release_ex(const char *name_str
, size_t name_len
, void **handle TSRMLS_DC
);
45 #define http_persistent_handle_accrete(n, oh, nh) _http_persistent_handle_accrete_ex((n), strlen(n), (oh), (nh) TSRMLS_CC)
46 #define http_persistent_handle_accrete_ex(n, l, oh, nh) _http_persistent_handle_accrete_ex((n), (l), (oh), (nh) TSRMLS_CC)
47 PHP_HTTP_API STATUS
_http_persistent_handle_accrete_ex(const char *name_str
, size_t name_len
, void *old_handle
, void **new_handle TSRMLS_DC
);
49 #endif /* HTTP_PERSISTENT_HANDLE_H */
56 * vim600: noet sw=4 ts=4 fdm=marker
57 * vim<600: noet sw=4 ts=4