diff options
author | Max Kellermann <max@duempel.org> | 2013-07-30 20:10:24 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-07-30 20:10:24 +0200 |
commit | 6a9ab8bc0e2f5d34803513bb2d94d041a607a58c (patch) | |
tree | 478328936b860507f6d0f77b2c7b3e6711910311 | |
parent | 9a0061c511403bc023430feb91094355da83a663 (diff) |
tag: move enum tag_type to TagType.h
-rw-r--r-- | Makefile.am | 1 | ||||
-rw-r--r-- | src/DatabaseHelpers.hxx | 4 | ||||
-rw-r--r-- | src/DatabasePlugin.hxx | 5 | ||||
-rw-r--r-- | src/IcyMetaDataServer.hxx | 2 | ||||
-rw-r--r-- | src/TagHandler.cxx | 1 | ||||
-rw-r--r-- | src/TagHandler.hxx | 2 | ||||
-rw-r--r-- | src/TagInternal.hxx | 2 | ||||
-rw-r--r-- | src/TagNames.c | 2 | ||||
-rw-r--r-- | src/TagPool.cxx | 1 | ||||
-rw-r--r-- | src/TagPool.hxx | 2 | ||||
-rw-r--r-- | src/TagTable.hxx | 4 | ||||
-rw-r--r-- | src/TagType.h | 56 | ||||
-rw-r--r-- | src/UpdateContainer.cxx | 1 | ||||
-rw-r--r-- | src/db/ProxyDatabasePlugin.cxx | 1 | ||||
-rw-r--r-- | src/tag.h | 34 |
15 files changed, 73 insertions, 45 deletions
diff --git a/Makefile.am b/Makefile.am index 8cd35b9a1..c26c2347b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -216,6 +216,7 @@ src_mpd_SOURCES = \ src/SocketUtil.cxx src/SocketUtil.hxx \ src/StateFile.cxx src/StateFile.hxx \ src/Stats.cxx \ + src/TagType.h \ src/Tag.cxx \ src/TagTable.hxx \ src/TagNames.c \ diff --git a/src/DatabaseHelpers.hxx b/src/DatabaseHelpers.hxx index cfcc94ac7..5b71fd2fb 100644 --- a/src/DatabaseHelpers.hxx +++ b/src/DatabaseHelpers.hxx @@ -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 @@ -21,7 +21,7 @@ #define MPD_MEMORY_DATABASE_PLUGIN_HXX #include "DatabaseVisitor.hxx" -#include "tag.h" +#include "TagType.h" #include "gcc.h" class Database; diff --git a/src/DatabasePlugin.hxx b/src/DatabasePlugin.hxx index f5406328c..d7532ae0e 100644 --- a/src/DatabasePlugin.hxx +++ b/src/DatabasePlugin.hxx @@ -27,12 +27,9 @@ #define MPD_DATABASE_PLUGIN_HXX #include "DatabaseVisitor.hxx" +#include "TagType.h" #include "gcc.h" -extern "C" { -#include "tag.h" -} - struct config_param; struct DatabaseSelection; struct db_visitor; diff --git a/src/IcyMetaDataServer.hxx b/src/IcyMetaDataServer.hxx index b344c61f2..3ff493017 100644 --- a/src/IcyMetaDataServer.hxx +++ b/src/IcyMetaDataServer.hxx @@ -20,7 +20,7 @@ #ifndef MPD_ICY_META_DATA_SERVER_HXX #define MPD_ICY_META_DATA_SERVER_HXX -#include "tag.h" +#include "TagType.h" class Page; diff --git a/src/TagHandler.cxx b/src/TagHandler.cxx index 6f95c7e94..d3dfef497 100644 --- a/src/TagHandler.cxx +++ b/src/TagHandler.cxx @@ -19,6 +19,7 @@ #include "config.h" #include "TagHandler.hxx" +#include "tag.h" #include <glib.h> diff --git a/src/TagHandler.hxx b/src/TagHandler.hxx index 967b91de7..3303dd27e 100644 --- a/src/TagHandler.hxx +++ b/src/TagHandler.hxx @@ -21,7 +21,7 @@ #define MPD_TAG_HANDLER_HXX #include "check.h" -#include "tag.h" +#include "TagType.h" #include <assert.h> diff --git a/src/TagInternal.hxx b/src/TagInternal.hxx index afce0427e..8172d1319 100644 --- a/src/TagInternal.hxx +++ b/src/TagInternal.hxx @@ -20,7 +20,7 @@ #ifndef MPD_TAG_INTERNAL_HXX #define MPD_TAG_INTERNAL_HXX -#include "tag.h" +#include "TagType.h" extern bool ignore_tag_items[TAG_NUM_OF_ITEM_TYPES]; diff --git a/src/TagNames.c b/src/TagNames.c index eca320afb..2e318f913 100644 --- a/src/TagNames.c +++ b/src/TagNames.c @@ -18,7 +18,7 @@ */ #include "config.h" -#include "tag.h" +#include "TagType.h" const char *tag_item_names[TAG_NUM_OF_ITEM_TYPES] = { [TAG_ARTIST] = "Artist", diff --git a/src/TagPool.cxx b/src/TagPool.cxx index a9b892845..030f90225 100644 --- a/src/TagPool.cxx +++ b/src/TagPool.cxx @@ -19,6 +19,7 @@ #include "config.h" #include "TagPool.hxx" +#include "tag.h" #include <glib.h> diff --git a/src/TagPool.hxx b/src/TagPool.hxx index 649cef6e5..3a6897607 100644 --- a/src/TagPool.hxx +++ b/src/TagPool.hxx @@ -20,7 +20,7 @@ #ifndef MPD_TAG_POOL_HXX #define MPD_TAG_POOL_HXX -#include "tag.h" +#include "TagType.h" #include "thread/Mutex.hxx" extern Mutex tag_pool_lock; diff --git a/src/TagTable.hxx b/src/TagTable.hxx index 0d249d181..70c02e6e5 100644 --- a/src/TagTable.hxx +++ b/src/TagTable.hxx @@ -20,11 +20,13 @@ #ifndef MPD_TAG_TABLE_HXX #define MPD_TAG_TABLE_HXX -#include "tag.h" +#include "TagType.h" #include "gcc.h" #include <glib.h> +#include <string.h> + struct tag_table { const char *name; diff --git a/src/TagType.h b/src/TagType.h new file mode 100644 index 000000000..7a1d351a5 --- /dev/null +++ b/src/TagType.h @@ -0,0 +1,56 @@ +/* + * 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_TAG_TYPE_H +#define MPD_TAG_TYPE_H + +/** + * Codes for the type of a tag item. + */ +enum tag_type { + TAG_ARTIST, + TAG_ARTIST_SORT, + TAG_ALBUM, + TAG_ALBUM_ARTIST, + TAG_ALBUM_ARTIST_SORT, + TAG_TITLE, + TAG_TRACK, + TAG_NAME, + TAG_GENRE, + TAG_DATE, + TAG_COMPOSER, + TAG_PERFORMER, + TAG_COMMENT, + TAG_DISC, + + TAG_MUSICBRAINZ_ARTISTID, + TAG_MUSICBRAINZ_ALBUMID, + TAG_MUSICBRAINZ_ALBUMARTISTID, + TAG_MUSICBRAINZ_TRACKID, + + TAG_NUM_OF_ITEM_TYPES +}; + +/** + * An array of strings, which map the #tag_type to its machine + * readable name (specific to the MPD protocol). + */ +extern const char *tag_item_names[]; + +#endif diff --git a/src/UpdateContainer.cxx b/src/UpdateContainer.cxx index 9da58567c..6a6d756aa 100644 --- a/src/UpdateContainer.cxx +++ b/src/UpdateContainer.cxx @@ -28,6 +28,7 @@ #include "Mapper.hxx" #include "fs/Path.hxx" #include "TagHandler.hxx" +#include "tag.h" #include <glib.h> diff --git a/src/db/ProxyDatabasePlugin.cxx b/src/db/ProxyDatabasePlugin.cxx index 6f39eeea7..21224e022 100644 --- a/src/db/ProxyDatabasePlugin.cxx +++ b/src/db/ProxyDatabasePlugin.cxx @@ -26,6 +26,7 @@ #include "Song.hxx" #include "gcc.h" #include "conf.h" +#include "tag.h" extern "C" { #include "db_error.h" @@ -20,6 +20,7 @@ #ifndef MPD_TAG_H #define MPD_TAG_H +#include "TagType.h" #include "gcc.h" #include <stdint.h> @@ -28,39 +29,6 @@ #include <string.h> /** - * Codes for the type of a tag item. - */ -enum tag_type { - TAG_ARTIST, - TAG_ARTIST_SORT, - TAG_ALBUM, - TAG_ALBUM_ARTIST, - TAG_ALBUM_ARTIST_SORT, - TAG_TITLE, - TAG_TRACK, - TAG_NAME, - TAG_GENRE, - TAG_DATE, - TAG_COMPOSER, - TAG_PERFORMER, - TAG_COMMENT, - TAG_DISC, - - TAG_MUSICBRAINZ_ARTISTID, - TAG_MUSICBRAINZ_ALBUMID, - TAG_MUSICBRAINZ_ALBUMARTISTID, - TAG_MUSICBRAINZ_TRACKID, - - TAG_NUM_OF_ITEM_TYPES -}; - -/** - * An array of strings, which map the #tag_type to its machine - * readable name (specific to the MPD protocol). - */ -extern const char *tag_item_names[]; - -/** * One tag value. It is a mapping of #tag_type to am arbitrary string * value. Each tag can have multiple items of one tag type (although * few clients support that). |