]> git.ozlabs.org Git - ccan/blob - ccan/tdb2/tdb1.h
2855d0c1b033828acdb50b546f04ebf3f66ff898
[ccan] / ccan / tdb2 / tdb1.h
1 #ifndef TDB1_H
2 #define TDB1_H
3
4 /*
5    Unix SMB/CIFS implementation.
6
7    trivial database library (version 1 compat functions)
8
9    Copyright (C) Andrew Tridgell 1999-2004
10    Copyright (C) Rusty Russell 2011
11
12      ** NOTE! The following LGPL license applies to the tdb
13      ** library. This does NOT imply that all of Samba is released
14      ** under the LGPL
15
16    This library is free software; you can redistribute it and/or
17    modify it under the terms of the GNU Lesser General Public
18    License as published by the Free Software Foundation; either
19    version 3 of the License, or (at your option) any later version.
20
21    This library is distributed in the hope that it will be useful,
22    but WITHOUT ANY WARRANTY; without even the implied warranty of
23    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
24    Lesser General Public License for more details.
25
26    You should have received a copy of the GNU Lesser General Public
27    License along with this library; if not, see <http://www.gnu.org/licenses/>.
28 */
29 #include "tdb2.h"
30
31 #ifndef _SAMBA_BUILD_
32 /* For mode_t */
33 #include <sys/types.h>
34 /* For O_* flags. */
35 #include <sys/stat.h>
36 #endif
37
38
39 void tdb1_set_max_dead(struct tdb_context *tdb, int max_dead);
40
41 TDB_DATA tdb1_firstkey(struct tdb_context *tdb);
42
43 TDB_DATA tdb1_nextkey(struct tdb_context *tdb, TDB_DATA key);
44
45 int tdb1_get_seqnum(struct tdb_context *tdb);
46
47 void tdb1_increment_seqnum_nonblock(struct tdb_context *tdb);
48
49 uint64_t tdb1_incompatible_hash(const void *key, size_t len, uint64_t seed, void *);
50
51 /* @} ******************************************************************/
52
53 /* wipe and repack */
54 int tdb1_wipe_all(struct tdb_context *tdb);
55 int tdb1_repack(struct tdb_context *tdb);
56
57 extern TDB_DATA tdb1_null;
58
59 #endif /* tdb1.h */