libretroshare src now compilable.

nxsitems not tested yet
renamed retrodb src file to .cc regular librs naming convention
wrote deserialisation section of nxsitems, need to write print and clear rsitem base functions

git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-new_cache_system@5144 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
chrisparker126 2012-05-05 19:55:24 +00:00
parent db8d019b3f
commit 50a0ed0656
6 changed files with 705 additions and 133 deletions

View file

@ -280,21 +280,6 @@ bool CacheStore::getStoredCache(CacheData &data)
return ok;
}
bool CacheStore::cached(const std::string /*cacheId*/)
{
return false;
}
void CacheStore::updateCacheDocument(pugi::xml_document& /*cacheDoc*/)
{
return;
}
void CacheStore::updateCacheTable()
{
return;
}
bool CacheStore::locked_getStoredCache(CacheData &data)
{

View file

@ -27,7 +27,6 @@
#include "pqi/p3cfgmgr.h"
#include "pqi/pqimonitor.h"
#include "util/rsthreads.h"
#include "util/pugixml.h"
#include <list>
#include <map>
@ -316,33 +315,7 @@ class CacheStore
*/
bool locked_getStoredCache(CacheData &data);
//////////////// Cache Optimisation //////////////////
/**
*@param id the key for determing whether this data has been cached or not
*@return true if data referenced by key has been cached false otherwise
*/
bool cached(const std::string cacheId);
/**
* TODO: will be abstract
* The deriving class should return a document which accurately reflects its data
* structure
* @param cacheDoc document reflecting derving class's cache data structure
*/
virtual void updateCacheDocument(pugi::xml_document& cacheDoc);
//////////////// Cache Optimisation //////////////////
private:
/**
* This updates the cache table with information from the xml document
*
*/
void updateCacheTable();
uint16_t cacheType; /* for checking */
bool multiCache; /* do we care about subid's */
@ -355,14 +328,6 @@ class CacheStore
mutable RsMutex cMutex;
std::map<RsPeerId, CacheSet> caches;
////////////// cache optimisation ////////////////
/// whether to run in cache optimisation mode
bool cacheOptMode;
/// stores whether given instance of cache data has been loaded already or not
std::map<std::string, bool> cacheTable;
};