ocarina/include/playqueue.h

41 lines
692 B
C
Raw Normal View History

/*
* Copyright 2013 (c) Anna Schumaker.
*/
#ifndef OCARINA_PLAYQUEUE_H
#define OCARINA_PLAYQUEUE_H
#include <file.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;
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 add(unsigned int);
void del(unsigned int);
unsigned int size();
unsigned int next();
};
#endif /* OCARINA_PLAYQUEUE_H */