Class Filter
Defined in File library.h
Class Documentation
-
class Filter
Public Types
-
using Tags = std::vector<std::string>
Public Functions
-
Filter()
-
~Filter() = default
-
Filter &local(bool accept)
Set the filter to check local.
A local book is a book with a path. If accept is true, only local book are accepted. If accept is false, only non local book are accepted.
-
Filter &remote(bool accept)
Set the filter to check remote.
A remote book is a book with a url. If accept is true, only remote book are accepted. If accept is false, only non remote book are accepted.
-
Filter &valid(bool accept)
Set the filter to check validity.
A valid book is a book with a path pointing to a existing zim file. If accept is true, only valid book are accepted. If accept is false, only non valid book are accepted.
-
Filter &category(std::string category)
Set the filter to only accept books in the specified category.
Multiple categories can be specified as a comma-separated list (in which case a book in any of those categories will match).
-
Filter &lang(std::string lang)
Set the filter to only accept books in the specified language.
Multiple languages can be specified as a comma-separated list (in which case a book in any of those languages will match).
-
bool hasQuery() const
-
inline const std::string &getQuery() const
-
inline bool queryIsPartial() const
-
bool hasName() const
-
inline const std::string &getName() const
-
bool hasCategory() const
-
inline const std::string &getCategory() const
-
bool hasLang() const
-
inline const std::string &getLang() const
-
bool hasPublisher() const
-
inline const std::string &getPublisher() const
-
bool hasCreator() const
-
inline const std::string &getCreator() const
-
bool hasFlavour() const
-
inline const std::string &getFlavour() const
-
using Tags = std::vector<std::string>