20 #ifndef MPD_SONG_FILTER_HXX
21 #define MPD_SONG_FILTER_HXX
34 #define LOCATE_TAG_BASE_TYPE (TAG_NUM_OF_ITEM_TYPES + 1)
35 #define LOCATE_TAG_MODIFIED_SINCE (TAG_NUM_OF_ITEM_TYPES + 2)
37 #define LOCATE_TAG_FILE_TYPE TAG_NUM_OF_ITEM_TYPES+10
38 #define LOCATE_TAG_ANY_TYPE TAG_NUM_OF_ITEM_TYPES+20
62 Item(
unsigned tag, const
char *value,
bool fold_case=false);
63 Item(
unsigned tag, time_t time);
68 Item &operator=(const
Item &other) = delete;
83 bool StringMatch(const
char *s) const;
99 std::list<
Item> items;
105 SongFilter(
unsigned tag, const
char *value,
bool fold_case=false);
110 bool Parse(const
char *tag, const
char *value,
bool fold_case=false);
129 return items.empty();
137 for (
const auto &i : items)
The meta information about a song file.
gcc_pure bool IsEmpty() const
gcc_pure bool Match(const TagItem &tag_item) const
gcc_nonnull(3) Item(unsigned tag
bool Parse(ConstBuffer< const char * > args, bool fold_case=false)
const std::list< Item > & GetItems() const
A string pointer whose memory is managed by this class.
gcc_pure const char * GetBase() const
Returns the "base" specification (if there is one) or nullptr.
const char * GetValue() const
A reference to a memory area that is read-only.
gcc_pure unsigned locate_parse_type(const char *str)
constexpr const_pointer_type c_str() const
gcc_pure bool HasFoldCase() const
Is there at least one item with "fold case" enabled?
A reference to a song file.
gcc_pure bool HasOtherThanBase() const
Does this filter contain constraints other than "base"?