aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/DecoderThread.cxx2
-rw-r--r--src/InotifyUpdate.cxx2
-rw-r--r--src/Main.cxx2
-rw-r--r--src/Mapper.cxx (renamed from src/mapper.c)7
-rw-r--r--src/Mapper.hxx (renamed from src/mapper.h)21
-rw-r--r--src/OtherCommands.cxx2
-rw-r--r--src/PlaylistFile.cxx2
-rw-r--r--src/PlaylistMapper.cxx2
-rw-r--r--src/PlaylistSave.cxx2
-rw-r--r--src/PlaylistSong.cxx2
-rw-r--r--src/QueuePrint.cxx2
-rw-r--r--src/SongPrint.cxx2
-rw-r--r--src/SongUpdate.cxx2
-rw-r--r--src/UpdateArchive.cxx2
-rw-r--r--src/UpdateContainer.cxx2
-rw-r--r--src/UpdateGlue.cxx2
-rw-r--r--src/UpdateIO.cxx5
-rw-r--r--src/UpdateWalk.cxx2
18 files changed, 30 insertions, 33 deletions
diff --git a/src/DecoderThread.cxx b/src/DecoderThread.cxx
index e5b582598..cbdb19188 100644
--- a/src/DecoderThread.cxx
+++ b/src/DecoderThread.cxx
@@ -23,6 +23,7 @@
#include "decoder_plugin.h"
#include "song.h"
#include "mpd_error.h"
+#include "Mapper.hxx"
extern "C" {
#include "decoder_control.h"
@@ -32,7 +33,6 @@ extern "C" {
#include "replay_gain_ape.h"
#include "input_stream.h"
#include "tag.h"
-#include "mapper.h"
#include "uri.h"
}
diff --git a/src/InotifyUpdate.cxx b/src/InotifyUpdate.cxx
index 3e438b697..878da888e 100644
--- a/src/InotifyUpdate.cxx
+++ b/src/InotifyUpdate.cxx
@@ -22,9 +22,9 @@
#include "InotifySource.hxx"
#include "InotifyQueue.hxx"
#include "database.h"
+#include "Mapper.hxx"
extern "C" {
-#include "mapper.h"
#include "path.h"
}
diff --git a/src/Main.cxx b/src/Main.cxx
index d0f88c23e..3d457e31e 100644
--- a/src/Main.cxx
+++ b/src/Main.cxx
@@ -24,6 +24,7 @@
#include "chunk.h"
#include "StateFile.hxx"
#include "PlayerThread.hxx"
+#include "Mapper.hxx"
extern "C" {
#include "daemon.h"
@@ -38,7 +39,6 @@ extern "C" {
#include "cmdline.h"
#include "conf.h"
#include "path.h"
-#include "mapper.h"
#include "player_control.h"
#include "stats.h"
#include "sig_handlers.h"
diff --git a/src/mapper.c b/src/Mapper.cxx
index 1f8a54b46..1dc91ed12 100644
--- a/src/mapper.c
+++ b/src/Mapper.cxx
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003-2011 The Music Player Daemon Project
+ * Copyright (C) 2003-2013 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
@@ -22,10 +22,13 @@
*/
#include "config.h"
-#include "mapper.h"
+#include "Mapper.hxx"
#include "directory.h"
#include "song.h"
+
+extern "C" {
#include "path.h"
+}
#include <glib.h>
diff --git a/src/mapper.h b/src/Mapper.hxx
index b4e314569..d7e4ea1a9 100644
--- a/src/mapper.h
+++ b/src/Mapper.hxx
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003-2011 The Music Player Daemon Project
+ * Copyright (C) 2003-2013 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
@@ -21,15 +21,12 @@
* Maps directory and song objects to file system paths.
*/
-#ifndef MPD_MAPPER_H
-#define MPD_MAPPER_H
+#ifndef MPD_MAPPER_HXX
+#define MPD_MAPPER_HXX
#include "gcc.h"
#include "gerror.h"
-#include <stdbool.h>
-#include <stddef.h>
-
#define PLAYLIST_FILE_SUFFIX ".m3u"
struct directory;
@@ -61,7 +58,7 @@ gcc_const
static inline bool
mapper_has_music_directory(void)
{
- return mapper_get_music_directory_utf8() != NULL;
+ return mapper_get_music_directory_utf8() != nullptr;
}
/**
@@ -86,7 +83,7 @@ map_uri_fs(const char *uri);
* Determines the file system path of a directory object.
*
* @param directory the directory object
- * @return the path in file system encoding, or NULL if mapping failed
+ * @return the path in file system encoding, or nullptr if mapping failed
*/
gcc_malloc
char *
@@ -98,7 +95,7 @@ map_directory_fs(const struct directory *directory);
*
* @param directory the parent directory object
* @param name the child's name in UTF-8
- * @return the path in file system encoding, or NULL if mapping failed
+ * @return the path in file system encoding, or nullptr if mapping failed
*/
gcc_malloc
char *
@@ -109,7 +106,7 @@ map_directory_child_fs(const struct directory *directory, const char *name);
* remote song.
*
* @param song the song object
- * @return the path in file system encoding, or NULL if mapping failed
+ * @return the path in file system encoding, or nullptr if mapping failed
*/
gcc_malloc
char *
@@ -120,7 +117,7 @@ map_song_fs(const struct song *song);
* absolute) to a relative path in UTF-8 encoding.
*
* @param path_fs a path in file system encoding
- * @return the relative path in UTF-8, or NULL if mapping failed
+ * @return the relative path in UTF-8, or nullptr if mapping failed
*/
gcc_malloc
char *
@@ -138,7 +135,7 @@ map_spl_path(void);
* path. The return value is allocated on the heap and must be freed
* with g_free().
*
- * @return the path in file system encoding, or NULL if mapping failed
+ * @return the path in file system encoding, or nullptr if mapping failed
*/
gcc_pure
char *
diff --git a/src/OtherCommands.cxx b/src/OtherCommands.cxx
index 19d5a8c76..01f9b71a4 100644
--- a/src/OtherCommands.cxx
+++ b/src/OtherCommands.cxx
@@ -27,6 +27,7 @@
#include "SongPrint.hxx"
#include "TagPrint.hxx"
#include "TimePrint.hxx"
+#include "Mapper.hxx"
extern "C" {
#include "protocol/argparser.h"
@@ -46,7 +47,6 @@ extern "C" {
#include "client_idle.h"
#include "client_file.h"
#include "idle.h"
-#include "mapper.h"
}
#ifdef ENABLE_SQLITE
diff --git a/src/PlaylistFile.cxx b/src/PlaylistFile.cxx
index 3223edee3..896307df9 100644
--- a/src/PlaylistFile.cxx
+++ b/src/PlaylistFile.cxx
@@ -22,10 +22,10 @@
#include "PlaylistSave.hxx"
#include "song.h"
#include "io_error.h"
+#include "Mapper.hxx"
extern "C" {
#include "text_file.h"
-#include "mapper.h"
#include "path.h"
#include "uri.h"
#include "database.h"
diff --git a/src/PlaylistMapper.cxx b/src/PlaylistMapper.cxx
index f1c9471a7..01b8f7dd8 100644
--- a/src/PlaylistMapper.cxx
+++ b/src/PlaylistMapper.cxx
@@ -20,10 +20,10 @@
#include "config.h"
#include "PlaylistMapper.hxx"
#include "PlaylistFile.hxx"
+#include "Mapper.hxx"
extern "C" {
#include "playlist_list.h"
-#include "mapper.h"
#include "uri.h"
}
diff --git a/src/PlaylistSave.cxx b/src/PlaylistSave.cxx
index 8d1908aac..722ae9c83 100644
--- a/src/PlaylistSave.cxx
+++ b/src/PlaylistSave.cxx
@@ -21,10 +21,10 @@
#include "PlaylistSave.hxx"
#include "PlaylistFile.hxx"
#include "song.h"
+#include "Mapper.hxx"
extern "C" {
#include "playlist.h"
-#include "mapper.h"
#include "path.h"
#include "uri.h"
#include "idle.h"
diff --git a/src/PlaylistSong.cxx b/src/PlaylistSong.cxx
index 03bf5b703..72d2760c6 100644
--- a/src/PlaylistSong.cxx
+++ b/src/PlaylistSong.cxx
@@ -19,10 +19,10 @@
#include "config.h"
#include "PlaylistSong.hxx"
+#include "Mapper.hxx"
extern "C" {
#include "database.h"
-#include "mapper.h"
#include "song.h"
#include "uri.h"
#include "path.h"
diff --git a/src/QueuePrint.cxx b/src/QueuePrint.cxx
index 32f131ae8..f99181ca5 100644
--- a/src/QueuePrint.cxx
+++ b/src/QueuePrint.cxx
@@ -21,12 +21,12 @@
#include "QueuePrint.hxx"
#include "SongFilter.hxx"
#include "SongPrint.hxx"
+#include "Mapper.hxx"
extern "C" {
#include "queue.h"
#include "song.h"
#include "client.h"
-#include "mapper.h"
}
/**
diff --git a/src/SongPrint.cxx b/src/SongPrint.cxx
index 371952e86..07cf9c3e2 100644
--- a/src/SongPrint.cxx
+++ b/src/SongPrint.cxx
@@ -23,11 +23,11 @@
#include "directory.h"
#include "TimePrint.hxx"
#include "TagPrint.hxx"
+#include "Mapper.hxx"
extern "C" {
#include "client.h"
#include "uri.h"
-#include "mapper.h"
}
void
diff --git a/src/SongUpdate.cxx b/src/SongUpdate.cxx
index 114ad875c..c5258f025 100644
--- a/src/SongUpdate.cxx
+++ b/src/SongUpdate.cxx
@@ -25,9 +25,9 @@ extern "C" {
}
#include "directory.h"
+#include "Mapper.hxx"
extern "C" {
-#include "mapper.h"
#include "decoder_list.h"
#include "decoder_plugin.h"
#include "tag_ape.h"
diff --git a/src/UpdateArchive.cxx b/src/UpdateArchive.cxx
index 441cf71c2..36f5cdc20 100644
--- a/src/UpdateArchive.cxx
+++ b/src/UpdateArchive.cxx
@@ -23,9 +23,9 @@
#include "DatabaseLock.hxx"
#include "directory.h"
#include "song.h"
+#include "Mapper.hxx"
extern "C" {
-#include "mapper.h"
#include "archive_list.h"
#include "archive_plugin.h"
}
diff --git a/src/UpdateContainer.cxx b/src/UpdateContainer.cxx
index 7a904a1e6..909295d98 100644
--- a/src/UpdateContainer.cxx
+++ b/src/UpdateContainer.cxx
@@ -25,9 +25,9 @@
#include "directory.h"
#include "song.h"
#include "decoder_plugin.h"
+#include "Mapper.hxx"
extern "C" {
-#include "mapper.h"
#include "tag.h"
#include "tag_handler.h"
}
diff --git a/src/UpdateGlue.cxx b/src/UpdateGlue.cxx
index 203f16b76..9cf27588a 100644
--- a/src/UpdateGlue.cxx
+++ b/src/UpdateGlue.cxx
@@ -22,10 +22,10 @@
#include "UpdateQueue.hxx"
#include "UpdateWalk.hxx"
#include "UpdateRemove.hxx"
+#include "Mapper.hxx"
extern "C" {
#include "database.h"
-#include "mapper.h"
#include "playlist.h"
#include "event_pipe.h"
#include "idle.h"
diff --git a/src/UpdateIO.cxx b/src/UpdateIO.cxx
index fefbc4d11..77ec30413 100644
--- a/src/UpdateIO.cxx
+++ b/src/UpdateIO.cxx
@@ -20,12 +20,9 @@
#include "config.h" /* must be first for large file support */
#include "UpdateIO.hxx"
#include "directory.h"
+#include "Mapper.hxx"
#include "glib_compat.h"
-extern "C" {
-#include "mapper.h"
-}
-
#include <glib.h>
#include <errno.h>
diff --git a/src/UpdateWalk.cxx b/src/UpdateWalk.cxx
index a34e0028d..b277f0477 100644
--- a/src/UpdateWalk.cxx
+++ b/src/UpdateWalk.cxx
@@ -27,12 +27,12 @@
#include "directory.h"
#include "song.h"
#include "PlaylistVector.hxx"
+#include "Mapper.hxx"
extern "C" {
#include "exclude.h"
#include "database.h"
#include "uri.h"
-#include "mapper.h"
#include "path.h"
#include "playlist_list.h"
#include "conf.h"