Apache HTTPD
framework
httpd-2.4.62
srclib
apr-util
include
apr_sdbm.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
/*
18
* sdbm - ndbm work-alike hashed database library
19
* based on Per-Ake Larson's Dynamic Hashing algorithms. BIT 18 (1978).
20
* author:
[email protected]
21
* status: ex-public domain
22
*/
23
24
#ifndef APR_SDBM_H
25
#define APR_SDBM_H
26
27
#include "apu.h"
28
#include "
apr_errno.h
"
29
#include "
apr_file_io.h
"
/* for apr_fileperms_t */
30
44
typedef
struct
apr_sdbm_t
apr_sdbm_t
;
45
49
typedef
struct
{
51
char
*
dptr
;
53
/* apr_ssize_t for release 2.0??? */
54
int
dsize
;
55
}
apr_sdbm_datum_t
;
56
57
/* The extensions used for the database files */
59
#define APR_SDBM_DIRFEXT ".dir"
61
#define APR_SDBM_PAGFEXT ".pag"
62
63
/* flags to sdbm_store */
64
#define APR_SDBM_INSERT 0
65
#define APR_SDBM_REPLACE 1
66
#define APR_SDBM_INSERTDUP 2
86
APU_DECLARE
(
apr_status_t
)
apr_sdbm_open
(
apr_sdbm_t
**db,
const
char
*
name
,
87
apr_int32_t
mode
,
88
apr_fileperms_t
perms
,
apr_pool_t
*
p
);
89
94
APU_DECLARE
(
apr_status_t
)
apr_sdbm_close
(
apr_sdbm_t
*db);
95
111
APU_DECLARE
(
apr_status_t
)
apr_sdbm_lock
(
apr_sdbm_t
*db,
int
type
);
112
117
APU_DECLARE
(
apr_status_t
)
apr_sdbm_unlock
(
apr_sdbm_t
*db);
118
125
APU_DECLARE
(
apr_status_t
)
apr_sdbm_fetch
(
apr_sdbm_t
*db,
126
apr_sdbm_datum_t
*
value
,
127
apr_sdbm_datum_t
key
);
128
140
APU_DECLARE
(
apr_status_t
)
apr_sdbm_store
(
apr_sdbm_t
*db,
apr_sdbm_datum_t
key
,
141
apr_sdbm_datum_t
value
,
int
opt
);
142
149
APU_DECLARE
(
apr_status_t
)
apr_sdbm_delete
(
apr_sdbm_t
*db,
150
const
apr_sdbm_datum_t
key
);
151
161
APU_DECLARE
(
apr_status_t
)
apr_sdbm_firstkey
(
apr_sdbm_t
*db,
apr_sdbm_datum_t
*
key
);
162
168
APU_DECLARE
(
apr_status_t
)
apr_sdbm_nextkey
(
apr_sdbm_t
*db,
apr_sdbm_datum_t
*
key
);
169
174
APU_DECLARE
(
int
)
apr_sdbm_rdonly
(
apr_sdbm_t
*db);
176
#endif
/* APR_SDBM_H */
apr_errno.h
APR Error Codes.
apr_file_io.h
APR File I/O Handling.
APU_DECLARE
APU_DECLARE(void)
Computes SipHash-2-4, producing a 64bit (APR_SIPHASH_DSIZE) hash from a message and a 128bit (APR_SIP...
Definition
apr_sha1.c:206
key
apr_sdbm_datum_t apr_sdbm_datum_t key
Definition
apr_sdbm.h:127
perms
const char apr_int32_t apr_fileperms_t perms
Definition
apr_sdbm.h:88
value
apr_sdbm_datum_t * value
Definition
apr_sdbm.h:126
mode
const char apr_int32_t mode
Definition
apr_sdbm.h:87
p
const char apr_int32_t apr_fileperms_t apr_pool_t * p
Definition
apr_sdbm.h:88
opt
apr_sdbm_datum_t apr_sdbm_datum_t int opt
Definition
apr_sdbm.h:141
name
const char * name
Definition
apr_sdbm.h:86
type
int type
Definition
apr_sdbm.h:111
size
apr_size_t size
Definition
apr_allocator.h:115
apr_status_t
int apr_status_t
Definition
apr_errno.h:44
apr_fileperms_t
apr_int32_t apr_fileperms_t
Definition
apr_file_info.h:125
apr_pool_t
Definition
apr_pools.c:562
apr_sdbm_datum_t
Definition
apr_sdbm.h:49
apr_sdbm_datum_t::dptr
char * dptr
Definition
apr_sdbm.h:51
apr_sdbm_datum_t::dsize
int dsize
Definition
apr_sdbm.h:54
apr_sdbm_t
Definition
sdbm_private.h:49
Generated by
1.9.8