/* Echo Media Player
* Copyright (C) 2008 Shane O'Connell
*
* [ The original file includes a copyright header in this location describing
* the file as being released under the terms of the GNU General Public
* License. It has been removed in order to display the file as part of the
* archive. ]
*/
#ifndef PLAYBACKMANAGER_H_
#define PLAYBACKMANAGER_H_
#include "PlaySource.h"
#include <boost/shared_ptr.hpp>
enum ShuffleType { SHUFFLE_NONE, SHUFFLE_ALL, SHUFFLE_ARTIST, SHUFFLE_ALBUM };
class PlaybackManager
{
public:
static void init_sound(int *argc, char **argv[]);
static void play(PlaySourceRef playlist, int index = 0);
static void stop();
static void pause();
static void unpause();
static bool is_paused();
static void next();
static void prev();
static int get_track_length();
static int get_track_position();
static PlaySourceRef get_playing_source();
static int get_playing_index();
static void set_shuffle(ShuffleType type);
// ------------ Signals ------------
public:
// PlaySource source, int index, bool was_paused
static sigc::signal<void, PlaySourceRef, int, bool>& signal_track_started()
{ return _signal_track_started; }
// PlaySource source, int index, bool is_paused
static sigc::signal<void, PlaySourceRef, int, bool>& signal_track_stopped()
{ return _signal_track_stopped; }
private:
static sigc::signal<void, PlaySourceRef, int, bool> _signal_track_started;
static sigc::signal<void, PlaySourceRef, int, bool> _signal_track_stopped;
PlaybackManager() {}
};
#endif /* PLAYBACKMANAGER_H_ */