diff options
Diffstat (limited to 'src/Mapper.hxx')
-rw-r--r-- | src/Mapper.hxx | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/Mapper.hxx b/src/Mapper.hxx index 947fd2822..5c01a9aff 100644 --- a/src/Mapper.hxx +++ b/src/Mapper.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 @@ -30,10 +30,11 @@ #define PLAYLIST_FILE_SUFFIX ".m3u" -class Path; class AllocatedPath; struct Directory; struct Song; +struct LightSong; +class DetachedSong; void mapper_init(AllocatedPath &&music_dir, AllocatedPath &&playlist_dir); @@ -107,6 +108,14 @@ AllocatedPath map_directory_child_fs(const Directory &directory, const char *name); /** + * "Detach" the #Song object, i.e. convert it to a #DetachedSong + * instance. + */ +gcc_pure +DetachedSong +map_song_detach(const LightSong &song); + +/** * Determines the file system path of a song. This must not be a * remote song. * @@ -117,6 +126,10 @@ gcc_pure AllocatedPath map_song_fs(const Song &song); +gcc_pure +AllocatedPath +map_song_fs(const DetachedSong &song); + /** * Maps a file system path (relative to the music directory or * absolute) to a relative path in UTF-8 encoding. @@ -138,8 +151,7 @@ map_spl_path(void); /** * Maps a playlist name (without the ".m3u" suffix) to a file system - * path. The return value is allocated on the heap and must be freed - * with g_free(). + * path. * * @return the path in file system encoding, or nullptr if mapping failed */ |