summaryrefslogtreecommitdiff
path: root/src/db/Interface.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2018-10-22 11:35:22 +0200
committerMax Kellermann <max@musicpd.org>2018-10-22 13:08:24 +0200
commitdb27bb76e280c69d70bc14f0b0161e89d496a3c8 (patch)
tree6efdf274058eea88b99ac92155aae1d7e83e03c6 /src/db/Interface.hxx
parent7cfe929c3692e74f4e6073960eaf0e08a9989811 (diff)
db: fix broken command "list ... group"
Grouping in the "list" command was completely broken from the start, unlike "count group". I have no idea what I have been thinking when I wrote commit ae178c77bdc47c954fd9a4b32ffc07fe6c4a8a49, but it didn't make any sense. This commit is a rewrite of the feature. For clients to be able to detect this feature, this commit also increments the protocol version.
Diffstat (limited to 'src/db/Interface.hxx')
-rw-r--r--src/db/Interface.hxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/db/Interface.hxx b/src/db/Interface.hxx
index a61c323d3..656dfaa76 100644
--- a/src/db/Interface.hxx
+++ b/src/db/Interface.hxx
@@ -22,9 +22,12 @@
#include "Visitor.hxx"
#include "tag/TagType.h"
-#include "tag/Mask.hxx"
#include "Compiler.h"
+#include <map>
+#include <set>
+#include <string>
+
#include <time.h>
struct DatabasePlugin;
@@ -99,12 +102,9 @@ public:
return Visit(selection, VisitDirectory(), visit_song);
}
- /**
- * Visit all unique tag values.
- */
- virtual void VisitUniqueTags(const DatabaseSelection &selection,
- TagType tag_type, tag_mask_t group_mask,
- VisitTag visit_tag) const = 0;
+ virtual std::map<std::string, std::set<std::string>> CollectUniqueTags(const DatabaseSelection &selection,
+ TagType tag_type,
+ TagType group=TAG_NUM_OF_ITEM_TYPES) const = 0;
virtual DatabaseStats GetStats(const DatabaseSelection &selection) const = 0;