comparison data/fileio/CachedFile.h @ 481:a82645e788fc

* Auto-select RDF datastore/parsing backend; use trees datastore if available * Make CachedFile remember whether a file has already been successfully located locally (avoiding system call out to look at filesystem)
author Chris Cannam
date Fri, 14 Nov 2008 10:10:05 +0000
parents 70b333085952
children e340b2fb9471
comparison
equal deleted inserted replaced
480:3ffce691c9bf 481:a82645e788fc
17 #define _CACHED_FILE_H_ 17 #define _CACHED_FILE_H_
18 18
19 #include <QString> 19 #include <QString>
20 #include <QUrl> 20 #include <QUrl>
21 #include <QDateTime> 21 #include <QDateTime>
22 #include <map>
22 23
23 class ProgressReporter; 24 class ProgressReporter;
24 25
25 class CachedFile 26 class CachedFile
26 { 27 {
46 QDateTime getLastRetrieval(); 47 QDateTime getLastRetrieval();
47 void updateLastRetrieval(bool successful); 48 void updateLastRetrieval(bool successful);
48 49
49 static QString getCacheDirectory(); 50 static QString getCacheDirectory();
50 static QString getLocalFilenameFor(QUrl url); 51 static QString getLocalFilenameFor(QUrl url);
52
53 typedef std::map<QString, QString> OriginLocalFilenameMap;
54 static OriginLocalFilenameMap m_knownGoodCaches;
51 }; 55 };
52 56
53 #endif 57 #endif