Class Filter

Class Documentation

class kiwix::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 &acceptTags(const Tags &tags)

Set the filter to only accept book with corresponding tag.

Filter &rejectTags(const Tags &tags)
Filter &category(std::string category)
Filter &lang(std::string lang)
Filter &publisher(std::string publisher)
Filter &creator(std::string creator)
Filter &maxSize(size_t size)
Filter &query(std::string query, bool partial = true)
Filter &name(std::string name)
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
inline const Tags &getAcceptTags() const
inline const Tags &getRejectTags() const