chiark / gitweb /
use libinn logging where applicable - compiles
[inn-innduct.git] / storage / ovinterface.h
1 /*  $Id: ovinterface.h 6113 2003-01-04 16:29:56Z kondou $
2 **
3 **  Overview interface header
4 */
5
6 #ifndef __OVINTERFACE_H__
7 #define __OVINTERFACE_H__
8
9 #include "config.h"
10 #include "ov.h"
11 #include "storage.h"
12 #include "inn/history.h"
13
14 struct buffer;
15 struct vector;
16
17 typedef struct {
18     const char  *name;
19     bool        (*open)(int mode);
20     bool        (*groupstats)(char *group, int *lo, int *hi, int *count, int *flag);
21     bool        (*groupadd)(char *group, ARTNUM lo, ARTNUM hi, char *flag);
22     bool        (*groupdel)(char *group);
23     bool        (*add)(char *group, ARTNUM artnum, TOKEN token, char *data, int len, time_t arrived, time_t expires);
24     bool        (*cancel)(TOKEN token);
25     void        *(*opensearch)(char *group, int low, int high);
26     bool        (*search)(void *handle, ARTNUM *artnum, char **data, int *len, TOKEN *token, time_t *arrived);
27     void        (*closesearch)(void *handle);
28     bool        (*getartinfo)(char *group, ARTNUM artnum, TOKEN *token);
29     bool        (*expiregroup)(char *group, int *lo, struct history *h);
30     bool        (*ctl)(OVCTLTYPE type, void *val);
31     void        (*close)(void);
32 } OV_METHOD;
33
34 extern time_t   OVrealnow;
35 bool OVgroupbasedexpire(TOKEN token, const char *group, const char *data,
36                         int len, time_t arrived, time_t expires);
37 bool OVgroupmatch(const char *group);
38 bool OVhisthasmsgid(struct history *, const char *data);
39 void OVEXPremove(TOKEN token, bool deletedgroups, char **xref, int ngroups);
40 void OVEXPcleanup(void);
41 bool OVstatall;
42 time_t OVnow;
43 char *ACTIVE;
44 FILE *EXPunlinkfile;
45 bool OVignoreselfexpire;
46 bool OVusepost;
47 bool OVkeep;
48 bool OVearliest;
49 bool OVquiet;
50 int  OVnumpatterns;
51 char **OVpatterns;
52 time_t OVrealnow;
53
54 #define DEFAULT_MAX_XREF_LEN 8192
55
56 #endif /* __OVINTERFACE_H__ */