dirplex: Added directory capture mode.
[ashd.git] / src / dirplex / dirplex.h
CommitLineData
600a1ce7
FT
1#ifndef _ASH_DIRPLEX_H
2#define _ASH_DIRPLEX_H
3
4#define PAT_BASENAME 0
5#define PAT_PATHNAME 1
6#define PAT_ALL 2
7#define PAT_DEFAULT 3
8
9#define PT_FILE 0
10#define PT_DIR 1
11
12struct config {
13 struct config *next, *prev;
14 char *path;
15 time_t mtime, lastck;
16 struct child *children;
17 struct pattern *patterns;
18 char **index;
300d73d9 19 char *capture;
600a1ce7
FT
20};
21
22struct rule {
23 int type;
24 char **patterns;
25};
26
27struct pattern {
28 struct pattern *next;
29 int type;
30 char *childnm;
31 char **fchild;
32 struct rule **rules;
33};
34
35struct child *getchild(struct config *cf, char *name);
36struct config *readconfig(char *file);
37struct config *getconfig(char *path);
38struct config **getconfigs(char *file);
da75c835 39struct child *findchild(char *file, char *name, struct config **cf);
600a1ce7
FT
40struct pattern *findmatch(char *file, int trydefault, int dir);
41
42extern time_t now;
43extern struct config *gconfig, *lconfig;
44
45#endif