Main Page | Modules | Namespace List | Data Structures | File List | Data Fields | Globals | Related Pages

include/apr_reslist.h

Go to the documentation of this file.
00001 /* Copyright 2000-2005 The Apache Software Foundation or its licensors, as 00002 * applicable. 00003 * 00004 * Licensed under the Apache License, Version 2.0 (the "License"); 00005 * you may not use this file except in compliance with the License. 00006 * You may obtain a copy of the License at 00007 * 00008 * http://www.apache.org/licenses/LICENSE-2.0 00009 * 00010 * Unless required by applicable law or agreed to in writing, software 00011 * distributed under the License is distributed on an "AS IS" BASIS, 00012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 * See the License for the specific language governing permissions and 00014 * limitations under the License. 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 /* __cplusplus */ 00042 00044 typedef struct apr_reslist_t apr_reslist_t; 00045 00046 /* Generic constructor called by resource list when it needs to create a 00047 * resource. 00048 * @param resource opaque resource 00049 * @param param flags 00050 * @param pool Pool 00051 */ 00052 typedef apr_status_t (*apr_reslist_constructor)(void **resource, void *params, 00053 apr_pool_t *pool); 00054 00055 /* Generic destructor called by resource list when it needs to destroy a 00056 * resource. 00057 * @param resource opaque resource 00058 * @param param flags 00059 * @param pool Pool 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 /* APR_HAS_THREADS */ 00143 00144 #endif /* ! APR_RESLIST_H */

Generated on Sun Nov 20 19:08:42 2005 for Apache Portable Runtime Utility Library by doxygen 1.3.8