]> Creatis software - creaImageIO.git/blobdiff - src2/creaImageIOTimestampDatabaseHandler.h
Added functionality of timestamp and maintenance databases when using multiple sources
[creaImageIO.git] / src2 / creaImageIOTimestampDatabaseHandler.h
index 2a6d78e3fe65daceb898aee67f3e9135b509cd4e..4727fe3fde9bc0a080428b0e665825b184d835f0 100644 (file)
@@ -45,30 +45,31 @@ 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, const 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);
 
        //====================================================================
 
@@ -85,7 +86,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