summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/session_playlists.h
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2009-12-03 21:53:08 +0000
committerCarl Hetherington <carl@carlh.net>2009-12-03 21:53:08 +0000
commita351048ca8b3911317a90835b67104df0f1e6d0b (patch)
tree0d4d8bc0063694a1fc126d82d6b1abd2ef0f737f /libs/ardour/ardour/session_playlists.h
parentee9455af40adaaf48010784330f457f471b2546e (diff)
Add missing files.
git-svn-id: svn://localhost/ardour2/branches/3.0@6271 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/session_playlists.h')
-rw-r--r--libs/ardour/ardour/session_playlists.h55
1 files changed, 55 insertions, 0 deletions
diff --git a/libs/ardour/ardour/session_playlists.h b/libs/ardour/ardour/session_playlists.h
new file mode 100644
index 0000000000..1fca497143
--- /dev/null
+++ b/libs/ardour/ardour/session_playlists.h
@@ -0,0 +1,55 @@
+#ifndef __ardour_session_playlists_h__
+#define __ardour_session_playlists_h__
+
+#include <set>
+#include <vector>
+#include <string>
+#include <glibmm/thread.h>
+#include <boost/shared_ptr.hpp>
+#include <sigc++/trackable.h>
+
+class XMLNode;
+
+namespace ARDOUR {
+
+class Playlist;
+class Region;
+class Source;
+class Session;
+
+class SessionPlaylists : public sigc::trackable
+{
+public:
+ ~SessionPlaylists ();
+
+ boost::shared_ptr<Playlist> by_name (std::string name);
+ uint32_t source_use_count (boost::shared_ptr<const Source> src) 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);
+
+private:
+ friend class Session;
+
+ bool add (boost::shared_ptr<Playlist>);
+ void remove (boost::shared_ptr<Playlist>);
+ void track (bool, boost::weak_ptr<Playlist>);
+
+ uint32_t n_playlists() const;
+ 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> >);
+ 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;
+ List unused_playlists;
+};
+
+}
+
+#endif