Respond to MMC even when synced to JACK. Fixes #3700.
[ardour.git] / libs / ardour / ardour / session_playlists.h
index 83f469cfd404e17ed0d8b59536f6672b3ea19c5e..0a20c7b9053ebb48d10a0df93a2ab42722a8033e 100644 (file)
 #include <string>
 #include <glibmm/thread.h>
 #include <boost/shared_ptr.hpp>
-#include <sigc++/trackable.h>
+#include <boost/function.hpp>
+
+#include "pbd/signals.h"
 
 class XMLNode;
 
+namespace PBD {
+        class ID;
+}
+
 namespace ARDOUR {
 
 class Playlist;
 class Region;
 class Source;
 class Session;
+class Crossfade;       
        
-class SessionPlaylists : public sigc::trackable
+class SessionPlaylists : public PBD::ScopedConnectionList
 {
 public:
        ~SessionPlaylists ();
        
        boost::shared_ptr<Playlist> by_name (std::string name);
+       boost::shared_ptr<Playlist> by_id (const PBD::ID&);
        uint32_t source_use_count (boost::shared_ptr<const Source> src) const;
+        uint32_t region_use_count (boost::shared_ptr<Region> region) const;
        template<class T> void foreach (T *obj, void (T::*func)(boost::shared_ptr<Playlist>));
        void get (std::vector<boost::shared_ptr<Playlist> >&);
        void unassigned (std::list<boost::shared_ptr<Playlist> > & list);
+        void destroy_region (boost::shared_ptr<Region>);
+       boost::shared_ptr<Crossfade> find_crossfade (const PBD::ID &);
 
 private:
        friend class Session;
@@ -58,11 +69,11 @@ private:
        void find_equivalent_playlist_regions (boost::shared_ptr<Region>, std::vector<boost::shared_ptr<Region> >& result);
        void update_after_tempo_map_change ();
        void add_state (XMLNode *, bool);
-       bool maybe_delete_unused (sigc::signal<int, boost::shared_ptr<Playlist> >);
+       bool maybe_delete_unused (boost::function<int(boost::shared_ptr<Playlist>)>);
        int load (Session &, const XMLNode&);
        int load_unused (Session &, const XMLNode&);
        boost::shared_ptr<Playlist> XMLPlaylistFactory (Session &, const XMLNode&);
-
+        
        mutable Glib::Mutex lock;
        typedef std::set<boost::shared_ptr<Playlist> > List;
        List playlists;