xref: /netbsd-src/external/ibm-public/postfix/dist/src/util/ctable.h (revision e89934bbf778a6d6d6894877c4da59d0c7835b0f)
1 /*	$NetBSD: ctable.h,v 1.2 2017/02/14 01:16:49 christos Exp $	*/
2 
3 #ifndef _CTABLE_H_INCLUDED_
4 #define _CTABLE_H_INCLUDED_
5 
6 /*++
7 /* NAME
8 /*	ctable 5
9 /* SUMMARY
10 /*	cache manager
11 /* SYNOPSIS
12 /*	#include <ctable.h>
13 /* DESCRIPTION
14 /* .nf
15 
16  /*
17   * Interface of the cache manager. The structure of a cache is not visible
18   * to the caller.
19   */
20 
21 #define	CTABLE struct ctable
22 typedef void *(*CTABLE_CREATE_FN) (const char *, void *);
23 typedef void (*CTABLE_DELETE_FN) (void *, void *);
24 
25 extern CTABLE *ctable_create(ssize_t, CTABLE_CREATE_FN, CTABLE_DELETE_FN, void *);
26 extern void ctable_free(CTABLE *);
27 extern void ctable_walk(CTABLE *, void (*) (const char *, const void *));
28 extern const void *ctable_locate(CTABLE *, const char *);
29 extern const void *ctable_refresh(CTABLE *, const char *);
30 extern void ctable_newcontext(CTABLE *, void *);
31 
32 /* LICENSE
33 /* .ad
34 /* .fi
35 /*	The Secure Mailer license must be distributed with this software.
36 /* AUTHOR(S)
37 /*	Wietse Venema
38 /*	IBM T.J. Watson Research
39 /*	P.O. Box 704
40 /*	Yorktown Heights, NY 10598, USA
41 /*--*/
42 
43 #endif
44