aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am1
-rw-r--r--src/db/UpnpDatabasePlugin.cxx12
-rw-r--r--src/db/upnp/Tags.cxx33
-rw-r--r--src/db/upnp/Tags.hxx28
4 files changed, 63 insertions, 11 deletions
diff --git a/Makefile.am b/Makefile.am
index e0fcde553..4d33e377b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -413,6 +413,7 @@ DB_LIBS = \
if HAVE_LIBUPNP
libdb_plugins_a_SOURCES += \
src/db/UpnpDatabasePlugin.cxx src/db/UpnpDatabasePlugin.hxx \
+ src/db/upnp/Tags.cxx src/db/upnp/Tags.hxx \
src/db/upnp/ContentDirectoryService.cxx src/db/upnp/ContentDirectoryService.hxx \
src/db/upnp/Device.cxx src/db/upnp/Device.hxx \
src/db/upnp/Directory.cxx src/db/upnp/Directory.hxx \
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