addToPlaylist/addSongToPlaylist: printId argument changed to added_id

Instead of printing out the Id from playlist.c, instead set
the integer that added_id poitns to if added_id is non-NULL.

This makes the API cleaner and will allow us to use additional
commands to manipulate the newly-added song_id.  Callers
(handleAddId) that relied on printId to print it to the given
fd have now been modified to print the ID at a higher-level;
making playlist.c less-dependent on protocol details.

git-svn-id: https://svn.musicpd.org/mpd/trunk@7149 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
Eric Wong
2008-01-26 12:46:49 +00:00
parent 2dafd9cd56
commit 2f0e5bfd85
4 changed files with 19 additions and 13 deletions

View File

@@ -173,7 +173,7 @@ int printAllIn(int fd, char *name)
static int directoryAddSongToPlaylist(int fd, Song * song, void *data)
{
return addSongToPlaylist(fd, song, 0);
return addSongToPlaylist(fd, song, NULL);
}
static int directoryAddSongToStoredPlaylist(int fd, Song *song, void *data)