improved FolderIterator class

This commit is contained in:
mr-alice 2016-07-23 22:14:43 -04:00
parent 3c976bb7ee
commit 3e48b0fd95
11 changed files with 183 additions and 62 deletions

View file

@ -3,7 +3,8 @@
// - local: directories are crawled n disk and files are hashed / requested from a cache
// - remote: directories are requested remotely to a providing client
//
class HashCache ;
#include "file_sharing/hash_cache.h"
class LocalDirectoryStorage ;
class DirectoryUpdater
@ -19,12 +20,16 @@ class DirectoryUpdater
//
};
class LocalDirectoryUpdater: public DirectoryUpdater
class LocalDirectoryUpdater: public DirectoryUpdater, public HashCacheClient
{
public:
LocalDirectoryUpdater(HashCache *hash_cache) ;
virtual void tick() ;
protected:
virtual void hash_callback(const std::string& full_name,const RsFileHash& hash) ;
void recursUpdateSharedDir(const std::string& cumulated_path,DirectoryStorage::EntryIndex indx);
private:
HashCache *mHashCache ;
LocalDirectoryStorage *mSharedDirectories ;