--- /dev/null
+#ifndef MSP_AL_PLAYLIST_H_
+#define MSP_AL_PLAYLIST_H_
+
+#include <string>
+#include <vector>
+#include <msp/datafile/objectloader.h>
+
+namespace Msp {
+namespace AL {
+
+class Playlist
+{
+public:
+ class Loader: public DataFile::CollectionObjectLoader<Playlist>
+ {
+ public:
+ Loader(Playlist &);
+ Loader(Playlist &, Collection &);
+ private:
+ void init();
+
+ void track(const std::string &);
+ };
+
+private:
+ struct Track
+ {
+ const DataFile::Collection *collection;
+ std::string filename;
+
+ Track();
+ Track(const std::string &);
+ };
+
+ bool shuffle;
+ std::vector<Track> tracks;
+
+public:
+ Playlist();
+
+ void add_track(const std::string &);
+ void remove_track(const std::string &);
+ void clear_tracks();
+ void set_shuffle(bool);
+ const std::string &get_track(unsigned) const;
+ unsigned size() const { return tracks.size(); }
+ bool empty() const { return tracks.empty(); }
+
+ unsigned advance(unsigned, int = 1) const;
+ IO::Seekable *open(unsigned) const;
+};
+
+} // namespace AL
+} // namespace Msp
+
+#endif