5 #include "inn/history.h"
9 #endif /* __cplusplus */
14 typedef enum {OVSPACE, OVSORT, OVCUTOFFLOW, OVGROUPBASEDEXPIRE, OVSTATICSEARCH, OVSTATALL, OVCACHEKEEP, OVCACHEFREE} OVCTLTYPE;
15 #define OV_NOSPACE 100
16 typedef enum {OVNEWSGROUP, OVARRIVED, OVNOSORT} OVSORTTYPE;
17 typedef enum {OVADDCOMPLETED, OVADDFAILED, OVADDGROUPNOMATCH} OVADDRESULT;
19 typedef struct _OVGE {
20 bool delayrm; /* append tokens to filename if true */
21 bool usepost; /* posting date is used to determine expiry
23 bool quiet; /* statistics will be suppressed if true */
24 bool keep; /* keep article so long as any of crossposted
25 newsgroups is not expired if true */
26 bool earliest; /* purge article any of crossposted
27 newsgroups is expired if true */
28 bool ignoreselfexpire; /* purge article even if storing method has
30 char *filename; /* used to append tokens to this file if
32 time_t now; /* used as current time */
33 float timewarp; /* used to bias expiry time */
36 extern bool OVstatall;
37 bool OVopen(int mode);
38 bool OVgroupstats(char *group, int *lo, int *hi, int *count, int *flag);
39 bool OVgroupadd(char *group, ARTNUM lo, ARTNUM hi, char *flag);
40 bool OVgroupdel(char *group);
41 OVADDRESULT OVadd(TOKEN token, char *data, int len, time_t arrived, time_t expires);
42 bool OVcancel(TOKEN token);
43 void *OVopensearch(char *group, int low, int high);
44 bool OVsearch(void *handle, ARTNUM *artnum, char **data, int *len, TOKEN *token, time_t *arrived);
45 void OVclosesearch(void *handle);
46 bool OVgetartinfo(char *group, ARTNUM artnum, TOKEN *token);
47 bool OVexpiregroup(char *group, int *lo, struct history *h);
48 bool OVctl(OVCTLTYPE type, void *val);
51 /* Overview data manipulation functions. */
52 const struct cvector *overview_fields(void);
53 struct vector *overview_extra_fields(void);
54 struct buffer *overview_build(ARTNUM number, const char *article,
55 size_t length, const struct vector *extra,
57 bool overview_check(const char *data, size_t length, ARTNUM article);
58 int overview_index(const char *field, const struct vector *extra);
59 struct cvector *overview_split(const char *line, size_t length,
60 ARTNUM *number, struct cvector *vector);
61 char *overview_getheader(const struct cvector *vector, int element,
62 const struct vector *extra);
64 /* offsets into vectors for standard overview headers */
78 #endif /* __cplusplus */