merge with master.
[ardour.git] / libs / ardour / ardour / file_source.h
index 52dca18feb4505741fcfe6f77038fb6d6691fb96..8b8adfeb669813f7bb4a4d82f6d47f021e1e0101 100644 (file)
@@ -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; }
 
@@ -74,6 +74,7 @@ public:
 
        void inc_use_count ();
        bool removable () const;
+        bool is_stub () const;
 
        const std::string& origin() const { return _origin; }
 
@@ -81,6 +82,13 @@ public:
        
        static PBD::Signal2<int,std::string,std::vector<std::string> > 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);
+
 protected:
        FileSource (Session& session, DataType type,
                    const std::string& path,
@@ -102,7 +110,6 @@ protected:
        std::string _origin;
        bool        _open;
 
-       void prevent_deletion ();
 };
 
 } // namespace ARDOUR