10 #ifndef PERSISTENT_CACHE_H
11 #define PERSISTENT_CACHE_H
13 #include <vrecko/Export>
83 void setEnable(
bool bNewEnableCache);
108 inline bool openCacheFileForReading(
const char *dataName,
const char *relatedFileName,
unsigned long version,
110 {
return internalOpenReadWrite(dataName, relatedFileName, version, cacheData, bfile, NULL, ulWaitTimeout); }
120 inline bool openCacheFileForWriting(
const char *dataName,
const char *relatedFileName,
unsigned long version,
122 {
return internalOpenReadWrite(dataName, relatedFileName, version, cacheData, NULL, bfile, ulWaitTimeout); }
150 void translateName(
char *outTranslatedName,
const char *inDataName,
const char *inRelatedFileName);
170 int internalFindAndLock(
const char *originalFileName,
const char *translatedFileName,
unsigned long version,
171 const char* desiredExtension,
bool bReading,
unsigned long ulWaitTimeout);
173 bool internalOpenReadWrite(
const char *dataName,
const char *relatedFileName,
unsigned long version,
181 void internalDecrementReaderWriter(
OpenedCacheFile* cacheData,
bool bReading);
186 bool testVersionIsAtLeast(
const char *fileName,
int minVersion);