Fix long-standing spelling bug.
[ardour.git] / libs / ardour / ardour / file_source.h
index c757b2877c1219da7b20104da1f7d084c455c5c7..00fb74b426114370723a717526744c9ea78f0451 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,17 +42,18 @@ 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; }
+       const std::string& path() const { return _path; }
 
        virtual bool safe_file_extension (const std::string& path) const = 0;
 
        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,24 @@ public:
 
        void inc_use_count ();
        bool removable () const;
+        bool is_stub () const;
 
        const std::string& origin() const { return _origin; }
 
-       static PBD::Signal3<int,std::string,std::string,std::vector<std::string> > AmbiguousFileName;
+       virtual void set_path (const std::string&);
+
+       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:
+       virtual void close () = 0;
+
+  protected:
        FileSource (Session& session, DataType type,
                    const std::string& path,
                    const std::string& origin,
@@ -88,7 +101,6 @@ protected:
 
        virtual int init (const std::string& idstr, bool must_exist);
 
-       virtual void set_path (const std::string&);
        virtual int move_dependents_to_trash() { return 0; }
        void set_within_session_from_path (const std::string&);
 
@@ -98,9 +110,6 @@ protected:
        uint16_t    _channel;
        bool        _within_session;
        std::string _origin;
-       bool        _open;
-
-       void prevent_deletion ();
 };
 
 } // namespace ARDOUR