diff options
Diffstat (limited to 'src/song.h')
-rw-r--r-- | src/song.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/song.h b/src/song.h index 88adde0f0..0d2f976ac 100644 --- a/src/song.h +++ b/src/song.h @@ -38,10 +38,21 @@ struct mpd_song { char url[sizeof(size_t)]; }; -struct mpd_song *newSong(const char *url, struct directory *parentDir); - void freeJustSong(struct mpd_song *); +/** allocate a new song with a remote URL */ +struct mpd_song * song_remote_new(const char *url); + +/** allocate a new song with a local file name */ +struct mpd_song * song_file_new(const char *path, struct directory *parent); + +/** + * allocate a new song structure with a local file name and attempt to + * load its metadata. If all decoder plugin fail to read its meta + * data, NULL is returned. + */ +struct mpd_song * song_file_load(const char *path, struct directory *parent); + ssize_t song_print_info(struct mpd_song * song, int fd); /* like song_print_info, but casts data into an fd first */ |