# HG changeset patch # User Chris Cannam # Date 1192724426 0 # Node ID 24ac2e4010c53978edaf9fe9437bb6921ba7870d # Parent c08c312b23995ff52b3e147e7ceb83e8984e3bdb * RemoteFile -> FileSource now it's used all over the place for local files as well. diff -r c08c312b2399 -r 24ac2e4010c5 document/SVFileReader.cpp --- 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()) { diff -r c08c312b2399 -r 24ac2e4010c5 main/MainWindow.cpp --- 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 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; diff -r c08c312b2399 -r 24ac2e4010c5 main/MainWindow.h --- 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 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