From fff12a58c6c4ef275f17ab3fbe20b538d4cd8ec5 Mon Sep 17 00:00:00 2001 From: thunder2 Date: Fri, 17 Sep 2010 19:21:14 +0000 Subject: [PATCH] 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 --- libretroshare/src/dbase/fimonitor.cc | 4 ++-- libretroshare/src/dbase/fimonitor.h | 2 +- libretroshare/src/dbase/findex.cc | 4 ++-- libretroshare/src/dbase/findex.h | 2 +- libretroshare/src/ft/ftdbase.cc | 2 +- libretroshare/src/ft/ftdbase.h | 2 +- libretroshare/src/ft/ftserver.cc | 2 +- libretroshare/src/ft/ftserver.h | 2 +- libretroshare/src/retroshare/rsfiles.h | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/libretroshare/src/dbase/fimonitor.cc b/libretroshare/src/dbase/fimonitor.cc index 716f885a3..e85dd65d2 100644 --- a/libretroshare/src/dbase/fimonitor.cc +++ b/libretroshare/src/dbase/fimonitor.cc @@ -801,13 +801,13 @@ void FileIndexMonitor::updateShareFlags(const SharedDirInfo& dir) cb->notifyListChange(NOTIFY_LIST_DIRLIST_LOCAL, 0); } /* interface */ -void FileIndexMonitor::setSharedDirectories(std::list& dirs) +void FileIndexMonitor::setSharedDirectories(const std::list& dirs) { cb->notifyListPreChange(NOTIFY_LIST_DIRLIST_LOCAL, 0); std::list checkeddirs; - std::list::iterator it; + std::list::const_iterator it; #ifdef FIM_DEBUG std::cerr << "FileIndexMonitor::setSharedDirectories() :\n"; #endif diff --git a/libretroshare/src/dbase/fimonitor.h b/libretroshare/src/dbase/fimonitor.h index e94e3cae4..7f9fbac12 100644 --- a/libretroshare/src/dbase/fimonitor.h +++ b/libretroshare/src/dbase/fimonitor.h @@ -109,7 +109,7 @@ class FileIndexMonitor: public CacheSource, public RsThread int RequestDirDetails(std::string uid, std::string path, DirDetails &details) const ; // set/update shared directories - virtual void setSharedDirectories(std::list& dirs); + virtual void setSharedDirectories(const std::list& dirs); void getSharedDirectories(std::list& dirs); void updateShareFlags(const SharedDirInfo& info) ; diff --git a/libretroshare/src/dbase/findex.cc b/libretroshare/src/dbase/findex.cc index 845580288..2082b174f 100644 --- a/libretroshare/src/dbase/findex.cc +++ b/libretroshare/src/dbase/findex.cc @@ -529,7 +529,7 @@ FileIndex::~FileIndex() delete root; } -int FileIndex::setRootDirectories(std::list &inlist, time_t updtime) +int FileIndex::setRootDirectories(const std::list &inlist, time_t updtime) { /* set update time to zero */ std::map::iterator it; @@ -538,7 +538,7 @@ int FileIndex::setRootDirectories(std::list &inlist, time_t updtime (it->second)->updtime = 0; } - std::list::iterator ait; + std::list::const_iterator ait; FileEntry fe; time_t utime = 1; for(ait = inlist.begin(); ait != inlist.end(); ait++) diff --git a/libretroshare/src/dbase/findex.h b/libretroshare/src/dbase/findex.h index 00392f54a..462202404 100644 --- a/libretroshare/src/dbase/findex.h +++ b/libretroshare/src/dbase/findex.h @@ -204,7 +204,7 @@ class FileIndex ~FileIndex(); /* control root entries */ - int setRootDirectories(std::list &inlist, time_t utime); + int setRootDirectories(const std::list &inlist, time_t utime); int getRootDirectories(std::list &outlist); /* update (index building) */ diff --git a/libretroshare/src/ft/ftdbase.cc b/libretroshare/src/ft/ftdbase.cc index 20132f378..34bc80485 100644 --- a/libretroshare/src/ft/ftdbase.cc +++ b/libretroshare/src/ft/ftdbase.cc @@ -254,7 +254,7 @@ void ftFiMonitor::updateShareFlags(const SharedDirInfo& info) IndicateConfigChanged(); } -void ftFiMonitor::setSharedDirectories(std::list& dirList) +void ftFiMonitor::setSharedDirectories(const std::list& dirList) { FileIndexMonitor::setSharedDirectories(dirList); diff --git a/libretroshare/src/ft/ftdbase.h b/libretroshare/src/ft/ftdbase.h index 1e4d82be3..251f3431a 100644 --- a/libretroshare/src/ft/ftdbase.h +++ b/libretroshare/src/ft/ftdbase.h @@ -63,7 +63,7 @@ class ftFiMonitor: public FileIndexMonitor, public ftSearch, public p3Config virtual bool search(std::string hash, uint32_t hintflags, FileInfo &info) const; /* overloaded set dirs enables config indication */ - virtual void setSharedDirectories(std::list& dirList); + virtual void setSharedDirectories(const std::list& dirList); virtual void updateShareFlags(const SharedDirInfo& info) ; /*** diff --git a/libretroshare/src/ft/ftserver.cc b/libretroshare/src/ft/ftserver.cc index 79b96735f..bd323f6da 100644 --- a/libretroshare/src/ft/ftserver.cc +++ b/libretroshare/src/ft/ftserver.cc @@ -578,7 +578,7 @@ bool ftServer::setSharedDirectories(std::list &dirs) return true; } -bool ftServer::addSharedDirectory(SharedDirInfo& dir) +bool ftServer::addSharedDirectory(const SharedDirInfo& dir) { std::list dirList; mFiMon->getSharedDirectories(dirList); diff --git a/libretroshare/src/ft/ftserver.h b/libretroshare/src/ft/ftserver.h index 0b4544f21..f4b0c6e6d 100644 --- a/libretroshare/src/ft/ftserver.h +++ b/libretroshare/src/ft/ftserver.h @@ -191,7 +191,7 @@ virtual std::string getPartialsDirectory(); virtual bool getSharedDirectories(std::list &dirs); virtual bool setSharedDirectories(std::list &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 removeSharedDirectory(std::string dir); diff --git a/libretroshare/src/retroshare/rsfiles.h b/libretroshare/src/retroshare/rsfiles.h index 91a2e813a..ba3b6f141 100644 --- a/libretroshare/src/retroshare/rsfiles.h +++ b/libretroshare/src/retroshare/rsfiles.h @@ -185,7 +185,7 @@ class RsFiles virtual std::string getPartialsDirectory() = 0; virtual bool getSharedDirectories(std::list &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 removeSharedDirectory(std::string dir) = 0;