diff options
author | Max Kellermann <max@duempel.org> | 2014-01-14 21:36:02 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-01-14 22:33:18 +0100 |
commit | 4bcaf5d3064ca8846f8652413b2e0deba80aa624 (patch) | |
tree | 878a2572b645b06d02d678790be096fad72e1d89 /src | |
parent | 70d3ad3ca1d9b273b56e2efc30b265f3a09f8f96 (diff) | |
download | mpd-4bcaf5d3064ca8846f8652413b2e0deba80aa624.tar.gz mpd-4bcaf5d3064ca8846f8652413b2e0deba80aa624.tar.xz mpd-4bcaf5d3064ca8846f8652413b2e0deba80aa624.zip |
db/upnp: move upnp_tags to Tags.cxx
Diffstat (limited to '')
-rw-r--r-- | src/db/UpnpDatabasePlugin.cxx | 12 | ||||
-rw-r--r-- | src/db/upnp/Tags.cxx | 33 | ||||
-rw-r--r-- | src/db/upnp/Tags.hxx | 28 |
3 files changed, 62 insertions, 11 deletions
diff --git a/src/db/UpnpDatabasePlugin.cxx b/src/db/UpnpDatabasePlugin.cxx index 92d520bba..da8aba22c 100644 --- a/src/db/UpnpDatabasePlugin.cxx +++ b/src/db/UpnpDatabasePlugin.cxx @@ -24,6 +24,7 @@ #include "upnp/Discovery.hxx" #include "upnp/ContentDirectoryService.hxx" #include "upnp/Directory.hxx" +#include "upnp/Tags.hxx" #include "upnp/Util.hxx" #include "LazyDatabase.hxx" #include "DatabasePlugin.hxx" @@ -50,17 +51,6 @@ static const char *const rootid = "0"; -static const struct tag_table upnp_tags[] = { - { "upnp:artist", TAG_ARTIST }, - { "upnp:album", TAG_ALBUM }, - { "upnp:originalTrackNumber", TAG_TRACK }, - { "upnp:genre", TAG_GENRE }, - { "dc:title", TAG_TITLE }, - - /* sentinel */ - { nullptr, TAG_NUM_OF_ITEM_TYPES } -}; - class UpnpDatabase : public Database { LibUPnP *m_lib; UPnPDeviceDirectory *m_superdir; diff --git a/src/db/upnp/Tags.cxx b/src/db/upnp/Tags.cxx new file mode 100644 index 000000000..fd65df4d0 --- /dev/null +++ b/src/db/upnp/Tags.cxx @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2003-2014 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 "Tags.hxx" +#include "tag/TagTable.hxx" + +const struct tag_table upnp_tags[] = { + { "upnp:artist", TAG_ARTIST }, + { "upnp:album", TAG_ALBUM }, + { "upnp:originalTrackNumber", TAG_TRACK }, + { "upnp:genre", TAG_GENRE }, + { "dc:title", TAG_TITLE }, + + /* sentinel */ + { nullptr, TAG_NUM_OF_ITEM_TYPES } +}; diff --git a/src/db/upnp/Tags.hxx b/src/db/upnp/Tags.hxx new file mode 100644 index 000000000..ec6d18478 --- /dev/null +++ b/src/db/upnp/Tags.hxx @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2003-2014 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_UPNP_TAGS_HXX +#define MPD_UPNP_TAGS_HXX + +/** + * Map UPnP property names to MPD tags. + */ +extern const struct tag_table upnp_tags[]; + +#endif |