From 94b2ee627c06679eb2622f2ac2e2fb0240fbab3c Mon Sep 17 00:00:00 2001
From: Max Kellermann <max@duempel.org>
Date: Thu, 3 Jan 2013 11:14:36 +0100
Subject: [PATCH] decoder_print: convert to C++

---
 Makefile.am                               | 3 +--
 src/{decoder_print.c => DecoderPrint.cxx} | 7 +++++--
 src/{decoder_print.h => DecoderPrint.hxx} | 6 +++---
 src/OtherCommands.cxx                     | 2 +-
 4 files changed, 10 insertions(+), 8 deletions(-)
 rename src/{decoder_print.c => DecoderPrint.cxx} (93%)
 rename src/{decoder_print.h => DecoderPrint.hxx} (87%)

diff --git a/Makefile.am b/Makefile.am
index 134f7cada..1535c5e9e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -86,7 +86,6 @@ mpd_headers = \
 	src/glib_compat.h \
 	src/gcc.h \
 	src/decoder_list.h \
-	src/decoder_print.h \
 	src/decoder/pcm_decoder_plugin.h \
 	src/input_init.h \
 	src/input_plugin.h \
@@ -214,7 +213,7 @@ src_mpd_SOURCES = \
 	src/decoder_control.c \
 	src/decoder_api.c \
 	src/decoder_internal.c \
-	src/decoder_print.c \
+	src/DecoderPrint.cxx src/DecoderPrint.hxx \
 	src/Directory.cxx src/Directory.hxx \
 	src/DirectorySave.cxx src/DirectorySave.hxx \
 	src/DatabaseSimple.hxx \
diff --git a/src/decoder_print.c b/src/DecoderPrint.cxx
similarity index 93%
rename from src/decoder_print.c
rename to src/DecoderPrint.cxx
index e14477ed8..a22908c0e 100644
--- a/src/decoder_print.c
+++ b/src/DecoderPrint.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
@@ -18,10 +18,13 @@
  */
 
 #include "config.h"
-#include "decoder_print.h"
+#include "DecoderPrint.hxx"
 #include "decoder_list.h"
 #include "decoder_plugin.h"
+
+extern "C" {
 #include "client.h"
+}
 
 #include <assert.h>
 
diff --git a/src/decoder_print.h b/src/DecoderPrint.hxx
similarity index 87%
rename from src/decoder_print.h
rename to src/DecoderPrint.hxx
index 31713d5d8..e6e14aef3 100644
--- a/src/decoder_print.h
+++ b/src/DecoderPrint.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
@@ -17,8 +17,8 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-#ifndef MPD_DECODER_PRINT_H
-#define MPD_DECODER_PRINT_H
+#ifndef MPD_DECODER_PRINT_HXX
+#define MPD_DECODER_PRINT_HXX
 
 struct client;
 
diff --git a/src/OtherCommands.cxx b/src/OtherCommands.cxx
index 756f8d5b6..66d97d841 100644
--- a/src/OtherCommands.cxx
+++ b/src/OtherCommands.cxx
@@ -28,13 +28,13 @@
 #include "TagPrint.hxx"
 #include "TimePrint.hxx"
 #include "Mapper.hxx"
+#include "DecoderPrint.hxx"
 
 extern "C" {
 #include "protocol/argparser.h"
 #include "protocol/result.h"
 #include "ls.h"
 #include "uri.h"
-#include "decoder_print.h"
 #include "volume.h"
 #include "stats.h"
 }