/* * Copyright 2013 (c) Anna Schumaker. */ #ifndef OCARINA_PLAYQUEUE_H #define OCARINA_PLAYQUEUE_H #include #include #include enum playqueue_flags { PQ_ENABLED = (1 << 0), PQ_RANDOM = (1 << 1), PQ_REPEAT = (1 << 2), PQ_DISABLE_CHANGED_SIZE = (1 << 3), }; class Playqueue { private: std :: vector tracks; unsigned int flags; unsigned int cur; unsigned int length; public: Playqueue(); Playqueue(playqueue_flags); ~Playqueue(); void write(File &); void read(File &); void set_flag(playqueue_flags); void unset_flag(playqueue_flags); const unsigned int get_flags(); unsigned int get_length(); std::string get_length_str(); unsigned int add(unsigned int); unsigned int add_front(unsigned int); void del(unsigned int); void del_track(unsigned int); unsigned int size(); unsigned int operator[](unsigned int); unsigned int next(); void reset_cur(); #ifdef CONFIG_TEST void reset(); #endif /* CONFIG_TEST */ }; #endif /* OCARINA_PLAYQUEUE_H */