X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fardour%2Ffile_source.h;h=ac073d934ccc4dd38b0652bae43fb793bb55613a;hb=0582221;hp=291b3a3d7617b4051d84bb93d1ee3f14e9c87f06;hpb=31fe3a5d5a3446cb315e45f7a754d30abbd28332;p=ardour.git diff --git a/libs/ardour/ardour/file_source.h b/libs/ardour/ardour/file_source.h index 291b3a3d76..ac073d934c 100644 --- a/libs/ardour/ardour/file_source.h +++ b/libs/ardour/ardour/file_source.h @@ -28,7 +28,7 @@ namespace ARDOUR { -class MissingSource : public std::exception +class LIBARDOUR_API MissingSource : public std::exception { public: MissingSource (const std::string& p, DataType t) throw () @@ -42,9 +42,9 @@ class MissingSource : public std::exception }; /** A source associated with a file on disk somewhere */ -class FileSource : virtual public Source { +class LIBARDOUR_API FileSource : virtual public Source { public: - virtual ~FileSource () {} + virtual ~FileSource (); virtual const std::string& path() const { return _path; } @@ -52,7 +52,8 @@ public: int move_to_trash (const std::string& trash_dir_name); void mark_take (const std::string& id); - void mark_immutable (); + void mark_immutable (); + void mark_immutable_except_write(); void mark_nonremovable (); const std::string& take_id () const { return _take_id; } @@ -73,12 +74,22 @@ public: void inc_use_count (); bool removable () const; + bool is_stub () const; const std::string& origin() const { return _origin; } virtual void set_path (const std::string&); - static PBD::Signal3 > AmbiguousFileName; + static PBD::Signal2 > AmbiguousFileName; + + void existence_check (); + virtual void prevent_deletion (); + + /** Rename the file on disk referenced by this source to \param newname + */ + int rename (const std::string& name); + + virtual void release_descriptor () {} protected: FileSource (Session& session, DataType type, @@ -99,9 +110,6 @@ protected: uint16_t _channel; bool _within_session; std::string _origin; - bool _open; - - void prevent_deletion (); }; } // namespace ARDOUR