]> code.citadel.org Git - citadel.git/blob - citadel/server/database.h
Changed the API for cdb_rewind() / cdb_next_item() to make the caller hold the cursor
[citadel.git] / citadel / server / database.h
1 // Copyright (c) 1987-2023 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 // These functions comprise an interface between Citadel Server and a database backend.
6
7 #ifndef DATABASE_H
8 #define DATABASE_H
9
10 extern void             (*cdb_open_databases)(void);
11 extern void             (*cdb_close_databases)(void);
12 extern int              (*cdb_store)(int, const void *, int, void *, int);
13 extern int              (*cdb_delete)(int, void *, int);
14 extern void             (*cdb_free)(struct cdbdata *);
15 extern void *           (*cdb_rewind)(int);
16 extern struct cdbdata * (*cdb_next_item)(void *, int);
17 extern void             (*cdb_close_cursor)(int);
18 extern void             (*cdb_begin_transaction)(void);
19 extern void             (*cdb_end_transaction)(void);
20 extern void             (*cdb_check_handles)(void);
21 extern void             (*cdb_trunc)(int);
22 extern void             (*cdb_chmod_data)(void);
23 extern void             (*check_handles)(void *);
24 extern struct cdbdata * (*cdb_fetch)(int, const void *, int);
25 extern void             (*cdb_checkpoint)(void);
26 extern void             (*cdb_compact)(void);
27
28 #endif