2014-09-15 08:26:52 -04:00
|
|
|
/**
|
|
|
|
* @file
|
2013-12-22 17:24:09 -05:00
|
|
|
* Copyright 2013 (c) Anna Schumaker.
|
|
|
|
*/
|
2014-06-21 09:37:47 -04:00
|
|
|
#ifndef OCARINA_CORE_PLAYLIST_H
|
|
|
|
#define OCARINA_CORE_PLAYLIST_H
|
2013-12-22 17:24:09 -05:00
|
|
|
|
2014-06-05 10:19:22 -04:00
|
|
|
#include <core/index.h>
|
|
|
|
#include <core/queue.h>
|
2014-02-02 14:05:56 -05:00
|
|
|
|
2013-12-31 15:44:44 -05:00
|
|
|
#include <string>
|
2013-12-22 17:53:58 -05:00
|
|
|
|
2014-09-15 08:26:52 -04:00
|
|
|
/**
|
|
|
|
* Namespace for accessing playlists.
|
|
|
|
*/
|
2013-12-31 16:58:40 -05:00
|
|
|
namespace playlist
|
2013-12-31 15:44:44 -05:00
|
|
|
{
|
2013-12-22 17:53:58 -05:00
|
|
|
|
2014-09-15 08:26:52 -04:00
|
|
|
/**
|
|
|
|
* Read playlist information from disk.
|
|
|
|
*/
|
2013-12-31 16:58:40 -05:00
|
|
|
void init();
|
2014-09-15 08:26:52 -04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Check if a specific track is in a playlist.
|
|
|
|
*
|
|
|
|
* @param track The track in question.
|
|
|
|
* @param name The name of the playlist to check.
|
|
|
|
* @return True if the track is in the playlist, false otherwise.
|
|
|
|
*/
|
2014-05-18 21:09:46 -04:00
|
|
|
bool has(Track *, const std::string &);
|
2014-09-15 08:26:52 -04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Add a track to a playlist.
|
|
|
|
*
|
|
|
|
* @param track The track to add.
|
|
|
|
* @param name The name of the playlist to add to.
|
|
|
|
*/
|
2014-05-18 21:09:46 -04:00
|
|
|
void add(Track *, const std::string &);
|
2014-09-15 08:26:52 -04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Remove a track from a playlist.
|
|
|
|
*
|
|
|
|
* @param track The track to remove.
|
|
|
|
* @param name The name of the playlist to remove from.
|
|
|
|
*/
|
2014-05-18 21:09:46 -04:00
|
|
|
void del(Track *, const std::string &);
|
2014-09-15 08:26:52 -04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Use to change the currently queued playlist.
|
|
|
|
*
|
|
|
|
* @param name The name of the queue to queue up.
|
|
|
|
*/
|
2014-02-02 14:05:56 -05:00
|
|
|
void select(const std::string &);
|
2014-09-15 08:26:52 -04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Use to access specific tracks in a playlist.
|
|
|
|
*
|
|
|
|
* @param name The playlist to access.
|
|
|
|
* @return The IndexEntry containing the tracks.
|
|
|
|
*/
|
2014-05-18 21:09:46 -04:00
|
|
|
IndexEntry *get_tracks(const std::string &);
|
2014-09-15 08:26:52 -04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @return The playlist queue.
|
|
|
|
*/
|
2014-05-18 21:09:46 -04:00
|
|
|
Queue *get_queue();
|
2013-12-22 20:53:06 -05:00
|
|
|
|
2013-12-22 17:24:09 -05:00
|
|
|
};
|
|
|
|
|
2014-06-21 09:37:47 -04:00
|
|
|
#endif /* OCARINA_CORE_PLAYLIST_H */
|