mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-04 07:05:26 -04:00
Added a display for file hashing activity using notifyQt class. This time it works nicely.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@938 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
c7adb4907c
commit
80a8b41d66
15 changed files with 61 additions and 63 deletions
|
@ -119,8 +119,8 @@ bool ftFiStore::search(std::string hash, uint64_t size, uint32_t hintflags, File
|
|||
}
|
||||
|
||||
|
||||
ftFiMonitor::ftFiMonitor(CacheStrapper *cs, std::string cachedir, std::string pid)
|
||||
:FileIndexMonitor(cs, cachedir, pid), p3Config(CONFIG_TYPE_FT_SHARED)
|
||||
ftFiMonitor::ftFiMonitor(CacheStrapper *cs,NotifyBase *cb_in, std::string cachedir, std::string pid)
|
||||
:FileIndexMonitor(cs,cb_in, cachedir, pid), p3Config(CONFIG_TYPE_FT_SHARED)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -54,13 +54,13 @@ virtual bool search(std::string hash, uint64_t size, uint32_t hintflags, FileInf
|
|||
class ftFiMonitor: public FileIndexMonitor, public ftSearch, public p3Config
|
||||
{
|
||||
public:
|
||||
ftFiMonitor(CacheStrapper *cs, std::string cachedir, std::string pid);
|
||||
ftFiMonitor(CacheStrapper *cs,NotifyBase *cb_in, std::string cachedir, std::string pid);
|
||||
|
||||
/* overloaded search function */
|
||||
virtual bool search(std::string hash, uint64_t size, uint32_t hintflags, FileInfo &info) const;
|
||||
virtual bool search(std::string hash, uint64_t size, uint32_t hintflags, FileInfo &info) const;
|
||||
|
||||
/* overloaded set dirs enables config indication */
|
||||
virtual void setSharedDirectories(std::list<std::string> dirList);
|
||||
virtual void setSharedDirectories(std::list<std::string> dirList);
|
||||
|
||||
/***
|
||||
* Configuration - store shared directories
|
||||
|
|
|
@ -30,6 +30,7 @@ const int ftserverzone = 29539;
|
|||
#include "ft/ftextralist.h"
|
||||
#include "ft/ftfilesearch.h"
|
||||
#include "ft/ftcontroller.h"
|
||||
#include "ft/ftfileprovider.h"
|
||||
#include "ft/ftdatamultiplex.h"
|
||||
|
||||
|
||||
|
@ -125,7 +126,7 @@ void ftServer::SetupFtServer(NotifyBase *cb)
|
|||
|
||||
/* Make Cache Source/Store */
|
||||
mFiStore = new ftFiStore(mCacheStrapper, mFtController, cb, ownId, remotecachedir);
|
||||
mFiMon = new ftFiMonitor(mCacheStrapper, localcachedir, ownId);
|
||||
mFiMon = new ftFiMonitor(mCacheStrapper,cb, localcachedir, ownId);
|
||||
|
||||
/* now add the set to the cachestrapper */
|
||||
CachePair cp(mFiMon, mFiStore, CacheId(RS_SERVICE_TYPE_FILE_INDEX, 0));
|
||||
|
@ -424,10 +425,6 @@ bool ftServer::InDirectoryCheck()
|
|||
{
|
||||
return mFiMon->inDirectoryCheck();
|
||||
}
|
||||
void ftServer::setFileHashingCallback( void (*cb)(const std::string&) )
|
||||
{
|
||||
mFiMon->setFileHashingCallback( cb ) ;
|
||||
}
|
||||
|
||||
bool ftServer::getSharedDirectories(std::list<std::string> &dirs)
|
||||
{
|
||||
|
|
|
@ -149,7 +149,6 @@ virtual int SearchBoolExp(Expression * exp, std::list<FileDetail> &results);
|
|||
virtual bool ConvertSharedFilePath(std::string path, std::string &fullpath);
|
||||
virtual void ForceDirectoryCheck();
|
||||
virtual bool InDirectoryCheck();
|
||||
virtual void setFileHashingCallback( void(*cb)(const std::string&));
|
||||
|
||||
/***
|
||||
* Directory Handling
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue