From e5039c478aa93e3e107ee9031a3cf27a6c203fea Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 17 Jan 2013 00:56:57 +0100 Subject: Path: new class "Path" wraps filesystem path strings --- src/Mapper.hxx | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'src/Mapper.hxx') diff --git a/src/Mapper.hxx b/src/Mapper.hxx index 2ced38a1..01c947b5 100644 --- a/src/Mapper.hxx +++ b/src/Mapper.hxx @@ -29,6 +29,7 @@ #define PLAYLIST_FILE_SUFFIX ".m3u" +class Path; struct Directory; struct song; @@ -75,8 +76,8 @@ map_to_relative_path(const char *path_utf8); * is basically done by converting the URI to the file system charset * and prepending the music directory. */ -gcc_malloc -char * +gcc_pure +Path map_uri_fs(const char *uri); /** @@ -85,8 +86,8 @@ map_uri_fs(const char *uri); * @param directory the directory object * @return the path in file system encoding, or nullptr if mapping failed */ -gcc_malloc -char * +gcc_pure +Path map_directory_fs(const Directory *directory); /** @@ -97,8 +98,8 @@ map_directory_fs(const Directory *directory); * @param name the child's name in UTF-8 * @return the path in file system encoding, or nullptr if mapping failed */ -gcc_malloc -char * +gcc_pure +Path map_directory_child_fs(const Directory *directory, const char *name); /** @@ -108,8 +109,8 @@ map_directory_child_fs(const Directory *directory, const char *name); * @param song the song object * @return the path in file system encoding, or nullptr if mapping failed */ -gcc_malloc -char * +gcc_pure +Path map_song_fs(const struct song *song); /** @@ -138,7 +139,7 @@ map_spl_path(void); * @return the path in file system encoding, or nullptr if mapping failed */ gcc_pure -char * +Path map_spl_utf8_to_fs(const char *name); #endif -- cgit v1.2.3