aboutsummaryrefslogtreecommitdiffstats
path: root/src/Playlist.hxx
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Playlist.hxx20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/Playlist.hxx b/src/Playlist.hxx
index 5875ff4d8..e578bfcee 100644
--- a/src/Playlist.hxx
+++ b/src/Playlist.hxx
@@ -23,8 +23,10 @@
#include "Queue.hxx"
#include "PlaylistError.hxx"
+enum TagType : uint8_t;
struct PlayerControl;
-struct Song;
+class DetachedSong;
+class Error;
struct playlist {
/**
@@ -98,7 +100,7 @@ struct playlist {
* none if there is none (yet?) or if MPD isn't playing.
*/
gcc_pure
- const Song *GetQueuedSong() const;
+ const DetachedSong *GetQueuedSong() const;
/**
* This is the "PLAYLIST" event handler. It is invoked by the
@@ -123,7 +125,7 @@ protected:
* @param prev the song which was previously queued, as
* determined by playlist_get_queued_song()
*/
- void UpdateQueuedSong(PlayerControl &pc, const Song *prev);
+ void UpdateQueuedSong(PlayerControl &pc, const DetachedSong *prev);
public:
void Clear(PlayerControl &pc);
@@ -133,7 +135,7 @@ public:
* thread. Apply the given song's tag to the current song if
* the song matches.
*/
- void TagModified(Song &&song);
+ void TagModified(DetachedSong &&song);
/**
* The database has been modified. Pull all updates.
@@ -141,7 +143,7 @@ public:
void DatabaseModified();
PlaylistResult AppendSong(PlayerControl &pc,
- Song *song,
+ DetachedSong &&song,
unsigned *added_id=nullptr);
/**
@@ -160,7 +162,7 @@ public:
protected:
void DeleteInternal(PlayerControl &pc,
- unsigned song, const Song **queued_p);
+ unsigned song, const DetachedSong **queued_p);
public:
PlaylistResult DeletePosition(PlayerControl &pc,
@@ -182,7 +184,7 @@ public:
PlaylistResult DeleteRange(PlayerControl &pc,
unsigned start, unsigned end);
- void DeleteSong(PlayerControl &pc, const Song &song);
+ void DeleteSong(PlayerControl &pc, const char *uri);
void Shuffle(PlayerControl &pc, unsigned start, unsigned end);
@@ -205,6 +207,10 @@ public:
PlaylistResult SetPriorityId(PlayerControl &pc,
unsigned song_id, uint8_t priority);
+ bool AddSongIdTag(unsigned id, TagType tag_type, const char *value,
+ Error &error);
+ bool ClearSongIdTag(unsigned id, TagType tag_type, Error &error);
+
void Stop(PlayerControl &pc);
PlaylistResult PlayPosition(PlayerControl &pc, int position);