dict_cache.h revision 1.1.1.1
1/* $NetBSD: dict_cache.h,v 1.1.1.1 2010/06/17 18:07:12 tron Exp $ */ 2 3#ifndef _DICT_CACHE_H_INCLUDED_ 4#define _DICT_CACHE_H_INCLUDED_ 5 6/*++ 7/* NAME 8/* dict_cache 3h 9/* SUMMARY 10/* External cache manager 11/* SYNOPSIS 12/* #include <dict_cache.h> 13/* DESCRIPTION 14/* .nf 15 16 /* 17 * Utility library. 18 */ 19#include <dict.h> 20 21 /* 22 * External interface. 23 */ 24typedef struct DICT_CACHE DICT_CACHE; 25typedef int (*DICT_CACHE_VALIDATOR_FN) (const char *, const char *, char *); 26 27extern DICT_CACHE *dict_cache_open(const char *, int, int); 28extern void dict_cache_close(DICT_CACHE *); 29extern const char *dict_cache_lookup(DICT_CACHE *, const char *); 30extern void dict_cache_update(DICT_CACHE *, const char *, const char *); 31extern int dict_cache_delete(DICT_CACHE *, const char *); 32extern int dict_cache_sequence(DICT_CACHE *, int, const char **, const char **); 33extern void dict_cache_control(DICT_CACHE *,...); 34extern const char *dict_cache_name(DICT_CACHE *); 35 36#define DICT_CACHE_FLAG_VERBOSE (1<<0) /* verbose operation */ 37#define DICT_CACHE_FLAG_STATISTICS (1<<1) /* log cache statistics */ 38 39#define DICT_CACHE_CTL_END 0 /* list terminator */ 40#define DICT_CACHE_CTL_FLAGS 1 /* see above */ 41#define DICT_CACHE_CTL_INTERVAL 2 /* cleanup interval */ 42#define DICT_CACHE_CTL_VALIDATOR 3 /* call-back validator */ 43#define DICT_CACHE_CTL_CONTEXT 4 /* call-back context */ 44 45/* LICENSE 46/* .ad 47/* .fi 48/* The Secure Mailer license must be distributed with this software. 49/* AUTHOR(S) 50/* Wietse Venema 51/* IBM T.J. Watson Research 52/* P.O. Box 704 53/* Yorktown Heights, NY 10598, USA 54/*--*/ 55 56#endif 57