X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=lib%2Fregexp-fields.h;h=97778a1d6200fc0a20a42d1db6ca668279784c6e;hb=f140bbcb40ac2510189329c11ca8ff20650c9eab;hp=bac119998c56ca759b46a58c27881ad9dad374a0;hpb=55524bb063c95ae51a1762eb0b1aacce6ca49223;p=notmuch diff --git a/lib/regexp-fields.h b/lib/regexp-fields.h index bac11999..97778a1d 100644 --- a/lib/regexp-fields.h +++ b/lib/regexp-fields.h @@ -35,7 +35,7 @@ */ class RegexpPostingSource : public Xapian::PostingSource { - protected: +protected: const Xapian::valueno slot_; regex_t regexp_; Xapian::Database db_; @@ -46,7 +46,7 @@ class RegexpPostingSource : public Xapian::PostingSource RegexpPostingSource (const RegexpPostingSource &); RegexpPostingSource &operator= (const RegexpPostingSource &); - public: +public: RegexpPostingSource (Xapian::valueno slot, const std::string ®exp); ~RegexpPostingSource (); void init (const Xapian::Database &db); @@ -56,22 +56,28 @@ class RegexpPostingSource : public Xapian::PostingSource Xapian::docid get_docid () const; bool at_end () const; void next (unused (double min_wt)); + void skip_to (Xapian::docid did, unused (double min_wt)); + bool check (Xapian::docid did, unused (double min_wt)); }; class RegexpFieldProcessor : public Xapian::FieldProcessor { - protected: +protected: Xapian::valueno slot; std::string term_prefix; + notmuch_field_flag_t options; Xapian::QueryParser &parser; notmuch_database_t *notmuch; - public: - RegexpFieldProcessor (std::string prefix, Xapian::QueryParser &parser_, notmuch_database_t *notmuch_); +public: + RegexpFieldProcessor (std::string prefix, notmuch_field_flag_t options, + Xapian::QueryParser &parser_, notmuch_database_t *notmuch_); - ~RegexpFieldProcessor () { }; + ~RegexpFieldProcessor () + { + }; - Xapian::Query operator()(const std::string & str); + Xapian::Query operator() (const std::string & str); }; #endif #endif /* NOTMUCH_REGEXP_FIELDS_H */