*/
-#ifndef DCPOMATIC_SPL_H
-#define DCPOMATIC_SPL_H
+#include "spl_entry.h"
-#include <boost/filesystem.hpp>
-
-class SPLEntry;
+class ContentStore;
class SPL
{
public:
- SPL () {}
- SPL (boost::filesystem::path file);
+ void add (SPLEntry e) {
+ _spl.push_back (e);
+ }
- void as_xml (boost::filesystem::path file) const;
+ void remove (std::size_t index) {
+ _spl.erase (_spl.begin() + index);
+ }
- std::string name;
- std::list<SPLEntry> playlist;
-};
+ std::vector<SPLEntry> const & get () const {
+ return _spl;
+ }
+
+ SPLEntry & operator[] (std::size_t index) {
+ return _spl[index];
+ }
+
+ SPLEntry const & operator[] (std::size_t index) const {
+ return _spl[index];
+ }
-#endif
+ bool read (boost::filesystem::path path, ContentStore* store);
+ void write (boost::filesystem::path path) const;
+
+ std::string name () const {
+ return _name;
+ }
+
+private:
+ std::string _name;
+ std::vector<SPLEntry> _spl;
+};