diff --git a/Makefile.am b/Makefile.am index 779ddc1a3..a564c78ba 100644 --- a/Makefile.am +++ b/Makefile.am @@ -96,7 +96,6 @@ mpd_headers = \ src/mixer_api.h \ src/mixer_control.h \ src/mixer_list.h \ - src/event_pipe.h \ src/mixer_plugin.h \ src/mixer_type.h \ src/mixer/software_mixer_plugin.h \ @@ -244,7 +243,7 @@ src_mpd_SOURCES = \ src/io_thread.c src/io_thread.h \ src/Main.cxx src/Main.hxx \ src/Win32Main.cxx \ - src/EventPipe.cxx \ + src/EventPipe.cxx src/EventPipe.hxx \ src/daemon.c \ src/AudioCompress/compress.c \ src/MusicBuffer.cxx src/MusicBuffer.hxx \ diff --git a/src/EventPipe.cxx b/src/EventPipe.cxx index b2c80a3c1..6c885c01b 100644 --- a/src/EventPipe.cxx +++ b/src/EventPipe.cxx @@ -18,7 +18,7 @@ */ #include "config.h" -#include "event_pipe.h" +#include "EventPipe.hxx" #include "fd_util.h" #include "mpd_error.h" diff --git a/src/event_pipe.h b/src/EventPipe.hxx similarity index 94% rename from src/event_pipe.h rename to src/EventPipe.hxx index 7c136304f..f7a0c30f3 100644 --- a/src/event_pipe.h +++ b/src/EventPipe.hxx @@ -17,8 +17,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifndef EVENT_PIPE_H -#define EVENT_PIPE_H +#ifndef MPD_EVENT_PIPE_HXX +#define MPD_EVENT_PIPE_HXX enum pipe_event { /** database update was finished */ @@ -50,10 +50,6 @@ enum pipe_event { typedef void (*event_pipe_callback_t)(void); -#ifdef __cplusplus -extern "C" { -#endif - void event_pipe_init(void); void event_pipe_deinit(void); @@ -70,8 +66,4 @@ void event_pipe_emit(enum pipe_event event); */ void event_pipe_emit_fast(enum pipe_event event); -#ifdef __cplusplus -} -#endif - #endif /* MAIN_NOTIFY_H */ diff --git a/src/Idle.cxx b/src/Idle.cxx index 4027461c2..0d42f7dd5 100644 --- a/src/Idle.cxx +++ b/src/Idle.cxx @@ -24,10 +24,7 @@ #include "config.h" #include "Idle.hxx" - -extern "C" { -#include "event_pipe.h" -} +#include "EventPipe.hxx" #include #include diff --git a/src/Main.cxx b/src/Main.cxx index c66943070..a158b5e2f 100644 --- a/src/Main.cxx +++ b/src/Main.cxx @@ -43,6 +43,7 @@ #include "Idle.hxx" #include "SignalHandlers.hxx" #include "Log.hxx" +#include "EventPipe.hxx" extern "C" { #include "daemon.h" @@ -55,7 +56,6 @@ extern "C" { #include "input_init.h" #include "playlist_list.h" #include "zeroconf.h" -#include "event_pipe.h" } #include "mpd_error.h" diff --git a/src/PlayerThread.cxx b/src/PlayerThread.cxx index bb6f52e02..14c8a03f2 100644 --- a/src/PlayerThread.cxx +++ b/src/PlayerThread.cxx @@ -32,10 +32,7 @@ #include "OutputAll.hxx" #include "tag.h" #include "Idle.hxx" - -extern "C" { -#include "event_pipe.h" -} +#include "EventPipe.hxx" #include diff --git a/src/PlaylistGlobal.cxx b/src/PlaylistGlobal.cxx index 1a5f11410..87f362a2e 100644 --- a/src/PlaylistGlobal.cxx +++ b/src/PlaylistGlobal.cxx @@ -27,10 +27,7 @@ #include "Playlist.hxx" #include "Main.hxx" #include "Partition.hxx" - -extern "C" { -#include "event_pipe.h" -} +#include "EventPipe.hxx" static void playlist_tag_event(void) diff --git a/src/SignalHandlers.cxx b/src/SignalHandlers.cxx index dfef9bf84..14da08c7b 100644 --- a/src/SignalHandlers.cxx +++ b/src/SignalHandlers.cxx @@ -24,7 +24,7 @@ #include "Log.hxx" #include "Main.hxx" -#include "event_pipe.h" +#include "EventPipe.hxx" #include "mpd_error.h" #include diff --git a/src/UpdateGlue.cxx b/src/UpdateGlue.cxx index 984535bef..fba4c1862 100644 --- a/src/UpdateGlue.cxx +++ b/src/UpdateGlue.cxx @@ -25,9 +25,9 @@ #include "Mapper.hxx" #include "DatabaseSimple.hxx" #include "Idle.hxx" +#include "EventPipe.hxx" extern "C" { -#include "event_pipe.h" #include "stats.h" } diff --git a/src/UpdateRemove.cxx b/src/UpdateRemove.cxx index 41aa51773..afa7c2931 100644 --- a/src/UpdateRemove.cxx +++ b/src/UpdateRemove.cxx @@ -21,10 +21,7 @@ #include "UpdateRemove.hxx" #include "Playlist.hxx" #include "Partition.hxx" - -extern "C" { -#include "event_pipe.h" -} +#include "EventPipe.hxx" #include "song.h" #include "Main.hxx" diff --git a/src/Volume.cxx b/src/Volume.cxx index a046aa942..6a71a6964 100644 --- a/src/Volume.cxx +++ b/src/Volume.cxx @@ -21,10 +21,7 @@ #include "Volume.hxx" #include "MixerAll.hxx" #include "Idle.hxx" - -extern "C" { -#include "event_pipe.h" -} +#include "EventPipe.hxx" #include diff --git a/src/Win32Main.cxx b/src/Win32Main.cxx index 8543ea108..710811f47 100644 --- a/src/Win32Main.cxx +++ b/src/Win32Main.cxx @@ -23,10 +23,7 @@ #ifdef WIN32 #include "mpd_error.h" - -extern "C" { -#include "event_pipe.h" -} +#include "EventPipe.hxx" #include diff --git a/src/mixer/AlsaMixerPlugin.cxx b/src/mixer/AlsaMixerPlugin.cxx index 6623d12ec..f00bfcb9d 100644 --- a/src/mixer/AlsaMixerPlugin.cxx +++ b/src/mixer/AlsaMixerPlugin.cxx @@ -20,7 +20,7 @@ #include "config.h" #include "mixer_api.h" #include "output_api.h" -#include "event_pipe.h" +#include "EventPipe.hxx" #include #include diff --git a/src/mixer/PulseMixerPlugin.cxx b/src/mixer/PulseMixerPlugin.cxx index 509b91bc8..3b7937560 100644 --- a/src/mixer/PulseMixerPlugin.cxx +++ b/src/mixer/PulseMixerPlugin.cxx @@ -22,7 +22,7 @@ #include "mixer_api.h" #include "output/pulse_output_plugin.h" #include "conf.h" -#include "event_pipe.h" +#include "EventPipe.hxx" #include diff --git a/test/read_mixer.c b/test/read_mixer.cxx similarity index 98% rename from test/read_mixer.c rename to test/read_mixer.cxx index f6de8177d..c9392ab78 100644 --- a/test/read_mixer.c +++ b/test/read_mixer.cxx @@ -18,11 +18,15 @@ */ #include "config.h" + +extern "C" { #include "mixer_control.h" #include "mixer_list.h" #include "filter_registry.h" +} + #include "pcm_volume.h" -#include "event_pipe.h" +#include "EventPipe.hxx" #include diff --git a/test/run_output.cxx b/test/run_output.cxx index 97583488a..68df5e459 100644 --- a/test/run_output.cxx +++ b/test/run_output.cxx @@ -21,6 +21,7 @@ #include "OutputControl.hxx" #include "conf.h" #include "Idle.hxx" +#include "EventPipe.hxx" extern "C" { #include "output_plugin.h" @@ -29,7 +30,6 @@ extern "C" { #include "audio_parser.h" #include "filter_registry.h" #include "pcm_convert.h" -#include "event_pipe.h" } #include "PlayerControl.hxx"