1 #ifndef __creaImageIOSynchron_h_INCLUDED__
2 #define __creaImageIOSynchron_h_INCLUDED__
8 #include "CppSQLite3.h"
13 //================================================================================================================
19 std::string recursive;
21 AddList(CppSQLite3Query& res):
22 key(res.getStringField(0)),
23 path(res.getStringField(1)),
24 recursive(res.getStringField(2)),
25 nbFiles(res.getStringField(3))
28 //================================================================================================================
30 //================================================================================================================
39 RemoveList(CppSQLite3Query& res):
40 key(res.getStringField(1)),
41 path(res.getStringField(2)),
42 remove(res.getStringField(3)),
43 time(res.getStringField(4))
46 //================================================================================================================
48 //================================================================================================================
52 Synchronizer(const std::string& path);
53 virtual ~Synchronizer();
55 void InsertAddOp(const std::string& path,
56 const std::string& recursive,
57 const std::string& nChildren,
58 const std::string& refdb);
59 void InsertIgnoreFile(const std::string& addKey,
60 const std::string& path,
61 const std::string& remove,
62 const std::string& time,
63 const std::string& refdb);
64 void RemoveEntry(const std::string i_table, const std::string i_key);
65 void RemoveEntries(const std::string i_table,
66 const std::string i_attribute,
67 const std::string i_operand,
68 const std::string i_key);
69 void GetFileList(std::vector<AddList>& files , const std::string& refdb);
70 void GetIgnoredFiles(const std::string& key, std::vector<std::string> &ignoreList);
71 std::string GetAttribute(const std::string& attribute,
72 const std::string& table,
73 const std::string& searchParam,
74 const std::string& searchValue,
75 const std::string& refdb);
76 void SetAttribute(const std::string& attribute,
77 const std::string& table,
78 const std::string& value,
79 const std::string& searchParam,
80 const std::string& searchValue,
81 const std::string& refdb);
82 std::vector<AddList> mAddList;
83 std::vector<RemoveList> mIgnoreList;
90 void UpdateAddList(const std::string& refdb);
91 void CleanList(const std::string& refdb);
92 void CleanName(std::string& str) const;
94 std::vector<std::string> GetIgnoreList(const std::string &i_key);
97 //================================================================================================================