diff options
author | Max Kellermann <max@duempel.org> | 2013-01-09 09:46:44 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-01-09 13:02:13 +0100 |
commit | 3e5f09be0b38e0cc7e5eb8dd623c631b6ba45519 (patch) | |
tree | d9e73087daed58f22861582f7dc3c562c9482273 | |
parent | e86e77ad67f883111d50f0886204ad96c8d0f90b (diff) | |
download | mpd-3e5f09be0b38e0cc7e5eb8dd623c631b6ba45519.tar.gz mpd-3e5f09be0b38e0cc7e5eb8dd623c631b6ba45519.tar.xz mpd-3e5f09be0b38e0cc7e5eb8dd623c631b6ba45519.zip |
event_pipe: convert to C++
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | src/EventPipe.cxx (renamed from src/event_pipe.c) | 4 | ||||
-rw-r--r-- | src/event_pipe.h | 10 |
3 files changed, 12 insertions, 4 deletions
diff --git a/Makefile.am b/Makefile.am index f9cac402c..cff1ca662 100644 --- a/Makefile.am +++ b/Makefile.am @@ -247,7 +247,7 @@ src_mpd_SOURCES = \ src/io_thread.c src/io_thread.h \ src/Main.cxx src/Main.hxx \ src/Win32Main.cxx \ - src/event_pipe.c \ + src/EventPipe.cxx \ src/daemon.c \ src/AudioCompress/compress.c \ src/MusicBuffer.cxx src/MusicBuffer.hxx \ diff --git a/src/event_pipe.c b/src/EventPipe.cxx index d5c3b9564..b2c80a3c1 100644 --- a/src/event_pipe.c +++ b/src/EventPipe.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 @@ -80,7 +80,7 @@ main_notify_event(G_GNUC_UNUSED GIOChannel *source, for (unsigned i = 0; i < PIPE_EVENT_MAX; ++i) if (events[i]) /* invoke the event handler */ - event_pipe_invoke(i); + event_pipe_invoke(pipe_event(i)); return true; } diff --git a/src/event_pipe.h b/src/event_pipe.h index 3749ccf79..7c136304f 100644 --- a/src/event_pipe.h +++ b/src/event_pipe.h @@ -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 @@ -50,6 +50,10 @@ 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); @@ -66,4 +70,8 @@ void event_pipe_emit(enum pipe_event event); */ void event_pipe_emit_fast(enum pipe_event event); +#ifdef __cplusplus +} +#endif + #endif /* MAIN_NOTIFY_H */ |