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
00098 APU_DECLARE(apr_status_t) apr_reslist_destroy(apr_reslist_t *reslist);
00099
00105 APU_DECLARE(apr_status_t) apr_reslist_acquire(apr_reslist_t *reslist,
00106
void **resource);
00107
00111 APU_DECLARE(apr_status_t) apr_reslist_release(apr_reslist_t *reslist,
00112
void *resource);
00113
00114 #ifdef __cplusplus
00115 }
00116 #endif
00117
00120 #endif
00121
00122 #endif