Move Diskstream ownership to Track, so that Session no longer holds lists of Diskstre...
[ardour.git] / libs / ardour / ardour / playlist.h
index b6e8719ccd8a2a6906d90c308c09f8c8b5f985e1..c5b79644c65fb0f6fd2e23ce19d005cf282b3517 100644 (file)
@@ -66,7 +66,7 @@ class RegionListProperty : public PBD::SequenceProperty<std::list<boost::shared_
         RegionListProperty (Playlist&);
 
         boost::shared_ptr<Region> lookup_id (const PBD::ID& id);
-        void diff (PBD::PropertyList& before, PBD::PropertyList& after) const;
+        void diff (PBD::PropertyList& undo, PBD::PropertyList& redo) const;
 
   private:
         friend class Playlist;
@@ -116,6 +116,7 @@ class Playlist : public SessionObject
        bool used () const { return _refcnt != 0; }
 
        bool set_name (const std::string& str);
+        int sort_id() { return _sort_id; }
 
        const DataType& data_type() const { return _type; }
 
@@ -194,6 +195,7 @@ class Playlist : public SessionObject
 
        uint32_t read_data_count() const { return _read_data_count; }
 
+       /* XXX: use of diskstream here is a little unfortunate */
        const PBD::ID& get_orig_diskstream_id () const { return _orig_diskstream_id; }
        void set_orig_diskstream_id (const PBD::ID& did) { _orig_diskstream_id = did; }
 
@@ -240,6 +242,7 @@ class Playlist : public SessionObject
        std::set<boost::shared_ptr<Region> > all_regions; /* all regions ever added to this playlist */
        PBD::ScopedConnectionList region_state_changed_connections;
        DataType        _type;
+        int             _sort_id;
        mutable gint    block_notifications;
        mutable gint    ignore_state_changes;
        mutable Glib::RecMutex region_lock;
@@ -289,6 +292,8 @@ class Playlist : public SessionObject
        virtual void flush_notifications ();
        void clear_pending ();
 
+        void _set_sort_id ();
+
        void notify_region_removed (boost::shared_ptr<Region>);
        void notify_region_added (boost::shared_ptr<Region>);
        void notify_length_changed ();