aboutsummaryrefslogtreecommitdiffstats
path: root/src/mapper.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2012-02-13 20:10:19 +0100
committerMax Kellermann <max@duempel.org>2012-02-13 20:10:19 +0100
commit0a0b473765fe5ba43f442e3d12853add3ff51415 (patch)
treee6abfddf8066f1c9cf7ab0836505303ad0457ce0 /src/mapper.h
parentdf2d0414837ec0b53836f9c32e0f93d3baaefb14 (diff)
downloadmpd-0a0b473765fe5ba43f442e3d12853add3ff51415.tar.gz
mpd-0a0b473765fe5ba43f442e3d12853add3ff51415.tar.xz
mpd-0a0b473765fe5ba43f442e3d12853add3ff51415.zip
mapper: add mapper_get_music_directory()
Shortcut for map_directory_fs(db_get_root()).
Diffstat (limited to '')
-rw-r--r--src/mapper.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/mapper.h b/src/mapper.h
index c8dba29cb..ed4a60b56 100644
--- a/src/mapper.h
+++ b/src/mapper.h
@@ -36,12 +36,19 @@ void mapper_init(const char *_music_dir, const char *_playlist_dir);
void mapper_finish(void);
+G_GNUC_CONST
+const char *
+mapper_get_music_directory(void);
+
/**
* Returns true if a music directory was configured.
*/
G_GNUC_CONST
-bool
-mapper_has_music_directory(void);
+static inline bool
+mapper_has_music_directory(void)
+{
+ return mapper_get_music_directory() != NULL;
+}
/**
* If the specified absolute path points inside the music directory,