diff --git a/libretroshare/src/dbase/cachestrapper.cc b/libretroshare/src/dbase/cachestrapper.cc index baf6f7451..e5aec4e46 100644 --- a/libretroshare/src/dbase/cachestrapper.cc +++ b/libretroshare/src/dbase/cachestrapper.cc @@ -83,7 +83,7 @@ void CacheSource::unlockData() } /* to be overloaded for inherited Classes */ -bool CacheSource::loadCache(const CacheData &data) +bool CacheSource::loadLocalCache(const CacheData &data) { return refreshCache(data); } @@ -450,6 +450,8 @@ void CacheStore::locked_storeCacheEntry(const CacheData &data) CacheStrapper::CacheStrapper(RsPeerId id, time_t period) :ownId(id), queryPeriod(period) { + /* add OwnId */ + addPeerId(ownId); return; } @@ -460,8 +462,9 @@ void CacheStrapper::addCachePair(CachePair set) } - /* from pqimonclient */ -void CacheStrapper::monUpdate(const std::list &plist) + /**************** from pqimonclient ********************/ + +void CacheStrapper::statusChange(const std::list &plist) { std::list::const_iterator it; std::map::iterator mit; @@ -474,6 +477,8 @@ void CacheStrapper::monUpdate(const std::list &plist) } } + /**************** from pqimonclient ********************/ + void CacheStrapper::addPeerId(RsPeerId pid) { diff --git a/libretroshare/src/dbase/cachestrapper.h b/libretroshare/src/dbase/cachestrapper.h index 55e844dc3..8ef9856a7 100644 --- a/libretroshare/src/dbase/cachestrapper.h +++ b/libretroshare/src/dbase/cachestrapper.h @@ -146,7 +146,7 @@ virtual bool cachesAvailable(RsPeerId pid, std::map &ids); * configuration file.... * to be overloaded by inherited class */ -virtual bool loadCache(const CacheData &data); +virtual bool loadLocalCache(const CacheData &data); /* control Caches available */ bool refreshCache(const CacheData &data); @@ -271,16 +271,17 @@ class CacheTS time_t answer; }; -#include "pqi/pqimon.h" +#include "pqi/pqimonitor.h" -class CacheStrapper: public pqimonclient +class CacheStrapper: public pqiMonitor { public: CacheStrapper(RsPeerId id, time_t period); virtual ~CacheStrapper() { return; } - /* from pqimonclient */ -virtual void monUpdate(const std::list &plist); + /************* from pqiMonitor *******************/ +virtual void statusChange(const std::list &plist); + /************* from pqiMonitor *******************/ void addCachePair(CachePair pair); diff --git a/libretroshare/src/dbase/fimonitor.cc b/libretroshare/src/dbase/fimonitor.cc index 2d83d6f25..8e687247d 100644 --- a/libretroshare/src/dbase/fimonitor.cc +++ b/libretroshare/src/dbase/fimonitor.cc @@ -99,7 +99,7 @@ bool FileIndexMonitor::findLocalFile(std::string hash, } -bool FileIndexMonitor::loadCache(const CacheData &data) /* called with stored data */ +bool FileIndexMonitor::loadLocalCache(const CacheData &data) /* called with stored data */ { bool ok = false; diff --git a/libretroshare/src/dbase/fimonitor.h b/libretroshare/src/dbase/fimonitor.h index 2a5c36574..34f2c440b 100644 --- a/libretroshare/src/dbase/fimonitor.h +++ b/libretroshare/src/dbase/fimonitor.h @@ -77,7 +77,7 @@ bool findLocalFile(std::string hash, std::string &fullpath, uint64_t &size); /* Interacting with CacheSource */ /* overloaded from CacheSource */ -virtual bool loadCache(const CacheData &data); /* called with stored data */ +virtual bool loadLocalCache(const CacheData &data); /* called with stored data */ bool updateCache(const CacheData &data); /* we call when we have a new cache for others */