dav/scfg.h

changeset 747
efbd59642577
parent 649
0f4c59ac8c74
child 778
bf53db813cc9
equal deleted inserted replaced
746:a569148841ff 747:efbd59642577
27 */ 27 */
28 28
29 #ifndef SCFG_H 29 #ifndef SCFG_H
30 #define SCFG_H 30 #define SCFG_H
31 31
32 #include <ucx/string.h> 32 #include <cx/string.h>
33 #include <stdbool.h> 33 #include <stdbool.h>
34 #include <libidav/webdav.h> 34 #include <libidav/webdav.h>
35 #include <regex.h> 35 #include <regex.h>
36 36
37 #include "db.h" 37 #include "db.h"
71 PUSH_STRATEGY_HASH 71 PUSH_STRATEGY_HASH
72 }; 72 };
73 typedef enum PushStrategy PushStrategy; 73 typedef enum PushStrategy PushStrategy;
74 74
75 struct Filter { 75 struct Filter {
76 UcxList *include; 76 CxList *include;
77 UcxList *exclude; 77 CxList *exclude;
78 UcxList *tags; 78 CxList *tags;
79 }; 79 };
80 80
81 typedef struct SyncDirectory { 81 typedef struct SyncDirectory {
82 char *name; 82 char *name;
83 char *path; 83 char *path;
86 char *repository; 86 char *repository;
87 char *database; 87 char *database;
88 TagConfig *tagconfig; 88 TagConfig *tagconfig;
89 Versioning *versioning; 89 Versioning *versioning;
90 Filter filter; 90 Filter filter;
91 UcxList *splitconfig; 91 CxList *splitconfig;
92 uint32_t metadata; 92 uint32_t metadata;
93 int max_retry; 93 int max_retry;
94 int allow_cmd; 94 int allow_cmd;
95 uint32_t symlink; 95 uint32_t symlink;
96 time_t lock_timeout; 96 time_t lock_timeout;
165 bool always; 165 bool always;
166 }; 166 };
167 167
168 int load_sync_config(); 168 int load_sync_config();
169 169
170 UcxMapIterator scfg_directory_iterator(); 170 CxIterator scfg_directory_iterator();
171 SyncDirectory* scfg_get_dir(char *name); 171 SyncDirectory* scfg_get_dir(const char *name);
172 172
173 int scfg_check_dir(SyncDirectory *dir); 173 int scfg_check_dir(SyncDirectory *dir);
174 174
175 char* scfg_create_path(char *cfg); 175 char* scfg_create_path(const char *cfg);
176 176
177 int add_directory(SyncDirectory *dir); 177 int add_directory(SyncDirectory *dir);
178 178
179 char* generate_db_name(char *basename); 179 char* generate_db_name(const char *basename);
180 180
181 void free_filter(Filter filter); 181 void free_filter(Filter filter);
182 182
183 void free_sync_config(); 183 void free_sync_config();
184 184

mercurial