diff options
author | Max Kellermann <max@duempel.org> | 2014-02-27 17:27:23 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-02-27 17:27:23 +0100 |
commit | 1c772ef69947127e01e7171b007a2295d51e7ae7 (patch) | |
tree | 1461d15b1f94e29ef23a750b97dcf16d77de9fd5 /src/queue/Playlist.hxx | |
parent | 809b89b5af5eaf7abc3240d786cda15f354b6624 (diff) | |
download | mpd-1c772ef69947127e01e7171b007a2295d51e7ae7.tar.gz mpd-1c772ef69947127e01e7171b007a2295d51e7ae7.tar.xz mpd-1c772ef69947127e01e7171b007a2295d51e7ae7.zip |
Playlist: use the Error library to return errors
Diffstat (limited to 'src/queue/Playlist.hxx')
-rw-r--r-- | src/queue/Playlist.hxx | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/src/queue/Playlist.hxx b/src/queue/Playlist.hxx index 09980155e..4a4c7f30c 100644 --- a/src/queue/Playlist.hxx +++ b/src/queue/Playlist.hxx @@ -146,14 +146,20 @@ public: void DatabaseModified(const Database &db); #endif - PlaylistResult AppendSong(PlayerControl &pc, - DetachedSong &&song, - unsigned *added_id=nullptr); - - PlaylistResult AppendURI(PlayerControl &pc, - const SongLoader &loader, - const char *uri_utf8, - unsigned *added_id=nullptr); + /** + * @return the new song id or 0 on error + */ + unsigned AppendSong(PlayerControl &pc, + DetachedSong &&song, + Error &error); + + /** + * @return the new song id or 0 on error + */ + unsigned AppendURI(PlayerControl &pc, + const SongLoader &loader, + const char *uri_utf8, + Error &error); protected: void DeleteInternal(PlayerControl &pc, |