changeset 198:24ac2e4010c5

* RemoteFile -> FileSource now it's used all over the place for local files as well.
author Chris Cannam
date Thu, 18 Oct 2007 16:20:26 +0000
parents c08c312b2399
children 6e1d4d500092
files document/SVFileReader.cpp main/MainWindow.cpp main/MainWindow.h
diffstat 3 files changed, 17 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/document/SVFileReader.cpp	Thu Oct 18 15:31:20 2007 +0000
+++ b/document/SVFileReader.cpp	Thu Oct 18 16:20:26 2007 +0000
@@ -22,7 +22,7 @@
 
 #include "data/fileio/AudioFileReaderFactory.h"
 #include "data/fileio/FileFinder.h"
-#include "data/fileio/RemoteFile.h"
+#include "data/fileio/FileSource.h"
 
 #include "data/model/WaveFileModel.h"
 #include "data/model/EditableDenseThreeDimensionalModel.h"
@@ -413,7 +413,7 @@
         QString path = ff->find(FileFinder::AudioFile,
                                 originalPath, m_location);
 
-        RemoteFile file(path);
+        FileSource file(path);
         file.waitForStatus();
 
         if (!file.isOK()) {
--- a/main/MainWindow.cpp	Thu Oct 18 15:31:20 2007 +0000
+++ b/main/MainWindow.cpp	Thu Oct 18 16:20:26 2007 +0000
@@ -57,7 +57,7 @@
 #include "data/fileio/CSVFileWriter.h"
 #include "data/fileio/MIDIFileWriter.h"
 #include "data/fileio/BZipFileDevice.h"
-#include "data/fileio/RemoteFile.h"
+#include "data/fileio/FileSource.h"
 #include "data/fft/FFTDataServer.h"
 #include "base/RecentFiles.h"
 #include "transform/TransformFactory.h"
@@ -2860,11 +2860,11 @@
 MainWindow::FileOpenStatus
 MainWindow::open(QString fileOrUrl, AudioFileOpenMode mode)
 {
-    return open(RemoteFile(fileOrUrl), mode);
+    return open(FileSource(fileOrUrl), mode);
 }
 
 MainWindow::FileOpenStatus
-MainWindow::open(RemoteFile source, AudioFileOpenMode mode)
+MainWindow::open(FileSource source, AudioFileOpenMode mode)
 {
     FileOpenStatus status;
 
@@ -2893,7 +2893,7 @@
 }
 
 MainWindow::FileOpenStatus
-MainWindow::openAudio(RemoteFile source, AudioFileOpenMode mode)
+MainWindow::openAudio(FileSource source, AudioFileOpenMode mode)
 {
     std::cerr << "MainWindow::openAudio(" << source.getLocation().toStdString() << ")" << std::endl;
 
@@ -3081,7 +3081,7 @@
 }
 
 MainWindow::FileOpenStatus
-MainWindow::openPlaylist(RemoteFile source, AudioFileOpenMode mode)
+MainWindow::openPlaylist(FileSource source, AudioFileOpenMode mode)
 {
     std::set<QString> extensions;
     PlaylistFileReader::getSupportedExtensions(extensions);
@@ -3118,7 +3118,7 @@
 }
 
 MainWindow::FileOpenStatus
-MainWindow::openLayer(RemoteFile source)
+MainWindow::openLayer(FileSource source)
 {
     Pane *pane = m_paneStack->getCurrentPane();
     
@@ -3208,7 +3208,7 @@
 }
 
 MainWindow::FileOpenStatus
-MainWindow::openImage(RemoteFile source)
+MainWindow::openImage(FileSource source)
 {
     Pane *pane = m_paneStack->getCurrentPane();
     
@@ -3259,7 +3259,7 @@
 }
 
 MainWindow::FileOpenStatus
-MainWindow::openSession(RemoteFile source)
+MainWindow::openSession(FileSource source)
 {
     if (!source.isAvailable()) return FileOpenFailed;
     if (source.getExtension() != "sv") return FileOpenFailed;
--- a/main/MainWindow.h	Thu Oct 18 15:31:20 2007 +0000
+++ b/main/MainWindow.h	Thu Oct 18 16:20:26 2007 +0000
@@ -30,7 +30,7 @@
 #include "transform/Transform.h"
 #include "document/SVFileReader.h"
 #include "data/fileio/FileFinder.h"
-#include "data/fileio/RemoteFile.h"
+#include "data/fileio/FileSource.h"
 #include <map>
 
 class Document;
@@ -82,13 +82,13 @@
     };
 
     FileOpenStatus open(QString fileOrUrl, AudioFileOpenMode = AskUser);
-    FileOpenStatus open(RemoteFile source, AudioFileOpenMode = AskUser);
+    FileOpenStatus open(FileSource source, AudioFileOpenMode = AskUser);
 
-    FileOpenStatus openAudio(RemoteFile source, AudioFileOpenMode = AskUser);
-    FileOpenStatus openPlaylist(RemoteFile source, AudioFileOpenMode = AskUser);
-    FileOpenStatus openLayer(RemoteFile source);
-    FileOpenStatus openImage(RemoteFile source);
-    FileOpenStatus openSession(RemoteFile source);
+    FileOpenStatus openAudio(FileSource source, AudioFileOpenMode = AskUser);
+    FileOpenStatus openPlaylist(FileSource source, AudioFileOpenMode = AskUser);
+    FileOpenStatus openLayer(FileSource source);
+    FileOpenStatus openImage(FileSource source);
+    FileOpenStatus openSession(FileSource source);
 
     bool saveSessionFile(QString path);
     bool commitData(bool mayAskUser); // on session shutdown