-
Notifications
You must be signed in to change notification settings - Fork 0
/
nodesync.h
63 lines (51 loc) · 1.01 KB
/
nodesync.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#ifndef __nodesync_h__
#define __nodesync_h__
struct watch_item {
char *parent;
char *bname;
char *name;
char *bin;
char **cmd;
char **args;
int type;
unsigned int mask;
int flags;
int watch_id;
struct watch_item *next;
};
typedef struct watch_item * watch_item_t;
/* char *logfile; */
struct watch {
/* char *logfile; */
int type;
char *backup_dir;
char **excludes;
watch_item_t watch_list;
struct watch *next;
};
typedef struct watch * watch_t;
struct rnode {
char *node;
char *dir;
struct rnode *next;
};
typedef struct rnode* rnode_t;
struct config_item {
char *wpath;
char *backup_dir;
char *rsync_path;
char *rsync_args;
char **excludes;
int n_excludes;
int n_rnodes;
int recursive;
unsigned int depth;
rnode_t rnode;
struct config_item *next;
};
typedef struct config_item* cfg_t;
cfg_t load_cfg(int fd);
void walk_through(cfg_t cfg_i);
#define ISDIR 0
#define ISFILE 1
#endif