aboutsummaryrefslogtreecommitdiffstats
path: root/src/DatabasePlugin.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2012-08-15 21:32:34 +0200
committerMax Kellermann <max@duempel.org>2012-08-15 23:02:27 +0200
commita6ac0f89656b9ef374703d24bbb27316a705eadc (patch)
tree3706b1b8474ae06890595a8e20c8be011f6a162b /src/DatabasePlugin.hxx
parent4e1eb03287c1af889372ed4c63220a88d2032f78 (diff)
downloadmpd-a6ac0f89656b9ef374703d24bbb27316a705eadc.tar.gz
mpd-a6ac0f89656b9ef374703d24bbb27316a705eadc.tar.xz
mpd-a6ac0f89656b9ef374703d24bbb27316a705eadc.zip
DatabasePlugin: add method VisitUniqueTags()
Optimize the ProxyDatabase by invoking "list" on the peer, instead of visiting all songs.
Diffstat (limited to '')
-rw-r--r--src/DatabasePlugin.hxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/DatabasePlugin.hxx b/src/DatabasePlugin.hxx
index 31b2a1024..a6168b628 100644
--- a/src/DatabasePlugin.hxx
+++ b/src/DatabasePlugin.hxx
@@ -29,6 +29,10 @@
#include "DatabaseVisitor.hxx"
#include "gcc.h"
+extern "C" {
+#include "tag.h"
+}
+
struct config_param;
struct DatabaseSelection;
struct db_visitor;
@@ -82,6 +86,14 @@ public:
GError **error_r) const {
return Visit(selection, VisitDirectory(), visit_song, error_r);
}
+
+ /**
+ * Visit all unique tag values.
+ */
+ virtual bool VisitUniqueTags(const DatabaseSelection &selection,
+ enum tag_type tag_type,
+ VisitString visit_string,
+ GError **error_r) const = 0;
};
struct DatabasePlugin {