20 #ifndef __ardour_filesource_h__
21 #define __ardour_filesource_h__
35 : path (p), type (t) {}
38 virtual const char *
what()
const throw() {
return "source file does not exist"; }
49 const std::string&
path()
const {
return _path; }
51 virtual bool safe_file_extension (
const std::string& path)
const = 0;
53 int move_to_trash (
const std::string& trash_dir_name);
54 void mark_take (
const std::string&
id);
55 void mark_immutable ();
56 void mark_immutable_except_write();
57 void mark_nonremovable ();
59 const std::string&
take_id ()
const {
return _take_id; }
61 uint16_t
channel()
const {
return _channel; }
63 int set_state (
const XMLNode&,
int version);
65 int set_source_name (
const std::string& newname,
bool destructive);
68 bool must_exist,
bool& is_new, uint16_t& chan,
69 std::string& found_path);
72 bool must_exist,
bool& is_new, uint16_t& chan,
73 std::string& found_path);
75 void inc_use_count ();
76 bool removable ()
const;
77 bool is_stub ()
const;
79 const std::string&
origin()
const {
return _origin; }
81 virtual void set_path (
const std::string&);
85 void existence_check ();
86 virtual void prevent_deletion ();
90 int rename (
const std::string&
name);
92 virtual void close () = 0;
96 const std::string& path,
102 virtual int init (
const std::string& idstr,
bool must_exist);
105 void set_within_session_from_path (
const std::string&);
static PBD::Signal2< int, std::string, std::vector< std::string > > AmbiguousFileName
virtual const char * what() const
const std::string & take_id() const
bool within_session() const
const std::string & origin() const
virtual int move_dependents_to_trash()
MissingSource(const std::string &p, DataType t)
const std::string & path() const
LIBARDOUR_API bool init(bool with_vst, bool try_optimization, const char *localedir)