dav/scfg.h

changeset 648
fefe4b6f1048
parent 647
8bf1d9688698
child 649
0f4c59ac8c74
--- a/dav/scfg.h	Sat Sep 28 09:24:30 2019 +0200
+++ b/dav/scfg.h	Sun Sep 29 12:57:13 2019 +0200
@@ -64,6 +64,7 @@
 typedef struct TagConfig   TagConfig;
 typedef struct Versioning  Versioning;
 typedef struct SplitConfig SplitConfig;
+typedef struct Filter      Filter;
 
 enum PushStrategy {
     PUSH_STRATEGY_METADATA = 0,
@@ -71,6 +72,12 @@
 };
 typedef enum PushStrategy PushStrategy;
 
+struct Filter {
+    UcxList *include;
+    UcxList *exclude;
+    UcxList *tags;
+};
+
 typedef struct SyncDirectory {
     char *name;
     char *path;
@@ -80,9 +87,7 @@
     char *database;
     TagConfig *tagconfig;
     Versioning *versioning;
-    UcxList *include;
-    UcxList *exclude;
-    UcxList *tagfilter;
+    Filter filter;
     UcxList *splitconfig;
     uint32_t metadata;
     int max_retry;
@@ -100,22 +105,21 @@
 
 struct SplitConfig {
     /*
-     * path regex pattern or NULL
+     * resource filter or NULL
      */
-    regex_t *pattern;
-    
+    Filter *filter;
     /*
      * minimum file size for activating file splitting
      * a value of -1 means no size restriction
      */
     int64_t minsize;
-    
     /*
      * split files into blocks with this size
      */
     size_t blocksize;
 };
 
+
 enum TagFormat {
     TAG_FORMAT_TEXT = 0,
     TAG_FORMAT_CSV,
@@ -173,6 +177,8 @@
 
 char* generate_db_name(char *basename);
 
+void free_filter(Filter filter);
+
 void free_sync_config();
 
 

mercurial