X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=innduct.git;a=blobdiff_plain;f=history%2Fhisv6%2Fhisv6-private.h;fp=history%2Fhisv6%2Fhisv6-private.h;h=0000000000000000000000000000000000000000;hp=51398ea44674a53e84103b920e638e5df8aa68b9;hb=b7a32e2d73e3ab1add8208d3e157f7269a31ef4d;hpb=ac902a8299ff4469b356836f431ead31c3377377 diff --git a/history/hisv6/hisv6-private.h b/history/hisv6/hisv6-private.h deleted file mode 100644 index 51398ea..0000000 --- a/history/hisv6/hisv6-private.h +++ /dev/null @@ -1,81 +0,0 @@ -#ifndef HISV6_PRIVATE_H -#define HISV6_PRIVATE_H - -#include "config.h" -#include -#include -#include -#include -#include "inn/history.h" -#include "storage.h" -#include "libinn.h" - -/* Used by lots of stuff that parses history file entries. Should be moved - into a header specifically for history parsing. */ -#define HISV6_BADCHAR '_' -#define HISV6_FIELDSEP '\t' -#define HISV6_NOEXP '-' -#define HISV6_SUBFIELDSEP '~' - -/* maximum length of a history line: - 34 - hash - 1 - \t - 20 - arrived - 1 - ~ - 20 - expires - 1 - ~ - 20 - posted - 1 - tab - 38 - token - 1 - \n */ -#define HISV6_MAXLINE 137 - -/* minimum length of a history line: - 34 - hash - 1 - \t - 1 - arrived - 1 - \n */ -#define HISV6_MINLINE 37 - -struct hisv6 { - char *histpath; - FILE *writefp; - off_t offset; /* Offset into writefp. */ - unsigned long nextcheck; - struct history *history; - time_t statinterval; - size_t synccount; - size_t dirty; - ssize_t npairs; - int readfd; - int flags; - struct stat st; -}; - -/* values in the bitmap returned from hisv6_splitline */ -#define HISV6_HAVE_HASH (1<<0) -#define HISV6_HAVE_ARRIVED (1<<1) -#define HISV6_HAVE_POSTED (1<<2) -#define HISV6_HAVE_EXPIRES (1<<3) -#define HISV6_HAVE_TOKEN (1<<4) - -/* structure used to hold the callback and cookie so we don't try - * passing too many parameters into the callers callback */ -struct hisv6_walkstate { - union { - bool (*expire)(void *, time_t, time_t, time_t, TOKEN *); - bool (*walk)(void *, time_t, time_t, time_t, const TOKEN *); - } cb; - void *cookie; - bool paused; - bool ignore; - /* the next two fields are only used during expire... they should - * probably be linked off of cookie, but I've been lazy */ - struct hisv6 *new; - time_t threshold; -}; - -/* maximum length of the string from hisv6_errloc */ -#define HISV6_MAX_LOCATION 22 - -#endif