diff options
author | Arsentiy Milchakov <milcars@mapswithme.com> | 2018-05-23 20:03:52 +0300 |
---|---|---|
committer | Vlad Mihaylenko <vxmihaylenko@gmail.com> | 2018-05-25 19:00:35 +0300 |
commit | acab617963639289181a417474a1ba85079ac22d (patch) | |
tree | 9f16dad318d99fc41480457ad1cac9b1e16c8d76 /map/search_api.hpp | |
parent | 2d8d84a2b6495967041a26c6c9ead0526e150aa4 (diff) |
[booking] filter refactoring
Diffstat (limited to 'map/search_api.hpp')
-rw-r--r-- | map/search_api.hpp | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/map/search_api.hpp b/map/search_api.hpp index 7fa06dbf37..001c92c6c4 100644 --- a/map/search_api.hpp +++ b/map/search_api.hpp @@ -1,6 +1,7 @@ #pragma once #include "map/bookmark.hpp" +#include "map/booking_filter_params.hpp" #include "search/downloader_search_callback.hpp" #include "search/engine.hpp" @@ -39,18 +40,6 @@ class Storage; struct DownloaderSearchParams; } -namespace booking -{ -struct AvailabilityParams; -namespace filter -{ -namespace availability -{ -struct Params; -} -} -} - class SearchAPI : public search::DownloaderSearchCallback::Delegate, public search::EverywhereSearchCallback::Delegate, public search::ViewportSearchCallback::Delegate @@ -86,12 +75,12 @@ public: virtual double GetMinDistanceBetweenResults() const { return 0.0; }; - virtual void FilterSearchResultsOnBooking(booking::filter::availability::Params const & params, + virtual void FilterSearchResultsOnBooking(booking::filter::Params const & params, search::Results const & results, bool inViewport) { } - virtual void OnBookingFilterParamsUpdate(booking::AvailabilityParams const & params) {} + virtual void OnBookingAvailabilityParamsUpdate(std::shared_ptr<booking::ParamsBase> const & params) {} virtual search::ProductInfo GetProductInfo(search::Result const & result) const { return {}; }; }; @@ -161,8 +150,8 @@ private: bool QueryMayBeSkipped(search::SearchParams const & prevParams, search::SearchParams const & currParams) const; - void UpdateSponsoredMode(std::string const & query, - booking::filter::availability::Params const & params); + template <typename T> + void UpdateSponsoredMode(T const & searchParams); Index & m_index; storage::Storage const & m_storage; |