]> git.tdb.fi Git - libs/al.git/blob - source/jukebox.h
Drop copyright notices and Id tags from source files
[libs/al.git] / source / jukebox.h
1 #ifndef MSP_AL_JUKEBOX_H_
2 #define MSP_AL_JUKEBOX_H_
3
4 #include <list>
5 #include <string>
6 #include <sigc++/signal.h>
7 #include "source.h"
8 #include "streamer.h"
9
10 namespace Msp {
11 namespace AL {
12
13 class Sound;
14
15 class Jukebox
16 {
17 public:
18         sigc::signal<void, const std::string &> signal_track_changed;
19
20 private:
21         Source source;
22         Streamer streamer;
23         Sound *sound;
24         std::list<std::string> tracks;
25         std::list<std::string>::iterator current_track;
26         bool shuffle;
27
28 public:
29         Jukebox();
30         ~Jukebox();
31
32         Source &get_source() { return source; }
33         void add_track(const std::string &);
34         void remove_track(const std::string &);
35         void clear_tracks();
36         const std::string &get_current_track() const;
37         void set_shuffle(bool);
38
39         void play();
40         void next();
41         void previous();
42         void stop();
43         void tick();
44 };
45
46 } // namespace AL
47 } // namespace Msp
48
49 #endif