X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fardour%2Ffile_source.h;h=00fb74b426114370723a717526744c9ea78f0451;hb=49159e9585b660c87e985f427563cabc23473971;hp=e0db1d25b765ebfcb789e5c87d1f968fa77d65c8;hpb=fc691cb3ba6c1a49b1b71f1169097bee0292f3cc;p=ardour.git diff --git a/libs/ardour/ardour/file_source.h b/libs/ardour/ardour/file_source.h index e0db1d25b7..00fb74b426 100644 --- a/libs/ardour/ardour/file_source.h +++ b/libs/ardour/ardour/file_source.h @@ -44,9 +44,9 @@ class LIBARDOUR_API MissingSource : public std::exception /** A source associated with a file on disk somewhere */ class LIBARDOUR_API FileSource : virtual public Source { public: - virtual ~FileSource () {} + virtual ~FileSource (); - virtual const std::string& path() const { return _path; } + const std::string& path() const { return _path; } virtual bool safe_file_extension (const std::string& path) const = 0; @@ -79,12 +79,19 @@ public: const std::string& origin() const { return _origin; } virtual void set_path (const std::string&); - + static PBD::Signal2 > AmbiguousFileName; + void existence_check (); virtual void prevent_deletion (); -protected: + /** Rename the file on disk referenced by this source to \param newname + */ + int rename (const std::string& name); + + virtual void close () = 0; + + protected: FileSource (Session& session, DataType type, const std::string& path, const std::string& origin, @@ -103,8 +110,6 @@ protected: uint16_t _channel; bool _within_session; std::string _origin; - bool _open; - }; } // namespace ARDOUR