diff options
author | Max Kellermann <max@duempel.org> | 2008-09-26 09:54:25 +0200 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2008-09-26 23:59:27 -0700 |
commit | f17fdbf2210513a0f33a41562fd8a91016c28f2f (patch) | |
tree | 6802e06890b73ad1f0da81df0ac74807d0221026 /src | |
parent | e4021113b8b903ba434bcd5ac62d6cd78e47e014 (diff) | |
download | mpd-f17fdbf2210513a0f33a41562fd8a91016c28f2f.tar.gz mpd-f17fdbf2210513a0f33a41562fd8a91016c28f2f.tar.xz mpd-f17fdbf2210513a0f33a41562fd8a91016c28f2f.zip |
song: removed type SongList
SongList has been superseded by struct songvec.
Diffstat (limited to 'src')
-rw-r--r-- | src/directory.h | 1 | ||||
-rw-r--r-- | src/ls.c | 1 | ||||
-rw-r--r-- | src/song.c | 36 | ||||
-rw-r--r-- | src/song.h | 9 |
4 files changed, 2 insertions, 45 deletions
diff --git a/src/directory.h b/src/directory.h index 351ebd2cd..e2ff3832a 100644 --- a/src/directory.h +++ b/src/directory.h @@ -21,6 +21,7 @@ #include "song.h" #include "songvec.h" +#include "list.h" typedef List DirectoryList; @@ -23,6 +23,7 @@ #include "log.h" #include "utf8.h" #include "utils.h" +#include "list.h" #include "os_compat.h" static const char *remoteUrlPrefixes[] = { diff --git a/src/song.c b/src/song.c index abf8f348b..5c5024391 100644 --- a/src/song.c +++ b/src/song.c @@ -93,42 +93,6 @@ void freeJustSong(Song * song) free(song); } -SongList *newSongList(void) -{ - return makeList((ListFreeDataFunc *) freeSong, 0); -} - -Song *addSongToList(SongList * list, const char *url, const char *utf8path, - int songType, Directory * parentDirectory) -{ - Song *song = NULL; - - switch (songType) { - case SONG_TYPE_FILE: - if (isMusic(utf8path, NULL, 0)) { - song = newSong(url, songType, parentDirectory); - } - break; - case SONG_TYPE_URL: - song = newSong(url, songType, parentDirectory); - break; - default: - DEBUG("addSongToList: Trying to add an invalid song type\n"); - } - - if (song == NULL) - return NULL; - - insertInList(list, song->url, (void *)song); - - return song; -} - -void freeSongList(SongList * list) -{ - freeList(list); -} - void printSongUrl(int fd, Song * song) { if (song->parentDir && song->parentDir->path) { diff --git a/src/song.h b/src/song.h index c31c39829..0fbee7b07 100644 --- a/src/song.h +++ b/src/song.h @@ -43,21 +43,12 @@ typedef struct _Song { time_t mtime; } Song; -typedef List SongList; - Song *newSong(const char *url, int songType, struct _Directory *parentDir); void freeSong(Song *); void freeJustSong(Song *); -SongList *newSongList(void); - -void freeSongList(SongList * list); - -Song *addSongToList(SongList * list, const char *url, const char *utf8path, - int songType, struct _Directory *parentDir); - int printSongInfo(int fd, Song * song); void readSongInfoIntoList(FILE * fp, struct _Directory *parent); |