ocarina/include/core/playlist.h

72 lines
1.4 KiB
C
Raw Normal View History

/**
* @file
* Copyright 2013 (c) Anna Schumaker.
*/
#ifndef OCARINA_CORE_PLAYLIST_H
#define OCARINA_CORE_PLAYLIST_H
#include <core/index.h>
#include <core/queue.h>
#include <string>
/**
* Namespace for accessing playlists.
*/
namespace playlist
{
/**
* Read playlist information from disk.
*/
void init();
/**
* 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.
*/
bool has(Track *, const std::string &);
/**
* Add a track to a playlist.
*
* @param track The track to add.
* @param name The name of the playlist to add to.
*/
void add(Track *, const std::string &);
/**
* Remove a track from a playlist.
*
* @param track The track to remove.
* @param name The name of the playlist to remove from.
*/
void del(Track *, const std::string &);
/**
* Use to change the currently queued playlist.
*
* @param name The name of the queue to queue up.
*/
void select(const std::string &);
/**
* Use to access specific tracks in a playlist.
*
* @param name The playlist to access.
* @return The IndexEntry containing the tracks.
*/
IndexEntry *get_tracks(const std::string &);
/**
* @return The playlist queue.
*/
Queue *get_queue();
};
#endif /* OCARINA_CORE_PLAYLIST_H */