1 #ifndef __ardour_session_playlists_h__
2 #define __ardour_session_playlists_h__
7 #include <glibmm/thread.h>
8 #include <boost/shared_ptr.hpp>
9 #include <sigc++/trackable.h>
20 class SessionPlaylists : public sigc::trackable
25 boost::shared_ptr<Playlist> by_name (std::string name);
26 uint32_t source_use_count (boost::shared_ptr<const Source> src) const;
27 template<class T> void foreach (T *obj, void (T::*func)(boost::shared_ptr<Playlist>));
28 void get (std::vector<boost::shared_ptr<Playlist> >&);
29 void unassigned (std::list<boost::shared_ptr<Playlist> > & list);
34 bool add (boost::shared_ptr<Playlist>);
35 void remove (boost::shared_ptr<Playlist>);
36 void track (bool, boost::weak_ptr<Playlist>);
38 uint32_t n_playlists() const;
39 void find_equivalent_playlist_regions (boost::shared_ptr<Region>, std::vector<boost::shared_ptr<Region> >& result);
40 void update_after_tempo_map_change ();
41 void add_state (XMLNode *, bool);
42 bool maybe_delete_unused (sigc::signal<int, boost::shared_ptr<Playlist> >);
43 int load (Session &, const XMLNode&);
44 int load_unused (Session &, const XMLNode&);
45 boost::shared_ptr<Playlist> XMLPlaylistFactory (Session &, const XMLNode&);
47 mutable Glib::Mutex lock;
48 typedef std::set<boost::shared_ptr<Playlist> > List;
50 List unused_playlists;