comparison data/fileio/CachedFile.h @ 467:c9b055f84326

* make use of CachedFile (untested)
author Chris Cannam
date Mon, 27 Oct 2008 18:15:20 +0000
parents f35bfa88f0b5
children 70b333085952
comparison
equal deleted inserted replaced
466:f35bfa88f0b5 467:c9b055f84326
23 class ProgressReporter; 23 class ProgressReporter;
24 24
25 class CachedFile 25 class CachedFile
26 { 26 {
27 public: 27 public:
28 CachedFile(QString fileOrUrl, ProgressReporter *reporter = 0);
28 CachedFile(QUrl url, ProgressReporter *reporter = 0); 29 CachedFile(QUrl url, ProgressReporter *reporter = 0);
29 30
30 virtual ~CachedFile(); 31 virtual ~CachedFile();
31 32
32 bool isOK() const; 33 bool isOK() const;
37 QUrl m_url; 38 QUrl m_url;
38 QString m_localFilename; 39 QString m_localFilename;
39 ProgressReporter *m_reporter; 40 ProgressReporter *m_reporter;
40 bool m_ok; 41 bool m_ok;
41 42
42 void refresh(); 43 void check();
43 bool retrieve(); 44 bool retrieve();
44 45
45 QDateTime getLastRetrieval(); 46 QDateTime getLastRetrieval();
46 void updateLastRetrieval(bool successful); 47 void updateLastRetrieval(bool successful);
47 48