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

/home/oden/RPM/BUILD/apr-util-0.9.4/include/apr_reslist.h

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

Generated on Wed Sep 15 18:51:15 2004 for Apache Portable Runtime Utility Library by doxygen 1.3.7