aboutsummaryrefslogtreecommitdiffstats
path: root/src/Mapper.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-10-17 21:59:35 +0200
committerMax Kellermann <max@duempel.org>2013-10-17 23:43:46 +0200
commitabfbd55305587306730d5419b8a3b09e6a43abcb (patch)
tree2a195220d79efe195f3beacb7dd3a226a3341ad6 /src/Mapper.hxx
parentb3611524f45c2a478f9decd6d22ecd1dbbbb64b9 (diff)
downloadmpd-abfbd55305587306730d5419b8a3b09e6a43abcb.tar.gz
mpd-abfbd55305587306730d5419b8a3b09e6a43abcb.tar.xz
mpd-abfbd55305587306730d5419b8a3b09e6a43abcb.zip
fs/Path: rename to AllocatedPath
The new class Path only holds a string pointer without being responsible for allocation/deallocation. The FileSystem.hxx library accepts Path arguments instead of AllocatedPath, to avoid forcing callers to allocate another string object.
Diffstat (limited to '')
-rw-r--r--src/Mapper.hxx17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/Mapper.hxx b/src/Mapper.hxx
index 0688d5dd3..c340e6d64 100644
--- a/src/Mapper.hxx
+++ b/src/Mapper.hxx
@@ -31,11 +31,12 @@
#define PLAYLIST_FILE_SUFFIX ".m3u"
class Path;
+class AllocatedPath;
struct Directory;
struct Song;
void
-mapper_init(Path &&music_dir, Path &&playlist_dir);
+mapper_init(AllocatedPath &&music_dir, AllocatedPath &&playlist_dir);
void mapper_finish(void);
@@ -51,7 +52,7 @@ mapper_get_music_directory_utf8(void);
* filesystem character set.
*/
gcc_const
-const Path &
+const AllocatedPath &
mapper_get_music_directory_fs(void);
/**
@@ -79,7 +80,7 @@ map_to_relative_path(const char *path_utf8);
* and prepending the music directory.
*/
gcc_pure
-Path
+AllocatedPath
map_uri_fs(const char *uri);
/**
@@ -89,7 +90,7 @@ map_uri_fs(const char *uri);
* @return the path in file system encoding, or nullptr if mapping failed
*/
gcc_pure
-Path
+AllocatedPath
map_directory_fs(const Directory *directory);
/**
@@ -101,7 +102,7 @@ map_directory_fs(const Directory *directory);
* @return the path in file system encoding, or nullptr if mapping failed
*/
gcc_pure
-Path
+AllocatedPath
map_directory_child_fs(const Directory *directory, const char *name);
/**
@@ -112,7 +113,7 @@ map_directory_child_fs(const Directory *directory, const char *name);
* @return the path in file system encoding, or nullptr if mapping failed
*/
gcc_pure
-Path
+AllocatedPath
map_song_fs(const Song *song);
/**
@@ -131,7 +132,7 @@ map_fs_to_utf8(const char *path_fs);
* Returns the playlist directory.
*/
gcc_const
-const Path &
+const AllocatedPath &
map_spl_path(void);
/**
@@ -142,7 +143,7 @@ map_spl_path(void);
* @return the path in file system encoding, or nullptr if mapping failed
*/
gcc_pure
-Path
+AllocatedPath
map_spl_utf8_to_fs(const char *name);
#endif