diff options
Diffstat (limited to 'src/Playlist.hxx')
-rw-r--r-- | src/Playlist.hxx | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/src/Playlist.hxx b/src/Playlist.hxx index 7d7e9b154..db7889227 100644 --- a/src/Playlist.hxx +++ b/src/Playlist.hxx @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2013 The Music Player Daemon Project + * Copyright (C) 2003-2014 The Music Player Daemon Project * http://www.musicpd.org * * This program is free software; you can redistribute it and/or modify @@ -20,11 +20,13 @@ #ifndef MPD_PLAYLIST_HXX #define MPD_PLAYLIST_HXX -#include "Queue.hxx" +#include "queue/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); |