X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=lib%2Fparse-time-vrp.h;h=9fb1af609d975d13c71f1d3481203ba40be0ee23;hp=c024dba2fed59035b4adcf57b0a5f04435efb3d7;hb=HEAD;hpb=6a833a6e83865f6999707cc30768d07e1351c2cb diff --git a/lib/parse-time-vrp.h b/lib/parse-time-vrp.h index c024dba2..f495e716 100644 --- a/lib/parse-time-vrp.h +++ b/lib/parse-time-vrp.h @@ -26,20 +26,21 @@ #include /* see *ValueRangeProcessor in xapian-core/include/xapian/queryparser.h */ -class ParseTimeValueRangeProcessor : public Xapian::ValueRangeProcessor { -protected: - Xapian::valueno valno; +class ParseTimeRangeProcessor : public Xapian::RangeProcessor { public: - ParseTimeValueRangeProcessor (Xapian::valueno slot_) - : valno(slot_) { } + ParseTimeRangeProcessor (Xapian::valueno slot_, const std::string prefix_) + : Xapian::RangeProcessor(slot_, prefix_, 0) { } - Xapian::valueno operator() (std::string &begin, std::string &end); + Xapian::Query operator() (const std::string &begin, const std::string &end); }; -#if HAVE_XAPIAN_FIELD_PROCESSOR class DateFieldProcessor : public Xapian::FieldProcessor { +private: + Xapian::valueno slot; +public: + DateFieldProcessor(Xapian::valueno slot_) : slot(slot_) { }; Xapian::Query operator()(const std::string & str); }; -#endif + #endif /* NOTMUCH_PARSE_TIME_VRP_H */