summaryrefslogtreecommitdiffstats
path: root/src/dbfunctions.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 09:44:07 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 09:44:07 +0000
commit39ce00b8d520cbecbd6af87257e8fb11df0ec273 (patch)
tree4c21a2674c19e5c44be3b3550b476b9e63d8ae3d /src/dbfunctions.h
parentInitial commit. (diff)
downloadexim4-39ce00b8d520cbecbd6af87257e8fb11df0ec273.tar.xz
exim4-39ce00b8d520cbecbd6af87257e8fb11df0ec273.zip
Adding upstream version 4.94.2.upstream/4.94.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/dbfunctions.h')
-rw-r--r--src/dbfunctions.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/dbfunctions.h b/src/dbfunctions.h
new file mode 100644
index 0000000..2e18e0e
--- /dev/null
+++ b/src/dbfunctions.h
@@ -0,0 +1,33 @@
+/*************************************************
+* Exim - an Internet mail transport agent *
+*************************************************/
+
+/* Copyright (c) University of Cambridge 1995 - 2015 */
+/* See the file NOTICE for conditions of use and distribution. */
+
+
+/* Functions for reading/writing exim database files */
+
+void dbfn_close(open_db *);
+int dbfn_delete(open_db *, const uschar *);
+open_db *dbfn_open(uschar *, int, open_db *, BOOL, BOOL);
+void *dbfn_read_with_length(open_db *, const uschar *, int *);
+uschar *dbfn_scan(open_db *, BOOL, EXIM_CURSOR **);
+int dbfn_write(open_db *, const uschar *, void *, int);
+
+/* Macro for the common call to read without wanting to know the length. */
+
+#define dbfn_read(a, b) dbfn_read_with_length(a, b, NULL)
+
+/* Berkeley DB uses a callback function to pass back error details. Its API
+changed at release 4.3. */
+
+#if defined(USE_DB) && defined(DB_VERSION_STRING)
+#if DB_VERSION_MAJOR > 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 3)
+void dbfn_bdb_error_callback(const DB_ENV *, const char *, const char *);
+#else
+void dbfn_bdb_error_callback(const char *, char *);
+#endif
+#endif
+
+/* End of dbfunctions.h */