From 718fd97612c298b7eac47289c1803a2a19d9a859 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 30 Jan 2013 09:08:50 +0100 Subject: [PATCH] icy_server: convert to C++ --- Makefile.am | 3 +-- src/{icy_server.c => IcyMetaDataServer.cxx} | 6 ++++-- src/{icy_server.h => IcyMetaDataServer.hxx} | 15 +++------------ src/output/HttpdClient.cxx | 2 +- src/output/HttpdOutputPlugin.cxx | 2 +- 5 files changed, 10 insertions(+), 18 deletions(-) rename src/{icy_server.c => IcyMetaDataServer.cxx} (96%) rename src/{icy_server.h => IcyMetaDataServer.hxx} (84%) diff --git a/Makefile.am b/Makefile.am index 3a1c72a9e..c14ff2ed8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -81,7 +81,6 @@ mpd_headers = \ src/decoder/pcm_decoder_plugin.h \ src/input_stream.h \ src/text_input_stream.h \ - src/icy_server.h \ src/ls.h \ src/mixer_api.h \ src/mixer_control.h \ @@ -889,7 +888,7 @@ endif if ENABLE_HTTPD_OUTPUT liboutput_plugins_a_SOURCES += \ - src/icy_server.c \ + src/IcyMetaDataServer.cxx src/IcyMetaDataServer.hxx \ src/output/HttpdInternal.hxx \ src/output/HttpdClient.cxx src/output/HttpdClient.hxx \ src/output/HttpdOutputPlugin.cxx src/output/HttpdOutputPlugin.hxx diff --git a/src/icy_server.c b/src/IcyMetaDataServer.cxx similarity index 96% rename from src/icy_server.c rename to src/IcyMetaDataServer.cxx index 4971bc0ee..e7bd0acf4 100644 --- a/src/icy_server.c +++ b/src/IcyMetaDataServer.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,7 +18,9 @@ */ #include "config.h" -#include "icy_server.h" +#include "IcyMetaDataServer.hxx" +#include "page.h" +#include "tag.h" #include diff --git a/src/icy_server.h b/src/IcyMetaDataServer.hxx similarity index 84% rename from src/icy_server.h rename to src/IcyMetaDataServer.hxx index 15f6f36b7..78f1be7db 100644 --- a/src/icy_server.h +++ b/src/IcyMetaDataServer.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,16 +17,11 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifndef ICY_SERVER_H -#define ICY_SERVER_H +#ifndef MPD_ICY_META_DATA_SERVER_HXX +#define MPD_ICY_META_DATA_SERVER_HXX -#include "page.h" #include "tag.h" -#ifdef __cplusplus -extern "C" { -#endif - char* icy_server_metadata_header(const char *name, const char *genre, const char *url, @@ -35,8 +30,4 @@ icy_server_metadata_header(const char *name, struct page* icy_server_metadata_page(const struct tag *tag, const enum tag_type *types); -#ifdef __cplusplus -} -#endif - #endif diff --git a/src/output/HttpdClient.cxx b/src/output/HttpdClient.cxx index 0d0e3c949..5ac3bf7cc 100644 --- a/src/output/HttpdClient.cxx +++ b/src/output/HttpdClient.cxx @@ -22,7 +22,7 @@ #include "HttpdInternal.hxx" #include "util/fifo_buffer.h" #include "page.h" -#include "icy_server.h" +#include "IcyMetaDataServer.hxx" #include "glib_socket.h" #include diff --git a/src/output/HttpdOutputPlugin.cxx b/src/output/HttpdOutputPlugin.cxx index c6367cd21..52b2e0e8d 100644 --- a/src/output/HttpdOutputPlugin.cxx +++ b/src/output/HttpdOutputPlugin.cxx @@ -26,7 +26,7 @@ #include "encoder_list.h" #include "resolver.h" #include "page.h" -#include "icy_server.h" +#include "IcyMetaDataServer.hxx" #include "fd_util.h" #include "ServerSocket.hxx" #include "Main.hxx"