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
00031
#if APR_HAS_THREADS
00032
00039
#ifdef __cplusplus
00040
extern "C" {
00041
#endif
00042
00044 typedef struct apr_reslist_t apr_reslist_t;
00045
00046
00047
00048
00049
00050
00051
00052
typedef apr_status_t (*apr_reslist_constructor)(
void **resource,
void *params,
00053 apr_pool_t *pool);
00054
00055
00056
00057
00058
00059
00060
00061
typedef apr_status_t (*apr_reslist_destructor)(
void *resource,
void *params,
00062 apr_pool_t *pool);
00063
00083
APU_DECLARE(apr_status_t) apr_reslist_create(apr_reslist_t **reslist,
00084
int min,
int smax,
int hmax,
00085 apr_interval_time_t ttl,
00086 apr_reslist_constructor con,
00087 apr_reslist_destructor de,
00088
void *params,
00089 apr_pool_t *pool);
00090
00102 APU_DECLARE(apr_status_t) apr_reslist_destroy(apr_reslist_t *reslist);
00103
00109 APU_DECLARE(apr_status_t) apr_reslist_acquire(apr_reslist_t *reslist,
00110
void **resource);
00111
00115 APU_DECLARE(apr_status_t) apr_reslist_release(apr_reslist_t *reslist,
00116
void *resource);
00117
00124 APU_DECLARE(
void) apr_reslist_timeout_set(apr_reslist_t *reslist,
00125 apr_interval_time_t timeout);
00126
00132 APU_DECLARE(apr_status_t) apr_reslist_invalidate(apr_reslist_t *reslist,
00133
void *resource);
00134
00135
00136 #ifdef __cplusplus
00137 }
00138 #endif
00139
00142 #endif
00143
00144 #endif