]> code.citadel.org Git - citadel.git/blob - citadel/server/database.h
ff65918d776eb37358169d93db2aac8ae0aa92ca
[citadel.git] / citadel / server / database.h
1 // Copyright (c) 1987-2017 by the citadel.org team
2 // This program is open source software.  Use, duplication, or disclosure
3 // are subject to the terms of the GNU General Public License, version 3.
4
5 // We expect these functions to act as an internal API that remains identical
6 // across multiple database back ends.
7
8 #ifndef DATABASE_H
9 #define DATABASE_H
10
11 void                    cdb_init_backends(void);
12
13 void                    cdb_open_databases(void);
14 void                    cdb_close_databases(void);
15 int                     cdb_store(int, const void *, int, void *, int);
16 int                     cdb_delete(int, void *, int);
17 struct cdbdata *        cdb_fetch(int, const void *, int);
18 void                    cdb_free(struct cdbdata *);
19 void                    cdb_rewind(int);
20 struct cdbdata *        cdb_next_item(int);
21 void                    cdb_close_cursor(int);
22 void                    cdb_begin_transaction(void);
23 void                    cdb_end_transaction(void);
24 void                    cdb_check_handles(void);
25 void                    cdb_trunc(int);
26 void                    cdb_chmod_data(void);
27 void                    check_handles(void *);
28
29 extern void             (*cdb_checkpoint)(void);
30 extern void             (*cdb_compact)(void);
31
32 #endif