Commit 6a9ab8bc authored by Max Kellermann's avatar Max Kellermann

tag: move enum tag_type to TagType.h

parent 9a0061c5
......@@ -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 \
......
/*
* 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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -19,6 +19,7 @@
#include "config.h"
#include "TagHandler.hxx"
#include "tag.h"
#include <glib.h>
......
......@@ -21,7 +21,7 @@
#define MPD_TAG_HANDLER_HXX
#include "check.h"
#include "tag.h"
#include "TagType.h"
#include <assert.h>
......
......@@ -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];
......
......@@ -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",
......
......@@ -19,6 +19,7 @@
#include "config.h"
#include "TagPool.hxx"
#include "tag.h"
#include <glib.h>
......
......@@ -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;
......
......@@ -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;
......
/*
* 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
......@@ -28,6 +28,7 @@
#include "Mapper.hxx"
#include "fs/Path.hxx"
#include "TagHandler.hxx"
#include "tag.h"
#include <glib.h>
......
......@@ -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).
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment