1 /* $Cambridge: exim/src/src/dbfunctions.h,v 1.3 2005/06/14 10:32:01 ph10 Exp $ */
3 /*************************************************
4 * Exim - an Internet mail transport agent *
5 *************************************************/
7 /* Copyright (c) University of Cambridge 1995 - 2005 */
8 /* See the file NOTICE for conditions of use and distribution. */
11 /* Functions for reading/writing exim database files */
13 void dbfn_close(open_db *);
14 int dbfn_delete(open_db *, uschar *);
15 open_db *dbfn_open(uschar *, int, open_db *, BOOL);
16 void *dbfn_read_with_length(open_db *, uschar *, int *);
17 uschar *dbfn_scan(open_db *, BOOL, EXIM_CURSOR **);
18 int dbfn_write(open_db *, uschar *, void *, int);
20 /* Macro for the common call to read without wanting to know the length. */
22 #define dbfn_read(a, b) dbfn_read_with_length(a, b, NULL)
24 /* Berkeley DB uses a callback function to pass back error details. Its API
25 changed at release 4.3. */
27 #if defined(USE_DB) && defined(DB_VERSION_STRING)
28 #if DB_VERSION_MAJOR > 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 3)
29 void dbfn_bdb_error_callback(const DB_ENV *, const char *, const char *);
31 void dbfn_bdb_error_callback(const char *, char *);
35 /* End of dbfunctions.h */