half implemented the hash-based communication for dirs between friends

This commit is contained in:
MrAlice 2016-09-07 22:31:12 +02:00
parent ad1ba7a77d
commit eaa8ad883a
6 changed files with 87 additions and 36 deletions

View file

@ -117,5 +117,19 @@ private:
bool recursRemoveDirectory(DirectoryStorage::EntryIndex dir);
std::map<RsFileHash,DirectoryStorage::EntryIndex> mHashes ; // used for fast search access. We should try something faster than std::map. hash_map??
// Map of the hash of all files and all directories. The file hashes are the sha1sum of the file data.
// is used for fast search access for FT.
// Note: We should try something faster than std::map. hash_map??
std::map<RsFileHash,DirectoryStorage::EntryIndex> mFileHashes ;
// The directory hashes are the sha1sum of the
// full public path to the directory.
// The later is used by synchronisation items in order
// to avoid sending explicit EntryIndex values.
// This is kept separate from mFileHashes because the two are used
// in very different ways.
//
std::map<RsFileHash,DirectoryStorage::EntryIndex> mDirHashes ;
};