//====================================================================
//====================================================================
///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);
//====================================================================
//======================================================================
//======================================================================
// 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