47 lines
852 B
C++
47 lines
852 B
C++
/*
|
|
* Copyright 2013 (c) Anna Schumaker.
|
|
*/
|
|
#ifndef OCARINA_PLAYQUEUE_H
|
|
#define OCARINA_PLAYQUEUE_H
|
|
|
|
#include <file.h>
|
|
#include <library.h>
|
|
#include <vector>
|
|
|
|
enum playqueue_flags {
|
|
PQ_ENABLED = (1 << 0),
|
|
PQ_RANDOM = (1 << 1),
|
|
PQ_REPEAT = (1 << 2),
|
|
};
|
|
|
|
class Playqueue {
|
|
private:
|
|
std :: vector <unsigned int> 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();
|
|
|
|
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 next();
|
|
void reset_cur();
|
|
};
|
|
|
|
#endif /* OCARINA_PLAYQUEUE_H */
|