Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef APR_RESLIST_H
00018 #define APR_RESLIST_H
00019
00025 #include "apr.h"
00026 #include "apu.h"
00027 #include "apr_pools.h"
00028 #include "apr_errno.h"
00029 #include "apr_time.h"
00030
00037 #ifdef __cplusplus
00038 extern "C" {
00039 #endif
00040
00042 typedef struct apr_reslist_t apr_reslist_t;
00043
00044
00045
00046
00047
00048
00049
00050 typedef apr_status_t (*apr_reslist_constructor)(void **resource, void *params,
00051 apr_pool_t *pool);
00052
00053
00054
00055
00056
00057
00058
00059 typedef apr_status_t (*apr_reslist_destructor)(void *resource, void *params,
00060 apr_pool_t *pool);
00061
00062
00063 #define APR_RESLIST_CLEANUP_DEFAULT 0
00064 #define APR_RESLIST_CLEANUP_FIRST 1
00089 APU_DECLARE(apr_status_t) apr_reslist_create(apr_reslist_t **reslist,
00090 int min, int smax, int hmax,
00091 apr_interval_time_t ttl,
00092 apr_reslist_constructor con,
00093 apr_reslist_destructor de,
00094 void *params,
00095 apr_pool_t *pool);
00096
00108 APU_DECLARE(apr_status_t) apr_reslist_destroy(apr_reslist_t *reslist);
00109
00115 APU_DECLARE(apr_status_t) apr_reslist_acquire(apr_reslist_t *reslist,
00116 void **resource);
00117
00121 APU_DECLARE(apr_status_t) apr_reslist_release(apr_reslist_t *reslist,
00122 void *resource);
00123
00130 APU_DECLARE(void) apr_reslist_timeout_set(apr_reslist_t *reslist,
00131 apr_interval_time_t timeout);
00132
00137 APU_DECLARE(apr_uint32_t) apr_reslist_acquired_count(apr_reslist_t *reslist);
00138
00144 APU_DECLARE(apr_status_t) apr_reslist_invalidate(apr_reslist_t *reslist,
00145 void *resource);
00146
00152 APU_DECLARE(apr_status_t) apr_reslist_maintain(apr_reslist_t *reslist);
00153
00167 APU_DECLARE(void) apr_reslist_cleanup_order_set(apr_reslist_t *reslist,
00168 apr_uint32_t mode);
00169
00170 #ifdef __cplusplus
00171 }
00172 #endif
00173
00176 #endif