]> Creatis software - creaImageIO.git/blobdiff - src2/creaImageIOSynchron.cpp
Remove timestamp_database and timestamp files (now management only with maintenance_d...
[creaImageIO.git] / src2 / creaImageIOSynchron.cpp
index 74e9e98ced8fc532e9c0843a593098db249dce02..0748a861351066682f3336f1fee4dd54672f1c47 100644 (file)
@@ -377,5 +377,43 @@ namespace creaImageIO
                sql += "';";
                UPDATESYNCDB(sql);
     }
-}
 
+
+
+/////////////////////////////////////////////////////////////////////////////////////////////////
+    // get the files name to ignore for a add operation synchronization
+    // @param : the add key
+    //@result : list (path) of ignore files
+    /////////////////////////////////////////////////////////////////////////////////////////////////
+    void Synchronizer::GetList()
+    {
+               mList.clear();
+        std::vector<std::string> i_names;
+               std::string query = "SELECT PATH, REMOVE FROM IGNORED_FILES";
+               CppSQLite3Query res;
+        QUERYSYNCDB(query, res);
+               while (!res.eof())
+        {
+                       std::string file(res.getStringField(0));
+                       std::string ignore(res.getStringField(1));
+                       mList[file] = ignore == "0"? true : false;
+                       res.nextRow();
+        }
+               
+    }
+
+       bool Synchronizer::isIndexed(const std::string filename)
+       {
+               bool valid = true;
+               std::map <std::string, bool>::iterator it_list = mList.begin();
+               for(;it_list != mList.end(); it_list++)
+               {
+                       if(it_list->first == filename)
+                       {
+                               valid = false;
+                               break;
+                       }
+               }
+               return valid;
+       }
+}
\ No newline at end of file