From e90fcc54809db2591dc083f43ef54c6ec8c60847 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 18:16:13 +0200 Subject: Adding upstream version 4.96. Signed-off-by: Daniel Baumann --- src/lookupapi.h | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 src/lookupapi.h (limited to 'src/lookupapi.h') diff --git a/src/lookupapi.h b/src/lookupapi.h new file mode 100644 index 0000000..41cc239 --- /dev/null +++ b/src/lookupapi.h @@ -0,0 +1,65 @@ +/************************************************* +* Exim - an Internet mail transport agent * +*************************************************/ + +/* Copyright (c) The Exim Maintainers 2022 */ +/* Copyright (c) University of Cambridge 1995 - 2015 */ +/* See the file NOTICE for conditions of use and distribution. */ + + +/* The "type" field in each item is a set of bit flags: + + lookup_querystyle => this is a query-style lookup, + else single-key (+ file) style + lookup_absfile => an absolute file name is required, + (for single-key style only) +*/ + +typedef struct lookup_info { + uschar *name; /* e.g. "lsearch" */ + int type; /* query/singlekey/abs-file */ + void *(*open)( /* open function */ + const uschar *, /* file name for those that have one */ + uschar **); /* for error message */ + BOOL (*check)( /* file checking function */ + void *, /* handle */ + const uschar *, /* file name */ + int, /* modemask for file checking */ + uid_t *, /* owners for file checking */ + gid_t *, /* owngroups for file checking */ + uschar **); /* for error messages */ + int (*find)( /* find function */ + void *, /* handle */ + const uschar *, /* file name or NULL */ + const uschar *, /* key or query */ + int, /* length of key or query */ + uschar **, /* for returning answer */ + uschar **, /* for error message */ + uint *, /* cache TTL, seconds */ + const uschar *); /* options */ + void (*close)( /* close function */ + void *); /* handle */ + void (*tidy)(void); /* tidy function */ + uschar *(*quote)( /* quoting function */ + uschar *, /* string to quote */ + uschar *, /* additional data from quote name */ + unsigned); /* lookup type index */ + gstring * (*version_report)( /* diagnostic function */ + gstring *); /* string to appand to */ +} lookup_info; + +/* This magic number is used by the following lookup_module_info structure + for checking API compatibility. It used to be equivalent to the string"LMM3" */ +#define LOOKUP_MODULE_INFO_MAGIC 0x4c4d4935 +/* Version 2 adds: version_report */ +/* Version 3 change: non/cache becomes TTL in seconds */ +/* Version 4 add: index on quoting function */ +/* Version 5 change: version report now adds to a gstring */ + +typedef struct lookup_module_info { + uint magic; + lookup_info **lookups; + uint lookupcount; +} lookup_module_info; + +/* End of lookupapi.h */ -- cgit v1.2.3