diff data/model/WaveFileModel.h @ 316:3a6725f285d6

* Make RemoteFile far more pervasive, and use it for local files as well so that we can handle both transparently. Make it shallow copy with reference counting, so it can be used by value without having to worry about the cache file lifetime. Use RemoteFile for MainWindow file-open functions, etc
author Chris Cannam
date Thu, 18 Oct 2007 15:31:20 +0000
parents 5877d68815c7
children c324d410b096
line wrap: on
line diff
--- a/data/model/WaveFileModel.h	Thu Oct 18 10:24:26 2007 +0000
+++ b/data/model/WaveFileModel.h	Thu Oct 18 15:31:20 2007 +0000
@@ -20,6 +20,8 @@
 #include <QMutex>
 #include <QTimer>
 
+#include "data/fileio/RemoteFile.h"
+
 #include "RangeSummarisableTimeValueModel.h"
 #include "PowerOfSqrtTwoZoomConstraint.h"
 
@@ -32,9 +34,8 @@
     Q_OBJECT
 
 public:
-    WaveFileModel(QString path, size_t targetRate = 0);
-    WaveFileModel(QString path, QString originalLocation, size_t targetRate = 0);
-    WaveFileModel(QString originalLocation, AudioFileReader *reader);
+    WaveFileModel(RemoteFile source, size_t targetRate = 0);
+    WaveFileModel(RemoteFile source, AudioFileReader *reader);
     ~WaveFileModel();
 
     bool isOK() const;
@@ -102,7 +103,8 @@
     };
          
     void fillCache();
-    
+
+    RemoteFile m_source;
     QString m_path;
     AudioFileReader *m_reader;
     bool m_myReader;