mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-04 07:05:26 -04:00
improved FolderIterator class
This commit is contained in:
parent
3c976bb7ee
commit
3e48b0fd95
11 changed files with 183 additions and 62 deletions
|
@ -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 ;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue