Path: new class "Path" wraps filesystem path strings

This commit is contained in:
Max Kellermann
2013-01-17 00:56:57 +01:00
parent 8901514506
commit e5039c478a
21 changed files with 380 additions and 238 deletions

View File

@@ -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