1 /* $Id: hisinterface.h 5745 2002-09-08 19:52:12Z rra $
3 ** Interface to history API modules
10 #include <sys/types.h>
16 typedef struct hismethod {
18 void *(*open)(const char *path, int flags, struct history *);
19 bool (*close)(void *);
21 bool (*lookup)(void *, const char *, time_t *, time_t *, time_t *,
23 bool (*check)(void *, const char *);
24 bool (*write)(void *, const char *, time_t, time_t, time_t,
25 const struct token *);
26 bool (*replace)(void *, const char *, time_t, time_t, time_t,
27 const struct token *);
28 bool (*expire)(void *, const char *, const char *, bool, void *, time_t,
29 bool (*)(void *, time_t, time_t, time_t,
31 bool (*walk)(void *, const char *, void *,
32 bool (*)(void *, time_t, time_t, time_t,
33 const struct token *));
34 bool (*remember)(void *, const char *, time_t);
35 bool (*ctl)(void *, int, void *);
38 /* subordinate history manager private methods */
39 void his_seterror(struct history *, const char *);
41 enum { S_HIScacheadd, S_HIScachelookup, S_HISsetup, S_HISsync,
42 S_HISlogstats, S_HISclose, S_HISfilesfor, S_HIShavearticle,
43 S_HISwrite, S_HISremember, S_HIS_MAX };
45 /* fine grained history logging */
46 void his_logger(char *s, int code);