add max-age to http\Cookie
[m6w6/ext-http] / php_http_persistent_handle.h
1 /*
2 +--------------------------------------------------------------------+
3 | PECL :: http |
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 +--------------------------------------------------------------------+
11 */
12
13 #ifndef PHP_HTTP_PERSISTENT_HANDLE_H
14 #define PHP_HTTP_PERSISTENT_HANDLE_H
15
16 typedef struct php_http_persistent_handle_factory {
17 void *provider;
18
19 struct {
20 char *str;
21 size_t len;
22 } ident;
23
24 unsigned free_on_abandon:1;
25 } php_http_persistent_handle_factory_t;
26
27 struct php_http_persistent_handle_globals {
28 ulong limit;
29 struct {
30 ulong h;
31 char *s;
32 size_t l;
33 } ident;
34 };
35
36 PHP_MINIT_FUNCTION(http_persistent_handle);
37 PHP_MSHUTDOWN_FUNCTION(http_persistent_handle);
38
39 PHP_HTTP_API STATUS php_http_persistent_handle_provide(const char *name_str, size_t name_len, php_http_resource_factory_ops_t *fops, void *data, void (*dtor)(void *));
40 PHP_HTTP_API php_http_persistent_handle_factory_t *php_http_persistent_handle_concede(php_http_persistent_handle_factory_t *a, const char *name_str, size_t name_len, const char *ident_str, size_t ident_len TSRMLS_DC);
41 PHP_HTTP_API void php_http_persistent_handle_abandon(php_http_persistent_handle_factory_t *a);
42 PHP_HTTP_API void *php_http_persistent_handle_acquire(php_http_persistent_handle_factory_t *a TSRMLS_DC);
43 PHP_HTTP_API void php_http_persistent_handle_release(php_http_persistent_handle_factory_t *a, void *handle TSRMLS_DC);
44 PHP_HTTP_API void *php_http_persistent_handle_accrete(php_http_persistent_handle_factory_t *a, void *handle TSRMLS_DC);
45
46 PHP_HTTP_API php_http_resource_factory_ops_t *php_http_persistent_handle_resource_factory_ops(void);
47
48 PHP_HTTP_API void php_http_persistent_handle_cleanup(const char *name_str, size_t name_len, const char *ident_str, size_t ident_len TSRMLS_DC);
49 PHP_HTTP_API HashTable *php_http_persistent_handle_statall(HashTable *ht TSRMLS_DC);
50
51 #endif /* PHP_HTTP_PERSISTENT_HANDLE_H */
52
53 /*
54 * Local variables:
55 * tab-width: 4
56 * c-basic-offset: 4
57 * End:
58 * vim600: noet sw=4 ts=4 fdm=marker
59 * vim<600: noet sw=4 ts=4
60 */