aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-01-09 08:36:52 +0100
committerMax Kellermann <max@duempel.org>2013-01-09 13:01:38 +0100
commite86e77ad67f883111d50f0886204ad96c8d0f90b (patch)
treed3a6dfa79c2b3326020a4fcd9f3f335ba06ec280
parent3c4bb9ff4ed60297af0e63befabf37b50b9fe745 (diff)
idle: convert to C++
-rw-r--r--Makefile.am3
-rw-r--r--src/ClientIdle.cxx5
-rw-r--r--src/ClientSubscribe.cxx5
-rw-r--r--src/Idle.cxx (renamed from src/idle.c)7
-rw-r--r--src/Idle.hxx (renamed from src/idle.h)6
-rw-r--r--src/Main.cxx2
-rw-r--r--src/OtherCommands.cxx5
-rw-r--r--src/OutputCommand.cxx2
-rw-r--r--src/PlayerControl.cxx6
-rw-r--r--src/PlayerThread.cxx2
-rw-r--r--src/Playlist.cxx5
-rw-r--r--src/PlaylistEdit.cxx2
-rw-r--r--src/PlaylistFile.cxx2
-rw-r--r--src/PlaylistSave.cxx2
-rw-r--r--src/ReplayGainConfig.cxx6
-rw-r--r--src/StickerDatabase.cxx5
-rw-r--r--src/UpdateGlue.cxx2
-rw-r--r--src/Volume.cxx2
-rw-r--r--test/run_output.cxx2
19 files changed, 25 insertions, 46 deletions
diff --git a/Makefile.am b/Makefile.am
index 6013f943..f9cac402 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -61,7 +61,6 @@ mpd_headers = \
src/filter/convert_filter_plugin.h \
src/filter/volume_filter_plugin.h \
src/command.h \
- src/idle.h \
src/conf.h \
src/decoder_plugin.h \
src/decoder_command.h \
@@ -185,7 +184,7 @@ src_mpd_SOURCES = \
src/OutputCommands.cxx src/OutputCommands.hxx \
src/MessageCommands.cxx src/MessageCommands.hxx \
src/OtherCommands.cxx src/OtherCommands.hxx \
- src/idle.c \
+ src/Idle.cxx src/Idle.hxx \
src/CommandLine.cxx src/CommandLine.hxx \
src/conf.c \
src/CrossFade.cxx src/CrossFade.hxx \
diff --git a/src/ClientIdle.cxx b/src/ClientIdle.cxx
index c125a8df..c68bee83 100644
--- a/src/ClientIdle.cxx
+++ b/src/ClientIdle.cxx
@@ -21,10 +21,7 @@
#include "ClientIdle.hxx"
#include "ClientInternal.hxx"
#include "ClientList.hxx"
-
-extern "C" {
-#include "idle.h"
-}
+#include "Idle.hxx"
#include <assert.h>
diff --git a/src/ClientSubscribe.cxx b/src/ClientSubscribe.cxx
index a1ad6e68..fd7a93c8 100644
--- a/src/ClientSubscribe.cxx
+++ b/src/ClientSubscribe.cxx
@@ -20,10 +20,7 @@
#include "ClientSubscribe.hxx"
#include "ClientIdle.hxx"
#include "ClientInternal.hxx"
-
-extern "C" {
-#include "idle.h"
-}
+#include "Idle.hxx"
#include <assert.h>
#include <string.h>
diff --git a/src/idle.c b/src/Idle.cxx
index 2d174d78..4027461c 100644
--- a/src/idle.c
+++ b/src/Idle.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
@@ -23,8 +23,11 @@
*/
#include "config.h"
-#include "idle.h"
+#include "Idle.hxx"
+
+extern "C" {
#include "event_pipe.h"
+}
#include <assert.h>
#include <glib.h>
diff --git a/src/idle.h b/src/Idle.hxx
index 0156933c..e7706130 100644
--- a/src/idle.h
+++ b/src/Idle.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
@@ -22,8 +22,8 @@
*
*/
-#ifndef MPD_IDLE_H
-#define MPD_IDLE_H
+#ifndef MPD_IDLE_HXX
+#define MPD_IDLE_HXX
enum {
/** song database has been updated*/
diff --git a/src/Main.cxx b/src/Main.cxx
index 7ff19538..cd6392d5 100644
--- a/src/Main.cxx
+++ b/src/Main.cxx
@@ -39,11 +39,11 @@
#include "tag.h"
#include "conf.h"
#include "replay_gain_config.h"
+#include "Idle.hxx"
extern "C" {
#include "daemon.h"
#include "io_thread.h"
-#include "idle.h"
#include "path.h"
#include "stats.h"
#include "sig_handlers.h"
diff --git a/src/OtherCommands.cxx b/src/OtherCommands.cxx
index d467c30e..b8cc36cc 100644
--- a/src/OtherCommands.cxx
+++ b/src/OtherCommands.cxx
@@ -44,10 +44,7 @@ extern "C" {
#include "ClientIdle.hxx"
#include "ClientFile.hxx"
#include "Client.hxx"
-
-extern "C" {
-#include "idle.h"
-}
+#include "Idle.hxx"
#ifdef ENABLE_SQLITE
#include "StickerDatabase.hxx"
diff --git a/src/OutputCommand.cxx b/src/OutputCommand.cxx
index 3c9ff56f..f4edaa4a 100644
--- a/src/OutputCommand.cxx
+++ b/src/OutputCommand.cxx
@@ -28,12 +28,12 @@
#include "OutputCommand.hxx"
#include "OutputAll.hxx"
#include "PlayerControl.hxx"
+#include "Idle.hxx"
extern "C" {
#include "output_internal.h"
#include "output_plugin.h"
#include "mixer_control.h"
-#include "idle.h"
}
extern unsigned audio_output_state_version;
diff --git a/src/PlayerControl.cxx b/src/PlayerControl.cxx
index 4fa9f75b..1b5ca597 100644
--- a/src/PlayerControl.cxx
+++ b/src/PlayerControl.cxx
@@ -19,11 +19,7 @@
#include "config.h"
#include "PlayerControl.hxx"
-
-extern "C" {
-#include "idle.h"
-}
-
+#include "Idle.hxx"
#include "song.h"
#include "DecoderControl.hxx"
#include "Main.hxx"
diff --git a/src/PlayerThread.cxx b/src/PlayerThread.cxx
index 44534a7d..bb6f52e0 100644
--- a/src/PlayerThread.cxx
+++ b/src/PlayerThread.cxx
@@ -31,10 +31,10 @@
#include "PlayerControl.hxx"
#include "OutputAll.hxx"
#include "tag.h"
+#include "Idle.hxx"
extern "C" {
#include "event_pipe.h"
-#include "idle.h"
}
#include <cmath>
diff --git a/src/Playlist.cxx b/src/Playlist.cxx
index 4d1d4897..a402471d 100644
--- a/src/Playlist.cxx
+++ b/src/Playlist.cxx
@@ -21,10 +21,7 @@
#include "Playlist.hxx"
#include "PlayerControl.hxx"
#include "song.h"
-
-extern "C" {
-#include "idle.h"
-}
+#include "Idle.hxx"
#include <glib.h>
diff --git a/src/PlaylistEdit.cxx b/src/PlaylistEdit.cxx
index 22b7242c..cdfb7715 100644
--- a/src/PlaylistEdit.cxx
+++ b/src/PlaylistEdit.cxx
@@ -30,9 +30,9 @@
extern "C" {
#include "uri.h"
#include "song.h"
-#include "idle.h"
}
+#include "Idle.hxx"
#include "DatabaseGlue.hxx"
#include "DatabasePlugin.hxx"
diff --git a/src/PlaylistFile.cxx b/src/PlaylistFile.cxx
index a048c02c..d79bea9c 100644
--- a/src/PlaylistFile.cxx
+++ b/src/PlaylistFile.cxx
@@ -29,11 +29,11 @@
#include "Mapper.hxx"
#include "TextFile.hxx"
#include "conf.h"
+#include "Idle.hxx"
extern "C" {
#include "path.h"
#include "uri.h"
-#include "idle.h"
}
#include "glib_compat.h"
diff --git a/src/PlaylistSave.cxx b/src/PlaylistSave.cxx
index e3b95228..74574449 100644
--- a/src/PlaylistSave.cxx
+++ b/src/PlaylistSave.cxx
@@ -23,11 +23,11 @@
#include "Playlist.hxx"
#include "song.h"
#include "Mapper.hxx"
+#include "Idle.hxx"
extern "C" {
#include "path.h"
#include "uri.h"
-#include "idle.h"
}
#include "glib_compat.h"
diff --git a/src/ReplayGainConfig.cxx b/src/ReplayGainConfig.cxx
index 14bb4175..d86c7005 100644
--- a/src/ReplayGainConfig.cxx
+++ b/src/ReplayGainConfig.cxx
@@ -19,11 +19,7 @@
#include "config.h"
#include "replay_gain_config.h"
-
-extern "C" {
-#include "idle.h"
-}
-
+#include "Idle.hxx"
#include "conf.h"
#include "Playlist.hxx"
#include "mpd_error.h"
diff --git a/src/StickerDatabase.cxx b/src/StickerDatabase.cxx
index 3d6e212d..2d77e4b6 100644
--- a/src/StickerDatabase.cxx
+++ b/src/StickerDatabase.cxx
@@ -19,10 +19,7 @@
#include "config.h"
#include "StickerDatabase.hxx"
-
-extern "C" {
-#include "idle.h"
-}
+#include "Idle.hxx"
#include <string>
#include <map>
diff --git a/src/UpdateGlue.cxx b/src/UpdateGlue.cxx
index 2edd19cc..d990ddfe 100644
--- a/src/UpdateGlue.cxx
+++ b/src/UpdateGlue.cxx
@@ -24,10 +24,10 @@
#include "UpdateRemove.hxx"
#include "Mapper.hxx"
#include "DatabaseSimple.hxx"
+#include "Idle.hxx"
extern "C" {
#include "event_pipe.h"
-#include "idle.h"
#include "stats.h"
}
diff --git a/src/Volume.cxx b/src/Volume.cxx
index 2c954fae..a046aa94 100644
--- a/src/Volume.cxx
+++ b/src/Volume.cxx
@@ -20,9 +20,9 @@
#include "config.h"
#include "Volume.hxx"
#include "MixerAll.hxx"
+#include "Idle.hxx"
extern "C" {
-#include "idle.h"
#include "event_pipe.h"
}
diff --git a/test/run_output.cxx b/test/run_output.cxx
index 27318067..97583488 100644
--- a/test/run_output.cxx
+++ b/test/run_output.cxx
@@ -20,6 +20,7 @@
#include "config.h"
#include "OutputControl.hxx"
#include "conf.h"
+#include "Idle.hxx"
extern "C" {
#include "output_plugin.h"
@@ -29,7 +30,6 @@ extern "C" {
#include "filter_registry.h"
#include "pcm_convert.h"
#include "event_pipe.h"
-#include "idle.h"
}
#include "PlayerControl.hxx"