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

/home/oden/RPM/BUILD/apr-util-1.0.0/include/apr_dbm.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_DBM_H 00017 #define APR_DBM_H 00018 00019 #include "apu.h" 00020 #include "apr.h" 00021 #include "apr_errno.h" 00022 #include "apr_pools.h" 00023 #include "apr_file_info.h" 00024 00025 #ifdef __cplusplus 00026 extern "C" { 00027 #endif 00028 00041 typedef struct apr_dbm_t apr_dbm_t; 00042 00046 typedef struct 00047 { 00049 char *dptr; 00051 apr_size_t dsize; 00052 } apr_datum_t; 00053 00054 /* modes to open the DB */ 00055 #define APR_DBM_READONLY 1 00056 #define APR_DBM_READWRITE 2 00057 #define APR_DBM_RWCREATE 3 00058 #define APR_DBM_RWTRUNC 4 00085 APU_DECLARE(apr_status_t) apr_dbm_open_ex(apr_dbm_t **dbm, const char* type, 00086 const char *name, 00087 apr_int32_t mode, apr_fileperms_t perm, 00088 apr_pool_t *cntxt); 00089 00090 00107 APU_DECLARE(apr_status_t) apr_dbm_open(apr_dbm_t **dbm, const char *name, 00108 apr_int32_t mode, apr_fileperms_t perm, 00109 apr_pool_t *cntxt); 00110 00115 APU_DECLARE(void) apr_dbm_close(apr_dbm_t *dbm); 00116 00123 APU_DECLARE(apr_status_t) apr_dbm_fetch(apr_dbm_t *dbm, apr_datum_t key, 00124 apr_datum_t *pvalue); 00131 APU_DECLARE(apr_status_t) apr_dbm_store(apr_dbm_t *dbm, apr_datum_t key, 00132 apr_datum_t value); 00133 00140 APU_DECLARE(apr_status_t) apr_dbm_delete(apr_dbm_t *dbm, apr_datum_t key); 00141 00147 APU_DECLARE(int) apr_dbm_exists(apr_dbm_t *dbm, apr_datum_t key); 00148 00154 APU_DECLARE(apr_status_t) apr_dbm_firstkey(apr_dbm_t *dbm, apr_datum_t *pkey); 00155 00161 APU_DECLARE(apr_status_t) apr_dbm_nextkey(apr_dbm_t *dbm, apr_datum_t *pkey); 00162 00168 APU_DECLARE(void) apr_dbm_freedatum(apr_dbm_t *dbm, apr_datum_t data); 00169 00179 APU_DECLARE(char *) apr_dbm_geterror(apr_dbm_t *dbm, int *errcode, 00180 char *errbuf, apr_size_t errbufsize); 00195 APU_DECLARE(apr_status_t) apr_dbm_get_usednames_ex(apr_pool_t *pool, 00196 const char *type, 00197 const char *pathname, 00198 const char **used1, 00199 const char **used2); 00200 00213 APU_DECLARE(void) apr_dbm_get_usednames(apr_pool_t *pool, 00214 const char *pathname, 00215 const char **used1, 00216 const char **used2); 00217 00219 #ifdef __cplusplus 00220 } 00221 #endif 00222 00223 #endif /* !APR_DBM_H */

Generated on Thu Sep 16 13:48:14 2004 for Apache Portable Runtime Utility Library by doxygen 1.3.7