add libardour infrastructure for "fade range" edit operation
[ardour.git] / libs / ardour / ardour / smf_source.h
index 82e6252b4507748e6b4da3e58536ec8dd05b64b1..84c45f9b3cf342be199c2e552c58daa74c715f12 100644 (file)
@@ -36,9 +36,11 @@ template<typename T> class MidiRingBuffer;
 /** Standard Midi File (Type 0) Source */
 class LIBARDOUR_API SMFSource : public MidiSource, public FileSource, public Evoral::SMF {
 public:
+       /** Constructor for new internal-to-session files */
+       SMFSource (Session& session, const std::string& path, Source::Flag flags);
+
        /** Constructor for existing external-to-session files */
-       SMFSource (Session& session, const std::string& path,
-                       Source::Flag flags = Source::Flag(0));
+       SMFSource (Session& session, const std::string& path);
 
        /** Constructor for existing in-session files */
        SMFSource (Session& session, const XMLNode&, bool must_exist = false);
@@ -49,8 +51,6 @@ public:
                return safe_midi_file_extension(path);
        }
 
-       bool set_name (const std::string& newname) { return (set_source_name(newname, false) == 0); }
-
        void append_event_unlocked_beats (const Evoral::Event<Evoral::MusicalTime>& ev);
        void append_event_unlocked_frames (const Evoral::Event<framepos_t>& ev, framepos_t source_start);
 
@@ -68,6 +68,9 @@ public:
        void ensure_disk_file ();
 
        static bool safe_midi_file_extension (const std::string& path);
+       static bool valid_midi_file (const std::string& path);
+
+       void prevent_deletion ();
 
   protected:
        void set_path (const std::string& newpath);