1 /*************************************************
2 * Exim - an Internet mail transport agent *
3 *************************************************/
5 /* Copyright (c) The Exim Maintainers 2022 - 2024 */
6 /* Copyright (c) University of Cambridge 1995 - 2021 */
7 /* See the file NOTICE for conditions of use and distribution. */
8 /* SPDX-License-Identifier: GPL-2.0-or-later */
13 /* Functions for reading/writing exim database files */
15 void dbfn_close(open_db *);
16 void dbfn_close_multi(open_db *);
17 int dbfn_delete(open_db *, const uschar *);
18 open_db *dbfn_open(const uschar *, int, open_db *, BOOL, BOOL);
19 open_db * dbfn_open_path(const uschar *, open_db *);
20 open_db *dbfn_open_multi(const uschar *, int, open_db *);
21 void *dbfn_read_klen(open_db *, const uschar *, int, int *);
22 void *dbfn_read_with_length(open_db *, const uschar *, int *);
23 void *dbfn_read_enforce_length(open_db *, const uschar *, size_t);
24 uschar *dbfn_scan(open_db *, BOOL, EXIM_CURSOR **);
25 int dbfn_write(open_db *, const uschar *, void *, int);
26 BOOL dbfn_transaction_start(open_db *);
27 void dbfn_transaction_commit(open_db *);
29 /* Macro for the common call to read without wanting to know the length. */
31 #define dbfn_read(a, b) dbfn_read_with_length(a, b, NULL)
34 /* End of dbfunctions.h */