mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-25 23:49:35 -05:00
Changed the reference pointer from last commit to const.
Need recompile again, sorry. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3510 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
ed737e2c9f
commit
fff12a58c6
@ -801,13 +801,13 @@ void FileIndexMonitor::updateShareFlags(const SharedDirInfo& dir)
|
|||||||
cb->notifyListChange(NOTIFY_LIST_DIRLIST_LOCAL, 0);
|
cb->notifyListChange(NOTIFY_LIST_DIRLIST_LOCAL, 0);
|
||||||
}
|
}
|
||||||
/* interface */
|
/* interface */
|
||||||
void FileIndexMonitor::setSharedDirectories(std::list<SharedDirInfo>& dirs)
|
void FileIndexMonitor::setSharedDirectories(const std::list<SharedDirInfo>& dirs)
|
||||||
{
|
{
|
||||||
cb->notifyListPreChange(NOTIFY_LIST_DIRLIST_LOCAL, 0);
|
cb->notifyListPreChange(NOTIFY_LIST_DIRLIST_LOCAL, 0);
|
||||||
|
|
||||||
std::list<SharedDirInfo> checkeddirs;
|
std::list<SharedDirInfo> checkeddirs;
|
||||||
|
|
||||||
std::list<SharedDirInfo>::iterator it;
|
std::list<SharedDirInfo>::const_iterator it;
|
||||||
#ifdef FIM_DEBUG
|
#ifdef FIM_DEBUG
|
||||||
std::cerr << "FileIndexMonitor::setSharedDirectories() :\n";
|
std::cerr << "FileIndexMonitor::setSharedDirectories() :\n";
|
||||||
#endif
|
#endif
|
||||||
|
@ -109,7 +109,7 @@ class FileIndexMonitor: public CacheSource, public RsThread
|
|||||||
int RequestDirDetails(std::string uid, std::string path, DirDetails &details) const ;
|
int RequestDirDetails(std::string uid, std::string path, DirDetails &details) const ;
|
||||||
|
|
||||||
// set/update shared directories
|
// set/update shared directories
|
||||||
virtual void setSharedDirectories(std::list<SharedDirInfo>& dirs);
|
virtual void setSharedDirectories(const std::list<SharedDirInfo>& dirs);
|
||||||
void getSharedDirectories(std::list<SharedDirInfo>& dirs);
|
void getSharedDirectories(std::list<SharedDirInfo>& dirs);
|
||||||
void updateShareFlags(const SharedDirInfo& info) ;
|
void updateShareFlags(const SharedDirInfo& info) ;
|
||||||
|
|
||||||
|
@ -529,7 +529,7 @@ FileIndex::~FileIndex()
|
|||||||
delete root;
|
delete root;
|
||||||
}
|
}
|
||||||
|
|
||||||
int FileIndex::setRootDirectories(std::list<std::string> &inlist, time_t updtime)
|
int FileIndex::setRootDirectories(const std::list<std::string> &inlist, time_t updtime)
|
||||||
{
|
{
|
||||||
/* set update time to zero */
|
/* set update time to zero */
|
||||||
std::map<std::string, DirEntry *>::iterator it;
|
std::map<std::string, DirEntry *>::iterator it;
|
||||||
@ -538,7 +538,7 @@ int FileIndex::setRootDirectories(std::list<std::string> &inlist, time_t updtime
|
|||||||
(it->second)->updtime = 0;
|
(it->second)->updtime = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::list<std::string>::iterator ait;
|
std::list<std::string>::const_iterator ait;
|
||||||
FileEntry fe;
|
FileEntry fe;
|
||||||
time_t utime = 1;
|
time_t utime = 1;
|
||||||
for(ait = inlist.begin(); ait != inlist.end(); ait++)
|
for(ait = inlist.begin(); ait != inlist.end(); ait++)
|
||||||
|
@ -204,7 +204,7 @@ class FileIndex
|
|||||||
~FileIndex();
|
~FileIndex();
|
||||||
|
|
||||||
/* control root entries */
|
/* control root entries */
|
||||||
int setRootDirectories(std::list<std::string> &inlist, time_t utime);
|
int setRootDirectories(const std::list<std::string> &inlist, time_t utime);
|
||||||
int getRootDirectories(std::list<std::string> &outlist);
|
int getRootDirectories(std::list<std::string> &outlist);
|
||||||
|
|
||||||
/* update (index building) */
|
/* update (index building) */
|
||||||
|
@ -254,7 +254,7 @@ void ftFiMonitor::updateShareFlags(const SharedDirInfo& info)
|
|||||||
IndicateConfigChanged();
|
IndicateConfigChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ftFiMonitor::setSharedDirectories(std::list<SharedDirInfo>& dirList)
|
void ftFiMonitor::setSharedDirectories(const std::list<SharedDirInfo>& dirList)
|
||||||
{
|
{
|
||||||
FileIndexMonitor::setSharedDirectories(dirList);
|
FileIndexMonitor::setSharedDirectories(dirList);
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ class ftFiMonitor: public FileIndexMonitor, public ftSearch, public p3Config
|
|||||||
virtual bool search(std::string hash, uint32_t hintflags, FileInfo &info) const;
|
virtual bool search(std::string hash, uint32_t hintflags, FileInfo &info) const;
|
||||||
|
|
||||||
/* overloaded set dirs enables config indication */
|
/* overloaded set dirs enables config indication */
|
||||||
virtual void setSharedDirectories(std::list<SharedDirInfo>& dirList);
|
virtual void setSharedDirectories(const std::list<SharedDirInfo>& dirList);
|
||||||
virtual void updateShareFlags(const SharedDirInfo& info) ;
|
virtual void updateShareFlags(const SharedDirInfo& info) ;
|
||||||
|
|
||||||
/***
|
/***
|
||||||
|
@ -578,7 +578,7 @@ bool ftServer::setSharedDirectories(std::list<SharedDirInfo> &dirs)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ftServer::addSharedDirectory(SharedDirInfo& dir)
|
bool ftServer::addSharedDirectory(const SharedDirInfo& dir)
|
||||||
{
|
{
|
||||||
std::list<SharedDirInfo> dirList;
|
std::list<SharedDirInfo> dirList;
|
||||||
mFiMon->getSharedDirectories(dirList);
|
mFiMon->getSharedDirectories(dirList);
|
||||||
|
@ -191,7 +191,7 @@ virtual std::string getPartialsDirectory();
|
|||||||
|
|
||||||
virtual bool getSharedDirectories(std::list<SharedDirInfo> &dirs);
|
virtual bool getSharedDirectories(std::list<SharedDirInfo> &dirs);
|
||||||
virtual bool setSharedDirectories(std::list<SharedDirInfo> &dirs);
|
virtual bool setSharedDirectories(std::list<SharedDirInfo> &dirs);
|
||||||
virtual bool addSharedDirectory(SharedDirInfo& dir);
|
virtual bool addSharedDirectory(const SharedDirInfo& dir);
|
||||||
virtual bool updateShareFlags(const SharedDirInfo& dir); // updates the flags. The directory should already exist !
|
virtual bool updateShareFlags(const SharedDirInfo& dir); // updates the flags. The directory should already exist !
|
||||||
virtual bool removeSharedDirectory(std::string dir);
|
virtual bool removeSharedDirectory(std::string dir);
|
||||||
|
|
||||||
|
@ -185,7 +185,7 @@ class RsFiles
|
|||||||
virtual std::string getPartialsDirectory() = 0;
|
virtual std::string getPartialsDirectory() = 0;
|
||||||
|
|
||||||
virtual bool getSharedDirectories(std::list<SharedDirInfo> &dirs) = 0;
|
virtual bool getSharedDirectories(std::list<SharedDirInfo> &dirs) = 0;
|
||||||
virtual bool addSharedDirectory(SharedDirInfo& dir) = 0;
|
virtual bool addSharedDirectory(const SharedDirInfo& dir) = 0;
|
||||||
virtual bool updateShareFlags(const SharedDirInfo& dir) = 0; // updates the flags. The directory should already exist !
|
virtual bool updateShareFlags(const SharedDirInfo& dir) = 0; // updates the flags. The directory should already exist !
|
||||||
virtual bool removeSharedDirectory(std::string dir) = 0;
|
virtual bool removeSharedDirectory(std::string dir) = 0;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user