X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src2%2FcreaImageIOTimestampDatabaseHandler.h;h=056614116d77f895ef1e95ac06bd1459193e1e3d;hb=595926ac27740a8822b6de9579e2e148c59f469c;hp=2a6d78e3fe65daceb898aee67f3e9135b509cd4e;hpb=7ae1412df3d682f639683e751f46a3f07be16d0b;p=creaImageIO.git diff --git a/src2/creaImageIOTimestampDatabaseHandler.h b/src2/creaImageIOTimestampDatabaseHandler.h index 2a6d78e..0566141 100644 --- a/src2/creaImageIOTimestampDatabaseHandler.h +++ b/src2/creaImageIOTimestampDatabaseHandler.h @@ -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, 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); + ///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