comparison data/fileio/FileFinder.h @ 210:a06afefe45ee

* Cancel when downloading file * Handle status codes (404 etc) * Add RemoteFile::isAvailable * Start on FileFinder for looking up files referred to in distant sessions
author Chris Cannam
date Wed, 10 Jan 2007 17:26:39 +0000
parents
children e2bbb58e6df6
comparison
equal deleted inserted replaced
209:6576a208e8e7 210:a06afefe45ee
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
2
3 /*
4 Sonic Visualiser
5 An audio file viewer and annotation editor.
6 Centre for Digital Music, Queen Mary, University of London.
7 This file copyright 2007 QMUL.
8
9 This program is free software; you can redistribute it and/or
10 modify it under the terms of the GNU General Public License as
11 published by the Free Software Foundation; either version 2 of the
12 License, or (at your option) any later version. See the file
13 COPYING included with this distribution for more information.
14 */
15
16 #ifndef _FILE_FINDER_H_
17 #define _FILE_FINDER_H_
18
19 #include <QString>
20
21 class FileFinder
22 {
23 public:
24 /**
25 * Find a file.
26 *
27 * "location" is what we know about where the file is supposed to
28 * be: it may be a relative path, an absolute path, a URL, or just
29 * a filename.
30 *
31 * "lastKnownLocation", if provided, is a path or URL of something
32 * that can be used as a reference point to locate it -- for
33 * example, the location of the session file that is referring to
34 * the file we're looking for.
35 */
36 FileFinder(QString location, QString lastKnownLocation = "");
37 virtual ~FileFinder();
38
39 QString getLocation();
40
41 protected:
42 QString m_location;
43 QString m_lastKnownLocation;
44 QString m_lastLocatedLocation;
45 };
46
47 #endif
48