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