| 1 | #ifndef _STATSERVE_H |
| 2 | #define _STATSERVE_H |
| 3 | |
| 4 | #include <time.h> |
| 5 | #include <ashd/req.h> |
| 6 | |
| 7 | struct fileinfo { |
| 8 | time_t mtime; |
| 9 | size_t sz; |
| 10 | char ctype[64]; |
| 11 | void *data; |
| 12 | }; |
| 13 | |
| 14 | struct source { |
| 15 | struct source *next; |
| 16 | struct fileinfo (*serve)(struct source *src, char *nm); |
| 17 | void (*idle)(struct source *src); |
| 18 | void (*close)(struct source *src); |
| 19 | void *pdata; |
| 20 | }; |
| 21 | |
| 22 | struct source *mkdbsrc(char *path, char *envpath); |
| 23 | struct source *mkfssrc(char *path); |
| 24 | |
| 25 | extern int dbpagesize; |
| 26 | |
| 27 | #endif |