20 #ifndef MPD_SONG_FILTER_HXX 21 #define MPD_SONG_FILTER_HXX 35 #define LOCATE_TAG_BASE_TYPE (TAG_NUM_OF_ITEM_TYPES + 1) 36 #define LOCATE_TAG_MODIFIED_SINCE (TAG_NUM_OF_ITEM_TYPES + 2) 38 #define LOCATE_TAG_FILE_TYPE TAG_NUM_OF_ITEM_TYPES+10 39 #define LOCATE_TAG_ANY_TYPE TAG_NUM_OF_ITEM_TYPES+20 66 Item(
unsigned tag, const
char *value,
bool fold_case=false);
67 Item(
unsigned tag, time_t time);
72 Item &operator=(const
Item &other) = delete;
87 bool StringMatch(const
char *s) const noexcept;
93 bool Match(const
Tag &tag) const noexcept;
103 std::list<
Item> items;
109 SongFilter(
unsigned tag, const
char *value,
bool fold_case=false);
114 bool Parse(const
char *tag, const
char *value,
bool fold_case=false);
119 bool Match(const
Tag &tag) const noexcept;
133 return items.empty();
141 for (
const auto &i : items)
159 const
char *
GetBase() const noexcept;
The meta information about a song file.
bool Parse(ConstBuffer< const char *> args, bool fold_case=false)
const std::list< Item > & GetItems() const noexcept
gcc_nonnull(3) Item(unsigned tag
This class can compare one string ("needle") with lots of other strings ("haystacks") efficiently...
gcc_pure unsigned locate_parse_type(const char *str) noexcept
gcc_pure bool HasFoldCase() const noexcept
Is there at least one item with "fold case" enabled?
A string pointer whose memory is managed by this class.
constexpr const_pointer_type c_str() const
const char * GetValue() const
gcc_pure const char * GetBase() const noexcept
Returns the "base" specification (if there is one) or nullptr.
A reference to a memory area that is read-only.
gcc_pure bool IsEmpty() const noexcept
gcc_pure bool HasOtherThanBase() const noexcept
Does this filter contain constraints other than "base"?
gcc_pure bool Match(const TagItem &tag_item) const noexcept
A reference to a song file.