aboutsummaryrefslogtreecommitdiffstats
path: root/src/SongFilter.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/SongFilter.hxx')
-rw-r--r--src/SongFilter.hxx26
1 files changed, 21 insertions, 5 deletions
diff --git a/src/SongFilter.hxx b/src/SongFilter.hxx
index 8c46ed5f3..f51bd85c6 100644
--- a/src/SongFilter.hxx
+++ b/src/SongFilter.hxx
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003-2013 The Music Player Daemon Project
+ * 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
@@ -26,18 +26,23 @@
#include <string>
#include <stdint.h>
+#include <time.h>
/**
* Limit the search to files within the given directory.
*/
#define LOCATE_TAG_BASE_TYPE (TAG_NUM_OF_ITEM_TYPES + 1)
+#define LOCATE_TAG_MODIFIED_SINCE (TAG_NUM_OF_ITEM_TYPES + 2)
#define LOCATE_TAG_FILE_TYPE TAG_NUM_OF_ITEM_TYPES+10
#define LOCATE_TAG_ANY_TYPE TAG_NUM_OF_ITEM_TYPES+20
+template<typename T> struct ConstBuffer;
struct Tag;
struct TagItem;
struct Song;
+struct LightSong;
+class DetachedSong;
class SongFilter {
public:
@@ -48,9 +53,15 @@ public:
std::string value;
+ /**
+ * For #LOCATE_TAG_MODIFIED_SINCE
+ */
+ time_t time;
+
public:
gcc_nonnull(3)
Item(unsigned tag, const char *value, bool fold_case=false);
+ Item(unsigned tag, time_t time);
Item(const Item &other) = delete;
Item(Item &&) = default;
@@ -79,7 +90,10 @@ public:
bool Match(const Tag &tag) const;
gcc_pure
- bool Match(const Song &song) const;
+ bool Match(const DetachedSong &song) const;
+
+ gcc_pure
+ bool Match(const LightSong &song) const;
};
private:
@@ -96,14 +110,16 @@ public:
gcc_nonnull(2,3)
bool Parse(const char *tag, const char *value, bool fold_case=false);
- gcc_nonnull(3)
- bool Parse(unsigned argc, char *argv[], bool fold_case=false);
+ bool Parse(ConstBuffer<const char *> args, bool fold_case=false);
gcc_pure
bool Match(const Tag &tag) const;
gcc_pure
- bool Match(const Song &song) const;
+ bool Match(const DetachedSong &song) const;
+
+ gcc_pure
+ bool Match(const LightSong &song) const;
const std::list<Item> &GetItems() const {
return items;