summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/file_source.h
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2010-11-09 06:03:51 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2010-11-09 06:03:51 +0000
commit5c6ba165f684fbd45be33c83d41083567d4dd88f (patch)
treeb3108d53b3a82fb1ea522038fe4500e0c38349bb /libs/ardour/ardour/file_source.h
parentd29f14bf33bc807be7b95015e4f011f4ad741cc6 (diff)
initial pass at a missing file dialog and "relocatable" source files. lots more to do here
git-svn-id: svn://localhost/ardour2/branches/3.0@7983 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/file_source.h')
-rw-r--r--libs/ardour/ardour/file_source.h28
1 files changed, 20 insertions, 8 deletions
diff --git a/libs/ardour/ardour/file_source.h b/libs/ardour/ardour/file_source.h
index aa4fe973b1..78210916f0 100644
--- a/libs/ardour/ardour/file_source.h
+++ b/libs/ardour/ardour/file_source.h
@@ -20,15 +20,25 @@
#ifndef __ardour_filesource_h__
#define __ardour_filesource_h__
+#include <list>
+#include <string>
#include <exception>
#include <time.h>
#include "ardour/source.h"
namespace ARDOUR {
-class MissingSource : public std::exception {
-public:
+class MissingSource : public std::exception
+{
+ public:
+ MissingSource (const std::string& p, DataType t) throw ()
+ : path (p), type (t) {}
+ ~MissingSource() throw() {}
+
virtual const char *what() const throw() { return "source file does not exist"; }
+
+ std::string path;
+ DataType type;
};
/** A source associated with a file on disk somewhere */
@@ -54,15 +64,19 @@ public:
int set_source_name (const std::string& newname, bool destructive);
- static void set_search_path (DataType type, const std::string& path);
+ static bool find (Session&, DataType type, const std::string& path,
+ bool must_exist, bool& is_new, uint16_t& chan,
+ std::string& found_path);
- static bool find (DataType type, const std::string& path,
- bool must_exist, bool& is_new, uint16_t& chan,
- std::string& found_path);
+ static bool find_2X (Session&, DataType type, const std::string& path,
+ bool must_exist, bool& is_new, uint16_t& chan,
+ std::string& found_path);
void inc_use_count ();
bool removable () const;
+ static PBD::Signal3<int,std::string,std::string,std::vector<std::string> > AmbiguousFileName;
+
protected:
FileSource (Session& session, DataType type,
const std::string& path,
@@ -81,8 +95,6 @@ protected:
bool _file_is_new;
uint16_t _channel;
bool _within_session;
-
- static std::map<DataType, std::string> search_paths;
};
} // namespace ARDOUR