From 4465e2c46bbed438377dc4a99df333bd5c058d5e Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 30 Jan 2014 20:29:48 +0100 Subject: db: add compile-time option to disable database --- src/Mapper.hxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/Mapper.hxx') diff --git a/src/Mapper.hxx b/src/Mapper.hxx index 5c01a9aff..33d3b94f5 100644 --- a/src/Mapper.hxx +++ b/src/Mapper.hxx @@ -41,6 +41,8 @@ mapper_init(AllocatedPath &&music_dir, AllocatedPath &&playlist_dir); void mapper_finish(void); +#ifdef ENABLE_DATABASE + /** * Return the absolute path of the music directory encoded in UTF-8 or * nullptr if no music directory was configured. @@ -67,6 +69,8 @@ mapper_has_music_directory(void) return mapper_get_music_directory_utf8() != nullptr; } +#endif + /** * If the specified absolute path points inside the music directory, * this function converts it to a relative path. If not, it returns @@ -76,6 +80,8 @@ gcc_pure const char * map_to_relative_path(const char *path_utf8); +#ifdef ENABLE_DATABASE + /** * Determines the absolute file system path of a relative URI. This * is basically done by converting the URI to the file system charset @@ -126,10 +132,14 @@ gcc_pure AllocatedPath map_song_fs(const Song &song); +#endif + gcc_pure AllocatedPath map_song_fs(const DetachedSong &song); +#ifdef ENABLE_DATABASE + /** * Maps a file system path (relative to the music directory or * absolute) to a relative path in UTF-8 encoding. @@ -142,6 +152,8 @@ gcc_pure std::string map_fs_to_utf8(const char *path_fs); +#endif + /** * Returns the playlist directory. */ -- cgit v1.2.3