From bd42aeab462887a0e5b98ca5d3f80f700046ba52 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 29 Jul 2013 07:42:50 +0200 Subject: XiphTags: convert to C++ --- Makefile.am | 2 +- src/decoder/FlacMetadata.cxx | 8 ++------ src/decoder/OpusTags.cxx | 4 ++-- src/decoder/VorbisComments.cxx | 2 +- src/decoder/XiphTags.c | 28 ---------------------------- src/decoder/XiphTags.cxx | 28 ++++++++++++++++++++++++++++ src/decoder/XiphTags.h | 28 ---------------------------- src/decoder/XiphTags.hxx | 28 ++++++++++++++++++++++++++++ 8 files changed, 62 insertions(+), 66 deletions(-) delete mode 100644 src/decoder/XiphTags.c create mode 100644 src/decoder/XiphTags.cxx delete mode 100644 src/decoder/XiphTags.h create mode 100644 src/decoder/XiphTags.hxx diff --git a/Makefile.am b/Makefile.am index 528f9c87f..e70b5df04 100644 --- a/Makefile.am +++ b/Makefile.am @@ -541,7 +541,7 @@ endif if HAVE_XIPH libdecoder_plugins_a_SOURCES += \ - src/decoder/XiphTags.c src/decoder/XiphTags.h \ + src/decoder/XiphTags.cxx src/decoder/XiphTags.hxx \ src/decoder/OggCodec.cxx src/decoder/OggCodec.hxx endif diff --git a/src/decoder/FlacMetadata.cxx b/src/decoder/FlacMetadata.cxx index 02a5f509e..9c227e546 100644 --- a/src/decoder/FlacMetadata.cxx +++ b/src/decoder/FlacMetadata.cxx @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2012 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 @@ -19,11 +19,7 @@ #include "config.h" #include "FlacMetadata.hxx" - -extern "C" { -#include "XiphTags.h" -} - +#include "XiphTags.hxx" #include "tag.h" #include "TagHandler.hxx" #include "tag_table.h" diff --git a/src/decoder/OpusTags.cxx b/src/decoder/OpusTags.cxx index fec47a28d..a63dc1c24 100644 --- a/src/decoder/OpusTags.cxx +++ b/src/decoder/OpusTags.cxx @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2012 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 @@ -20,7 +20,7 @@ #include "config.h" #include "OpusTags.hxx" #include "OpusReader.hxx" -#include "XiphTags.h" +#include "XiphTags.hxx" #include "TagHandler.hxx" #include diff --git a/src/decoder/VorbisComments.cxx b/src/decoder/VorbisComments.cxx index 47e853762..dfb9dc314 100644 --- a/src/decoder/VorbisComments.cxx +++ b/src/decoder/VorbisComments.cxx @@ -19,7 +19,7 @@ #include "config.h" #include "VorbisComments.hxx" -#include "XiphTags.h" +#include "XiphTags.hxx" #include "tag.h" #include "tag_table.h" #include "TagHandler.hxx" diff --git a/src/decoder/XiphTags.c b/src/decoder/XiphTags.c deleted file mode 100644 index d55787b94..000000000 --- a/src/decoder/XiphTags.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2003-2012 The Music Player Daemon Project - * http://www.musicpd.org - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#include "config.h" -#include "XiphTags.h" - -const struct tag_table xiph_tags[] = { - { "tracknumber", TAG_TRACK }, - { "discnumber", TAG_DISC }, - { "album artist", TAG_ALBUM_ARTIST }, - { NULL, TAG_NUM_OF_ITEM_TYPES } -}; diff --git a/src/decoder/XiphTags.cxx b/src/decoder/XiphTags.cxx new file mode 100644 index 000000000..b2aa6e82d --- /dev/null +++ b/src/decoder/XiphTags.cxx @@ -0,0 +1,28 @@ +/* + * 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 + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#include "config.h" +#include "XiphTags.hxx" + +const struct tag_table xiph_tags[] = { + { "tracknumber", TAG_TRACK }, + { "discnumber", TAG_DISC }, + { "album artist", TAG_ALBUM_ARTIST }, + { NULL, TAG_NUM_OF_ITEM_TYPES } +}; diff --git a/src/decoder/XiphTags.h b/src/decoder/XiphTags.h deleted file mode 100644 index 22a4e2204..000000000 --- a/src/decoder/XiphTags.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2003-2012 The Music Player Daemon Project - * http://www.musicpd.org - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#ifndef MPD_XIPH_TAGS_H -#define MPD_XIPH_TAGS_H - -#include "check.h" -#include "tag_table.h" - -extern const struct tag_table xiph_tags[]; - -#endif diff --git a/src/decoder/XiphTags.hxx b/src/decoder/XiphTags.hxx new file mode 100644 index 000000000..03a75b731 --- /dev/null +++ b/src/decoder/XiphTags.hxx @@ -0,0 +1,28 @@ +/* + * 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 + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#ifndef MPD_XIPH_TAGS_HXX +#define MPD_XIPH_TAGS_HXX + +#include "check.h" +#include "tag_table.h" + +extern const struct tag_table xiph_tags[]; + +#endif -- cgit v1.2.3