Apache2
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
apr_dbm.h
Go to the documentation of this file.
1 /* Licensed to the Apache Software Foundation (ASF) under one or more
2  * contributor license agreements. See the NOTICE file distributed with
3  * this work for additional information regarding copyright ownership.
4  * The ASF licenses this file to You under the Apache License, Version 2.0
5  * (the "License"); you may not use this file except in compliance with
6  * the License. You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef APR_DBM_H
18 #define APR_DBM_H
19 
20 #include "apu.h"
21 #include "apr.h"
22 #include "apr_errno.h"
23 #include "apr_pools.h"
24 #include "apr_file_info.h"
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
42 typedef struct apr_dbm_t apr_dbm_t;
43 
47 typedef struct
48 {
50  char *dptr;
53 } apr_datum_t;
54 
55 /* modes to open the DB */
56 #define APR_DBM_READONLY 1
57 #define APR_DBM_READWRITE 2
58 #define APR_DBM_RWCREATE 3
59 #define APR_DBM_RWTRUNC 4
89 APR_DECLARE(apr_status_t) apr_dbm_open_ex(apr_dbm_t **dbm, const char* type,
90  const char *name,
91  apr_int32_t mode, apr_fileperms_t perm,
92  apr_pool_t *cntxt);
93 
94 
111 APR_DECLARE(apr_status_t) apr_dbm_open(apr_dbm_t **dbm, const char *name,
112  apr_int32_t mode, apr_fileperms_t perm,
113  apr_pool_t *cntxt);
114 
120 
128  apr_datum_t *pvalue);
136  apr_datum_t value);
137 
145 
152 
159 
166 
173 
183 APR_DECLARE(char *) apr_dbm_geterror(apr_dbm_t *dbm, int *errcode,
184  char *errbuf, apr_size_t errbufsize);
200  const char *type,
201  const char *pathname,
202  const char **used1,
203  const char **used2);
204 
218  const char *pathname,
219  const char **used1,
220  const char **used2);
221 
223 #ifdef __cplusplus
224 }
225 #endif
226 
227 #endif /* !APR_DBM_H */
const apr_dbm_type_t * type
Definition: apr_dbm_private.h:107
size_t apr_size_t
Definition: apr.h:375
apr_status_t apr_dbm_fetch(apr_dbm_t *dbm, apr_datum_t key, apr_datum_t *pvalue)
APR File Information.
apr_bucket_brigade request_rec apr_pool_t * pool
Definition: mod_dav.h:552
int apr_dbm_exists(apr_dbm_t *dbm, apr_datum_t key)
char * apr_dbm_geterror(apr_dbm_t *dbm, int *errcode, char *errbuf, apr_size_t errbufsize)
Definition: apr_dbm_private.h:93
apr_status_t apr_dbm_store(apr_dbm_t *dbm, apr_datum_t key, apr_datum_t value)
APR memory allocation.
apr_status_t apr_dbm_open(apr_dbm_t **dbm, const char *name, apr_int32_t mode, apr_fileperms_t perm, apr_pool_t *cntxt)
int errcode
Definition: apr_dbm_private.h:102
apr_int32_t apr_fileperms_t
Definition: apr_file_info.h:125
void apr_dbm_get_usednames(apr_pool_t *pool, const char *pathname, const char **used1, const char **used2)
APR Error Codes.
apr_status_t apr_dbm_delete(apr_dbm_t *dbm, apr_datum_t key)
apr_size_t dsize
Definition: apr_dbm.h:52
APR Platform Definitions.
char * dptr
Definition: apr_dbm.h:50
#define APR_DECLARE(x)
Definition: macros.h:6
apr_status_t apr_dbm_nextkey(apr_dbm_t *dbm, apr_datum_t *pkey)
const char * name
Definition: mod_dav.h:726
struct apr_pool_t apr_pool_t
Definition: apr_pools.h:60
int apr_status_t
Definition: apr_errno.h:44
Definition: apr_dbm.h:47
void apr_dbm_freedatum(apr_dbm_t *dbm, apr_datum_t data)
apr_status_t apr_dbm_get_usednames_ex(apr_pool_t *pool, const char *type, const char *pathname, const char **used1, const char **used2)
apr_status_t apr_dbm_firstkey(apr_dbm_t *dbm, apr_datum_t *pkey)
void apr_dbm_close(apr_dbm_t *dbm)
int apr_int32_t
Definition: apr.h:333