]> Creatis software - creaImageIO.git/blobdiff - src2/creaImageIOTimestampDatabaseHandler.h
move directory
[creaImageIO.git] / src2 / creaImageIOTimestampDatabaseHandler.h
index ce0155673d2458d1d64397fba6a6dd54737892a0..056614116d77f895ef1e95ac06bd1459193e1e3d 100644 (file)
@@ -45,30 +45,36 @@ namespace creaImageIO
     //====================================================================
        //====================================================================
        ///Returns the id of the path if it's indexed, blank otherwise
-       std::string IsIndexed(const std::string& path);
+       std::string IsIndexed(const std::string& path, const std::string& refdb);
     ///Sets the current path's parent
        bool AddDirectory(const std::string& parent,
                                   const std::string& path, 
                                   const time_t lastModif, 
-                                  const time_t lastRead);
+                                  const time_t lastRead,
+                                  const std::string& refdb);
        ///Adds a new file to the database without a parent
-       void AddFile(const std::string& path, const time_t lastModif, const time_t lastRead);
+       void AddFile(const std::string& path, const time_t lastModif, const time_t lastRead, const std::string& refdb);
        ///Adds a new file to the database with a parent
-       void AddFile(const std::string& parentId,const std::string& path, const time_t lastModif, const time_t lastRead);
+       void AddFile(const std::string& parentId,const std::string& path, const time_t lastModif, const time_t lastRead, const std::string& refdb);
        ///Sets the attribute to the value passed as parameter where the searchParameter is searchValue
        void SetAttribute(const std::string& attName, 
                                        const std::string& attValue,
                                        const std::string& searchParam,
                                        const std::string& searchValue);
        ///Removes the given node
-       void RemoveNode(const std::string& searchAtt, tree::Node* node);
+       void RemoveNode(const std::string& searchAtt, const tree::Node* node, const std::string& refdb);
        ///Removes the filename with the given pathname
-       void RemoveFile(const std::string& searchAtt, const std::string& searchVal);
+       void RemoveFile(const std::string& searchAtt, const std::string& searchVal, const std::string& refdb);
        ///Cleans the path name
-       void CleanName(std::string& str) const;
+       void CleanPath(std::string& str) const;
        ///Checks the timestamp in the database and compares it with the given one. 
        //If there is a difference, it will return false, otherwise it will return true.
-       bool CheckTimestamp(const std::string pathId, const time_t lastModif);
+       bool CheckTimestamp(const std::string pathId, const time_t lastModif, const std::string& refdb);
+       ///Removes the entries that match the given parameters
+       void RemoveEntries(const std::string i_table, 
+               const std::string i_attribute, 
+               const std::string i_operand, 
+               const std::string i_val);
 
        //====================================================================
 
@@ -85,7 +91,7 @@ namespace creaImageIO
     //======================================================================
        //======================================================================
     // Removes a file from the database
-       void DBRemove(const std::string& searchAtt, const std::string& searchVal);
+       void DBRemove(const std::string& searchAtt, const std::string& searchVal, const std::string& refdb);
  
   private:
     /// The DB