00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef APR_RESLIST_H
00017 #define APR_RESLIST_H
00018
00024 #include "apr.h"
00025 #include "apu.h"
00026 #include "apr_pools.h"
00027 #include "apr_errno.h"
00028 #include "apr_time.h"
00029
00030 #if APR_HAS_THREADS
00031
00038 #ifdef __cplusplus
00039 extern "C" {
00040 #endif
00041
00043 typedef struct apr_reslist_t apr_reslist_t;
00044
00045
00046
00047
00048
00049
00050
00051 typedef apr_status_t (*apr_reslist_constructor)(void **resource, void *params,
00052 apr_pool_t *pool);
00053
00054
00055
00056
00057
00058
00059
00060 typedef apr_status_t (*apr_reslist_destructor)(void *resource, void *params,
00061 apr_pool_t *pool);
00062
00082 APU_DECLARE(apr_status_t) apr_reslist_create(apr_reslist_t **reslist,
00083 int min, int smax, int hmax,
00084 apr_interval_time_t ttl,
00085 apr_reslist_constructor con,
00086 apr_reslist_destructor de,
00087 void *params,
00088 apr_pool_t *pool);
00089
00101 APU_DECLARE(apr_status_t) apr_reslist_destroy(apr_reslist_t *reslist);
00102
00108 APU_DECLARE(apr_status_t) apr_reslist_acquire(apr_reslist_t *reslist,
00109 void **resource);
00110
00114 APU_DECLARE(apr_status_t) apr_reslist_release(apr_reslist_t *reslist,
00115 void *resource);
00116
00123 APU_DECLARE(void) apr_reslist_timeout_set(apr_reslist_t *reslist,
00124 apr_interval_time_t timeout);
00125
00131 APU_DECLARE(apr_status_t) apr_reslist_invalidate(apr_reslist_t *reslist,
00132 void *resource);
00133
00134
00135 #ifdef __cplusplus
00136 }
00137 #endif
00138
00141 #endif
00142
00143 #endif