X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src2%2FcreaImageIOTimestampDatabaseHandler.h;h=4727fe3fde9bc0a080428b0e665825b184d835f0;hb=8b74b6a37dfc8b8a3ebb4f9f8e4b46429da0e4c7;hp=2a6d78e3fe65daceb898aee67f3e9135b509cd4e;hpb=67ba001e49dd897529b15024108831bdd4621edf;p=creaImageIO.git diff --git a/src2/creaImageIOTimestampDatabaseHandler.h b/src2/creaImageIOTimestampDatabaseHandler.h index 2a6d78e..4727fe3 100644 --- a/src2/creaImageIOTimestampDatabaseHandler.h +++ b/src2/creaImageIOTimestampDatabaseHandler.h @@ -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