3 #ifndef _MKMAP_H_INCLUDED_
4 #define _MKMAP_H_INCLUDED_
10 /* create or rewrite Postfix database
22 * A database handle is an opaque structure. The user is not supposed to
23 * know its implementation. We try to open and lock a file before DB/DBM
24 * initialization. However, if the file does not exist then we may have to
25 * acquire the lock after the DB/DBM initialization.
27 typedef struct MKMAP
{
28 struct DICT
*(*open
) (const char *, int, int); /* dict_xx_open() */
29 struct DICT
*dict
; /* dict_xx_open() result */
30 void (*after_open
) (struct MKMAP
*); /* may be null */
31 void (*after_close
) (struct MKMAP
*); /* may be null */
34 extern MKMAP
*mkmap_open(const char *, const char *, int, int);
35 extern void mkmap_append(MKMAP
*, const char *, const char *);
36 extern void mkmap_close(MKMAP
*);
38 #define mkmap_append(map, key, val) dict_put((map)->dict, (key), (val))
40 extern MKMAP
*mkmap_dbm_open(const char *);
41 extern MKMAP
*mkmap_cdb_open(const char *);
42 extern MKMAP
*mkmap_hash_open(const char *);
43 extern MKMAP
*mkmap_btree_open(const char *);
44 extern MKMAP
*mkmap_sdbm_open(const char *);
45 extern MKMAP
*mkmap_proxy_open(const char *);
50 /* The Secure Mailer license must be distributed with this software.
53 /* IBM T.J. Watson Research
55 /* Yorktown Heights, NY 10598, USA