From 8ba9825031c27724f904521496c653574431e4ab Mon Sep 17 00:00:00 2001 From: Arsentiy Milchakov Date: Sat, 2 Jun 2018 00:11:59 +0300 Subject: [PATCH] [booking][search][android][ios] Workflow for booking filters is unified. Booking deals filter is added and enabled for search in viewport. Search callbacks are moved into map project. --- .../jni/com/mapswithme/maps/SearchEngine.cpp | 232 +++++++++------ .../jni/com/mapswithme/maps/SearchEngine.hpp | 3 +- iphone/Maps/Core/Search/MWMSearch.mm | 65 ++++- .../UI/Search/TableView/MWMSearchCommonCell.h | 2 +- map/CMakeLists.txt | 5 + map/booking_filter_params.hpp | 85 ++++++ map/booking_filter_processor.cpp | 57 ++-- map/booking_filter_processor.hpp | 22 +- .../everywhere_search_callback.cpp | 15 +- .../everywhere_search_callback.hpp | 23 +- map/everywhere_search_params.hpp | 17 +- map/framework.cpp | 121 +++++--- map/framework.hpp | 9 +- map/map_integration_tests/CMakeLists.txt | 43 +++ .../interactive_search_test.cpp | 17 +- map/search_api.cpp | 57 +--- map/search_api.hpp | 34 +-- {search => map}/viewport_search_callback.cpp | 50 +++- {search => map}/viewport_search_callback.hpp | 18 +- map/viewport_search_params.hpp | 2 +- partners_api/booking_availability_params.cpp | 6 +- partners_api/booking_availability_params.hpp | 2 + search/CMakeLists.txt | 4 - search/hotels_classifier.cpp | 22 +- search/hotels_classifier.hpp | 8 +- search/result.cpp | 8 +- search/result.hpp | 15 +- .../search_integration_tests/CMakeLists.txt | 3 - .../downloader_search_test.cpp | 2 +- .../pre_ranker_test.cpp | 2 +- .../processor_test.cpp | 2 +- .../search_integration_tests/ranker_test.cpp | 2 +- .../search_edited_features_test.cpp | 2 +- .../search_integration_tests/smoke_test.cpp | 2 +- .../search_integration_tests/tracer_tests.cpp | 2 +- search/search_tests_support/CMakeLists.txt | 2 + .../integration_tests_helpers.cpp} | 5 +- .../integration_tests_helpers.hpp} | 0 xcode/map/map.xcodeproj/project.pbxproj | 231 ++++++++++++++- xcode/map/map_tests copy-Info.plist | 269 ++++++++++++++++++ xcode/search/search.xcodeproj/project.pbxproj | 51 ++-- 41 files changed, 1147 insertions(+), 370 deletions(-) rename {search => map}/everywhere_search_callback.cpp (50%) rename {search => map}/everywhere_search_callback.hpp (50%) create mode 100644 map/map_integration_tests/CMakeLists.txt rename {search/search_integration_tests => map/map_integration_tests}/interactive_search_test.cpp (89%) rename {search => map}/viewport_search_callback.cpp (56%) rename {search => map}/viewport_search_callback.hpp (53%) rename search/{search_integration_tests/helpers.cpp => search_tests_support/integration_tests_helpers.cpp} (94%) rename search/{search_integration_tests/helpers.hpp => search_tests_support/integration_tests_helpers.hpp} (100%) create mode 100644 xcode/map/map_tests copy-Info.plist diff --git a/android/jni/com/mapswithme/maps/SearchEngine.cpp b/android/jni/com/mapswithme/maps/SearchEngine.cpp index 116eea106b..edfbedeaec 100644 --- a/android/jni/com/mapswithme/maps/SearchEngine.cpp +++ b/android/jni/com/mapswithme/maps/SearchEngine.cpp @@ -247,69 +247,6 @@ private: bool m_initialized = false; } g_hotelsFilterBuilder; -class BookingAvailabilityParamsBuilder -{ -public: - void Init(JNIEnv * env) - { - if (m_initialized) - return; - - m_bookingFilterParamsClass = jni::GetGlobalClassRef(env, "com/mapswithme/maps/search/BookingFilterParams"); - m_roomClass = jni::GetGlobalClassRef(env, "com/mapswithme/maps/search/BookingFilterParams$Room"); - m_checkinMillisecId = env->GetFieldID(m_bookingFilterParamsClass, "mCheckinMillisec", "J"); - m_checkoutMillisecId = env->GetFieldID(m_bookingFilterParamsClass, "mCheckoutMillisec", "J"); - m_roomsId = env->GetFieldID(m_bookingFilterParamsClass, "mRooms", - "[Lcom/mapswithme/maps/search/BookingFilterParams$Room;"); - m_roomAdultsCountId = env->GetFieldID(m_roomClass, "mAdultsCount", "I"); - m_roomAgeOfChildId = env->GetFieldID(m_roomClass, "mAgeOfChild", "I"); - - m_initialized = true; - } - - booking::AvailabilityParams Build(JNIEnv * env, jobject bookingFilterParams) - { - booking::AvailabilityParams result; - - if (!m_initialized || bookingFilterParams == nullptr) - return result; - - jlong const jcheckin = env->GetLongField(bookingFilterParams, m_checkinMillisecId) / 1000; - result.m_checkin = booking::AvailabilityParams::Clock::from_time_t(jcheckin); - - jlong const jcheckout = env->GetLongField(bookingFilterParams, m_checkoutMillisecId) / 1000; - result.m_checkout = booking::AvailabilityParams::Clock::from_time_t(jcheckout); - - jobjectArray const jrooms = - static_cast(env->GetObjectField(bookingFilterParams, m_roomsId)); - ASSERT(jrooms, ("Rooms musn't be non-null!")); - - auto const length = static_cast(env->GetArrayLength(jrooms)); - result.m_rooms.resize(length); - for (size_t i = 0; i < length; ++i) - { - jobject jroom = env->GetObjectArrayElement(jrooms, i); - - booking::AvailabilityParams::Room room; - room.SetAdultsCount(static_cast(env->GetIntField(jroom, m_roomAdultsCountId))); - room.SetAgeOfChild(static_cast(env->GetIntField(jroom, m_roomAgeOfChildId))); - result.m_rooms[i] = move(room); - } - return result; - } - -private: - jclass m_bookingFilterParamsClass = nullptr; - jclass m_roomClass = nullptr; - jfieldID m_checkinMillisecId = nullptr; - jfieldID m_checkoutMillisecId = nullptr; - jfieldID m_roomsId = nullptr; - jfieldID m_roomAdultsCountId = nullptr; - jfieldID m_roomAgeOfChildId = nullptr; - - bool m_initialized = false; -} g_bookingAvailabilityParamsBuilder; - FeatureID const kEmptyFeatureId; // This cache is needed only for showing a specific result on the map after click on the list item. @@ -339,7 +276,7 @@ jmethodID g_mapResultCtor; jmethodID g_updateBookmarksResultsId; jmethodID g_endBookmarksResultsId; -booking::AvailabilityParams g_lastBookingFilterParams; +booking::filter::Tasks g_lastBookingFilterTasks; jobject ToJavaResult(Result & result, search::ProductInfo const & productInfo, bool hasPosition, double lat, double lon) @@ -424,8 +361,7 @@ void OnResults(Results const & results, vector const & prod jni::TScopedLocalObjectArrayRef jResults( env, BuildSearchResults(results, productInfo, hasPosition, lat, lon)); env->CallVoidMethod(g_javaListener, g_updateResultsId, jResults.get(), - static_cast(timestamp), - search::HotelsClassifier::IsHotelResults(results)); + static_cast(timestamp), results.GetType() == Results::Type::Hotels); } if (results.IsEndMarker()) @@ -489,11 +425,16 @@ void OnBookmarksSearchResults(search::BookmarksSearchParams::Results const & res env->CallVoidMethod(g_javaListener, method, jResults.get(), static_cast(timestamp)); } -void OnBookingFilterResults(std::shared_ptr const & apiParams, - vector const & featuresSorted) +void OnBookingFilterAvailabilityResults(std::shared_ptr const & apiParams, + vector const & featuresSorted) { + auto const it = g_lastBookingFilterTasks.Find(booking::filter::Type::Availability); + + if (it == g_lastBookingFilterTasks.end()) + return; + // Ignore obsolete booking filter results. - if (!g_lastBookingFilterParams.Equals(*apiParams)) + if (!it->m_filterParams.m_apiParams->Equals(*apiParams)) return; ASSERT(std::is_sorted(featuresSorted.cbegin(), featuresSorted.cend()), ()); @@ -503,6 +444,140 @@ void OnBookingFilterResults(std::shared_ptr const & apiPara usermark_helper::ToFeatureIdArray(env, featuresSorted)); env->CallVoidMethod(g_javaListener, g_onFilterAvailableHotelsId, jResults.get()); } + +void OnBookingFilterDealsResults(std::shared_ptr const & apiParams, + vector const & featuresSorted) +{ + auto const it = g_lastBookingFilterTasks.Find(booking::filter::Type::Deals); + + if (it == g_lastBookingFilterTasks.end()) + return; + + // Ignore obsolete booking filter results. + if (!it->m_filterParams.m_apiParams->Equals(*(apiParams))) + return; + + ASSERT(std::is_sorted(featuresSorted.cbegin(), featuresSorted.cend()), ()); + + // Dummy. Should be implemented soon. +} + +class BookingBuilder +{ +public: + void Init(JNIEnv * env) + { + if (m_initialized) + return; + + m_bookingFilterParamsClass = + jni::GetGlobalClassRef(env, "com/mapswithme/maps/search/BookingFilterParams"); + m_roomClass = + jni::GetGlobalClassRef(env, "com/mapswithme/maps/search/BookingFilterParams$Room"); + m_checkinMillisecId = env->GetFieldID(m_bookingFilterParamsClass, "mCheckinMillisec", "J"); + m_checkoutMillisecId = env->GetFieldID(m_bookingFilterParamsClass, "mCheckoutMillisec", "J"); + m_roomsId = env->GetFieldID(m_bookingFilterParamsClass, "mRooms", + "[Lcom/mapswithme/maps/search/BookingFilterParams$Room;"); + m_roomAdultsCountId = env->GetFieldID(m_roomClass, "mAdultsCount", "I"); + m_roomAgeOfChildId = env->GetFieldID(m_roomClass, "mAgeOfChild", "I"); + + m_initialized = true; + } + + booking::AvailabilityParams BuildAvailability(JNIEnv * env, jobject bookingFilterParams) + { + booking::AvailabilityParams result; + + if (!m_initialized || bookingFilterParams == nullptr) + return result; + + jlong const jcheckin = env->GetLongField(bookingFilterParams, m_checkinMillisecId) / 1000; + result.m_checkin = booking::AvailabilityParams::Clock::from_time_t(jcheckin); + + jlong const jcheckout = env->GetLongField(bookingFilterParams, m_checkoutMillisecId) / 1000; + result.m_checkout = booking::AvailabilityParams::Clock::from_time_t(jcheckout); + + jobjectArray const jrooms = + static_cast(env->GetObjectField(bookingFilterParams, m_roomsId)); + ASSERT(jrooms, ("Rooms musn't be non-null!")); + + auto const length = static_cast(env->GetArrayLength(jrooms)); + result.m_rooms.resize(length); + for (size_t i = 0; i < length; ++i) + { + jobject jroom = env->GetObjectArrayElement(jrooms, i); + + booking::AvailabilityParams::Room room; + room.SetAdultsCount(static_cast(env->GetIntField(jroom, m_roomAdultsCountId))); + room.SetAgeOfChild(static_cast(env->GetIntField(jroom, m_roomAgeOfChildId))); + result.m_rooms[i] = move(room); + } + return result; + } + + booking::AvailabilityParams BuildDeals(JNIEnv * env, jobject bookingFilterParams) + { + booking::AvailabilityParams result; + + if (!m_initialized) + return result; + + if (bookingFilterParams != nullptr) + { + result = BuildAvailability(env, bookingFilterParams); + } + else + { + // Use tomorrow and day after tomorrow by default. + result.m_checkin = booking::AvailabilityParams::Clock::now() + chrono::hours(24); + result.m_checkout = booking::AvailabilityParams::Clock::now() + chrono::hours(48); + // Use two adults without children. + result.m_rooms.emplace_back(2, -1); + } + + result.m_dealsOnly = true; + + return result; + } + + booking::filter::Tasks BuildTasks(JNIEnv * env, jobject bookingFilterParams) + { + booking::filter::Tasks tasks; + + auto const availabilityParams = BuildAvailability(env, bookingFilterParams); + + if (!availabilityParams.IsEmpty()) + { + booking::filter::Params p(std::make_shared(availabilityParams), + bind(&::OnBookingFilterAvailabilityResults, _1, _2)); + + tasks.EmplaceBack(booking::filter::Type::Availability, move(p)); + } + + auto const dealsParams = BuildDeals(env, bookingFilterParams); + + if (!dealsParams.IsEmpty()) + { + booking::filter::Params p(std::make_shared(dealsParams), + bind(&::OnBookingFilterDealsResults, _1, _2)); + + tasks.EmplaceBack(booking::filter::Type::Deals, move(p)); + } + + return tasks; + } + +private: + jclass m_bookingFilterParamsClass = nullptr; + jclass m_roomClass = nullptr; + jfieldID m_checkinMillisecId = nullptr; + jfieldID m_checkoutMillisecId = nullptr; + jfieldID m_roomsId = nullptr; + jfieldID m_roomAdultsCountId = nullptr; + jfieldID m_roomAgeOfChildId = nullptr; + + bool m_initialized = false; +} g_bookingBuilder; } // namespace jobjectArray BuildSearchResults(Results const & results, @@ -559,7 +634,7 @@ extern "C" "([Lcom/mapswithme/maps/bookmarks/data/FeatureId;)V"); g_hotelsFilterBuilder.Init(env); - g_bookingAvailabilityParamsBuilder.Init(env); + g_bookingBuilder.Init(env); } JNIEXPORT jboolean JNICALL Java_com_mapswithme_maps_search_SearchEngine_nativeRunSearch( @@ -572,11 +647,9 @@ extern "C" params.m_inputLocale = jni::ToNativeString(env, lang); params.m_onResults = bind(&OnResults, _1, _2, timestamp, false, hasPosition, lat, lon); params.m_hotelsFilter = g_hotelsFilterBuilder.Build(env, hotelsFilter); - g_lastBookingFilterParams = g_bookingAvailabilityParamsBuilder.Build(env, bookingFilterParams); - params.m_bookingFilterParams.m_apiParams = - std::make_shared(g_lastBookingFilterParams); - params.m_bookingFilterParams.m_callback = bind(&OnBookingFilterResults, _1, _2); + params.m_bookingFilterTasks = g_bookingBuilder.BuildTasks(env, bookingFilterParams); + g_lastBookingFilterTasks = params.m_bookingFilterTasks; bool const searchStarted = g_framework->NativeFramework()->SearchEverywhere(params); if (searchStarted) g_queryTimestamp = timestamp; @@ -591,10 +664,9 @@ extern "C" vparams.m_query = jni::ToNativeString(env, bytes); vparams.m_inputLocale = jni::ToNativeString(env, lang); vparams.m_hotelsFilter = g_hotelsFilterBuilder.Build(env, hotelsFilter); - g_lastBookingFilterParams = g_bookingAvailabilityParamsBuilder.Build(env, bookingFilterParams); - vparams.m_bookingFilterParams.m_apiParams = - std::make_shared(g_lastBookingFilterParams); - vparams.m_bookingFilterParams.m_callback = bind(&OnBookingFilterResults, _1, _2); + vparams.m_bookingFilterTasks = g_bookingBuilder.BuildTasks(env, bookingFilterParams); + + g_lastBookingFilterTasks = vparams.m_bookingFilterTasks; // TODO (@alexzatsepin): set up vparams.m_onCompleted here and use // HotelsClassifier for hotel queries detection. @@ -608,9 +680,7 @@ extern "C" eparams.m_onResults = bind(&OnResults, _1, _2, timestamp, isMapAndTable, false /* hasPosition */, 0.0 /* lat */, 0.0 /* lon */); eparams.m_hotelsFilter = vparams.m_hotelsFilter; - eparams.m_bookingFilterParams.m_apiParams = - std::make_shared(g_lastBookingFilterParams); - eparams.m_bookingFilterParams.m_callback = bind(&OnBookingFilterResults, _1, _2); + eparams.m_bookingFilterTasks = g_lastBookingFilterTasks; if (g_framework->NativeFramework()->SearchEverywhere(eparams)) g_queryTimestamp = timestamp; diff --git a/android/jni/com/mapswithme/maps/SearchEngine.hpp b/android/jni/com/mapswithme/maps/SearchEngine.hpp index c19a8b8d71..ac2ee53148 100644 --- a/android/jni/com/mapswithme/maps/SearchEngine.hpp +++ b/android/jni/com/mapswithme/maps/SearchEngine.hpp @@ -2,9 +2,10 @@ #include "com/mapswithme/core/jni_helper.hpp" -#include "search/everywhere_search_callback.hpp" #include "search/result.hpp" +#include "map/everywhere_search_callback.hpp" + #include jobjectArray BuildSearchResults(search::Results const & results, diff --git a/iphone/Maps/Core/Search/MWMSearch.mm b/iphone/Maps/Core/Search/MWMSearch.mm index b6aab4510a..403b541558 100644 --- a/iphone/Maps/Core/Search/MWMSearch.mm +++ b/iphone/Maps/Core/Search/MWMSearch.mm @@ -14,6 +14,7 @@ #include "map/everywhere_search_params.hpp" #include "map/viewport_search_params.hpp" +#include #include extern NSString * const kLuggageCategory; @@ -101,15 +102,29 @@ using Observers = NSHashTable; self.searchCount -= 1; }; - m_everywhereParams.m_bookingFilterParams.m_callback = + auto & tasks = self->m_everywhereParams.m_bookingFilterTasks; + auto availabilityTaskIt = tasks.Find(booking::filter::Type::Availability); + if (availabilityTaskIt != tasks.end()) + { + // TODO: implement callback for booking::filter::Type::Deals. + availabilityTaskIt->m_filterParams.m_callback = [self](shared_ptr const & apiParams, - std::vector const & sortedFeatures) { - auto const & p = self->m_everywhereParams.m_bookingFilterParams; - if (p.m_apiParams->IsEmpty() || !p.m_apiParams->Equals(*apiParams)) + std::vector const & sortedFeatures) + { + auto & t = self->m_everywhereParams.m_bookingFilterTasks; + auto const it = t.Find(booking::filter::Type::Availability); + + if (it == t.end()) return; + + auto const & p = it->m_filterParams.m_apiParams; + if (p->IsEmpty() || !p->Equals(*apiParams)) + return; + self->m_bookingAvailableFeatureIDs = sortedFeatures; [self onSearchResultsUpdated]; }; + } GetFramework().SearchEverywhere(m_everywhereParams); self.searchCount += 1; @@ -134,10 +149,35 @@ using Observers = NSHashTable; m_viewportParams.m_hotelsFilter = hotelsRules; m_everywhereParams.m_hotelsFilter = hotelsRules; - auto const availabilityParams = + auto availabilityParams = self.filter ? [self.filter availabilityParams] : booking::filter::Params(); - m_viewportParams.m_bookingFilterParams = availabilityParams; - m_everywhereParams.m_bookingFilterParams = availabilityParams; + booking::filter::Tasks tasks; + if (availabilityParams.IsEmpty()) + { + booking::AvailabilityParams params; + // Use tomorrow and day after tomorrow by default. + params.m_checkin = booking::AvailabilityParams::Clock::now() + std::chrono::hours(24); + params.m_checkout = booking::AvailabilityParams::Clock::now() + std::chrono::hours(48); + // Use two adults without children. + params.m_rooms.emplace_back(2, -1); + params.m_dealsOnly = true; + + booking::filter::Params dp(std::make_shared(params), {}); + tasks.EmplaceBack(booking::filter::Type::Deals, move(dp)); + } + else + { + booking::AvailabilityParams dp; + dp.Set(*(availabilityParams.m_apiParams)); + dp.m_dealsOnly = true; + booking::filter::Params dealsParams(std::make_shared(dp), {}); + + tasks.EmplaceBack(booking::filter::Type::Availability, move(availabilityParams)); + tasks.EmplaceBack(booking::filter::Type::Deals, move(dealsParams)); + } + + m_viewportParams.m_bookingFilterTasks = tasks; + m_everywhereParams.m_bookingFilterTasks = tasks; } - (void)update @@ -263,9 +303,8 @@ using Observers = NSHashTable; m_viewportResults.Clear(); m_bookingAvailableFeatureIDs.clear(); - auto const availabilityParams = booking::filter::Params(); - m_viewportParams.m_bookingFilterParams = availabilityParams; - m_everywhereParams.m_bookingFilterParams = availabilityParams; + m_viewportParams.m_bookingFilterTasks.Clear(); + m_everywhereParams.m_bookingFilterTasks.Clear(); [self onSearchResultsUpdated]; } @@ -427,10 +466,8 @@ using Observers = NSHashTable; - (BOOL)isHotelResults { - BOOL const isEverywhereHotelResults = - search::HotelsClassifier::IsHotelResults(m_everywhereResults); - BOOL const isViewportHotelResults = search::HotelsClassifier::IsHotelResults(m_viewportResults); - return isEverywhereHotelResults || isViewportHotelResults; + return m_everywhereResults.GetType() == search::Results::Type::Hotels || + m_viewportResults.GetType() == search::Results::Type::Hotels; } @end diff --git a/iphone/Maps/UI/Search/TableView/MWMSearchCommonCell.h b/iphone/Maps/UI/Search/TableView/MWMSearchCommonCell.h index 5117c93ab7..ce3a71db31 100644 --- a/iphone/Maps/UI/Search/TableView/MWMSearchCommonCell.h +++ b/iphone/Maps/UI/Search/TableView/MWMSearchCommonCell.h @@ -1,6 +1,6 @@ #import "MWMSearchCell.h" -#include "search/everywhere_search_callback.hpp" +#include "map/everywhere_search_callback.hpp" #include "search/result.hpp" @interface MWMSearchCommonCell : MWMSearchCell diff --git a/map/CMakeLists.txt b/map/CMakeLists.txt index 619db11a06..88e357b294 100644 --- a/map/CMakeLists.txt +++ b/map/CMakeLists.txt @@ -44,6 +44,8 @@ set( displacement_mode_manager.hpp displayed_categories_modifiers.cpp displayed_categories_modifiers.hpp + everywhere_search_callback.cpp + everywhere_search_callback.hpp everywhere_search_params.hpp feature_vec_model.cpp feature_vec_model.hpp @@ -102,10 +104,13 @@ set( user_mark.cpp user_mark.hpp viewport_search_params.hpp + viewport_search_callback.cpp + viewport_search_callback.hpp ) add_library(${PROJECT_NAME} ${SRC}) +omim_add_test_subdirectory(map_integration_tests) omim_add_test_subdirectory(map_tests) omim_add_test_subdirectory(mwm_tests) omim_add_test_subdirectory(style_tests) diff --git a/map/booking_filter_params.hpp b/map/booking_filter_params.hpp index 69d99ca6a8..f99acdbdb1 100644 --- a/map/booking_filter_params.hpp +++ b/map/booking_filter_params.hpp @@ -43,5 +43,90 @@ struct ParamsImpl using Params = ParamsImpl; using ParamsInternal = ParamsImpl; + +enum class Type +{ + Deals, + Availability +}; + +using Types = std::vector; + +template +struct TaskImpl +{ + TaskImpl(Type const type, T && filterParams) + : m_type(type) + , m_filterParams(std::move(filterParams)) + { + } + + Type m_type; + T m_filterParams; +}; + +using Task = TaskImpl; +using TaskInternal = TaskImpl; + +enum ApplyMode +{ + Independent, + Consecutively +}; + +template +class TasksImpl +{ +public: + using Iter = std::vector::iterator; + using ConstIter = std::vector::const_iterator; + + TasksImpl() = default; + explicit TasksImpl(ApplyMode const mode) : m_applyMode(mode) {} + + Iter begin() { return m_tasks.begin(); } + Iter end() { return m_tasks.end(); } + ConstIter begin() const { return m_tasks.cbegin(); } + ConstIter end() const { return m_tasks.cend(); } + + Iter Find(Type const type) + { + return find_if(m_tasks.begin(), m_tasks.end(),[type](Task const & task) + { + return task.m_type == type; + }); + } + + ConstIter Find(Type const type) const + { + return find_if(m_tasks.cbegin(), m_tasks.cend(),[type](Task const & task) + { + return task.m_type == type; + }); + } + + void Clear() + { + m_tasks.clear(); + } + + template + void EmplaceBack(Args && ... args) + { + m_tasks.emplace_back(std::forward(args)...); + } + + ApplyMode GetMode() const + { + return m_applyMode; + } + +private: + std::vector m_tasks; + ApplyMode m_applyMode = ApplyMode::Independent; +}; + +using Tasks = TasksImpl; +using TasksInternal = std::vector; } // namespace filter } // namespace booking diff --git a/map/booking_filter_processor.cpp b/map/booking_filter_processor.cpp index fa58a641ea..247738e2ea 100644 --- a/map/booking_filter_processor.cpp +++ b/map/booking_filter_processor.cpp @@ -15,32 +15,18 @@ FilterProcessor::FilterProcessor(Index const & index, booking::Api const & api) m_filters.emplace(Type::Availability, std::make_unique(*this)); } -void FilterProcessor::ApplyFilters(search::Results const & results, - std::vector && tasks) +void FilterProcessor::ApplyFilters(search::Results const & results, TasksInternal && tasks, + ApplyMode const mode) { - GetPlatform().RunTask(Platform::Thread::File, [this, results, tasks = std::move(tasks)]() mutable + GetPlatform().RunTask(Platform::Thread::File, [this, results, tasks = std::move(tasks), mode]() mutable { CHECK(!tasks.empty(), ()); - // Run provided filters consecutively. - for (size_t i = tasks.size() - 1; i > 0; --i) + switch (mode) { - auto const & cb = tasks[i - 1].m_filterParams.m_callback; - - tasks[i - 1].m_filterParams.m_callback = - [ this, cb, nextTask = std::move(tasks[i]) ](search::Results const & results) mutable - { - cb(results); - // Run the next filter with obtained results from the previous one. - // Post different task on the file thread to increase granularity. - GetPlatform().RunTask(Platform::Thread::File, [this, results, nextTask = std::move(nextTask)]() - { - m_filters.at(nextTask.m_type)->ApplyFilter(results, nextTask.m_filterParams); - }); - }; + case Independent: ApplyIndependent(results, tasks); break; + case Consecutively: ApplyConsecutively(results, tasks); break; } - // Run first filter. - m_filters.at(tasks.front().m_type)->ApplyFilter(results, tasks.front().m_filterParams); }); } @@ -76,5 +62,36 @@ Api const & FilterProcessor::GetApi() const { return m_api; } + +void FilterProcessor::ApplyConsecutively(search::Results const & results, TasksInternal & tasks) +{ + // Run provided filters consecutively. + for (size_t i = tasks.size() - 1; i > 0; --i) + { + auto const & cb = tasks[i - 1].m_filterParams.m_callback; + + tasks[i - 1].m_filterParams.m_callback = + [ this, cb, nextTask = std::move(tasks[i]) ](search::Results const & results) mutable + { + cb(results); + // Run the next filter with obtained results from the previous one. + // Post different task on the file thread to increase granularity. + GetPlatform().RunTask(Platform::Thread::File, [this, results, nextTask = std::move(nextTask)]() + { + m_filters.at(nextTask.m_type)->ApplyFilter(results, nextTask.m_filterParams); + }); + }; + } + // Run first filter. + m_filters.at(tasks.front().m_type)->ApplyFilter(results, tasks.front().m_filterParams); +} + +void FilterProcessor::ApplyIndependent(search::Results const & results, TasksInternal const & tasks) +{ + for (auto const & task : tasks) + { + m_filters.at(task.m_type)->ApplyFilter(results, task.m_filterParams); + } +} } // namespace filter } // namespace booking diff --git a/map/booking_filter_processor.hpp b/map/booking_filter_processor.hpp index d901be1e6e..245002a6f1 100644 --- a/map/booking_filter_processor.hpp +++ b/map/booking_filter_processor.hpp @@ -25,24 +25,6 @@ class Api; namespace filter { -enum class Type -{ - Deals, - Availability -}; - -struct FilterTask -{ - FilterTask(Type const type, ParamsInternal && filterParams) - : m_type(type) - , m_filterParams(std::move(filterParams)) - { - } - - Type const m_type; - ParamsInternal m_filterParams; -}; - using FillSearchMarksCallback = platform::SafeCallback availableHotelsSorted)>; @@ -51,7 +33,7 @@ class FilterProcessor : public FilterBase::Delegate public: FilterProcessor(Index const & index, booking::Api const & api); - void ApplyFilters(search::Results const & results, std::vector && tasks); + void ApplyFilters(search::Results const & results, TasksInternal && tasks, ApplyMode const mode); void OnParamsUpdated(Type const type, std::shared_ptr const & params); @@ -63,6 +45,8 @@ public: Api const & GetApi() const override; private: + void ApplyConsecutively(search::Results const & results, TasksInternal & tasks); + void ApplyIndependent(search::Results const & results, TasksInternal const & tasks); Index const & m_index; Api const & m_api; diff --git a/search/everywhere_search_callback.cpp b/map/everywhere_search_callback.cpp similarity index 50% rename from search/everywhere_search_callback.cpp rename to map/everywhere_search_callback.cpp index 0a157a6dae..b66557490e 100644 --- a/search/everywhere_search_callback.cpp +++ b/map/everywhere_search_callback.cpp @@ -1,12 +1,16 @@ -#include "search/everywhere_search_callback.hpp" +#include "everywhere_search_callback.hpp" #include #include namespace search { -EverywhereSearchCallback::EverywhereSearchCallback(Delegate & delegate, OnResults onResults) - : m_delegate(delegate), m_onResults(std::move(onResults)) +EverywhereSearchCallback::EverywhereSearchCallback(Delegate & delegate, + booking::filter::Tasks const & bookingFilterTasks, + EverywhereSearchParams::OnResults onResults) + : m_delegate(delegate) + , m_onResults(std::move(onResults)) + , m_bookingFilterTasks(bookingFilterTasks) { } @@ -20,6 +24,11 @@ void EverywhereSearchCallback::operator()(Results const & results) m_productInfo.push_back(m_delegate.GetProductInfo(results[i])); } + if (results.IsEndedNormal() && results.GetType() == Results::Type::Hotels) + { + m_delegate.FilterSearchResultsOnBooking(m_bookingFilterTasks, results, false /* inViewport */); + } + ASSERT_EQUAL(m_productInfo.size(), results.GetCount(), ()); m_onResults(results, m_productInfo); } diff --git a/search/everywhere_search_callback.hpp b/map/everywhere_search_callback.hpp similarity index 50% rename from search/everywhere_search_callback.hpp rename to map/everywhere_search_callback.hpp index 55820f592f..5ed2bc31f0 100644 --- a/search/everywhere_search_callback.hpp +++ b/map/everywhere_search_callback.hpp @@ -1,5 +1,8 @@ #pragma once +#include "map/booking_filter_params.hpp" +#include "map/everywhere_search_params.hpp" + #include "search/result.hpp" #include @@ -7,13 +10,6 @@ namespace search { -struct ProductInfo -{ - static auto constexpr kInvalidRating = kInvalidRatingValue; - - bool m_isLocalAdsCustomer = false; - float m_ugcRating = kInvalidRating; -}; // An on-results-callback that should be used for search over all // maps. // @@ -27,20 +23,19 @@ public: virtual ~Delegate() = default; virtual ProductInfo GetProductInfo(Result const & result) const = 0; + virtual void FilterSearchResultsOnBooking(booking::filter::Tasks const & filterTasks, + search::Results const & results, bool inViewport) = 0; }; - // The signature of the callback should be the same as EverywhereSaerchParams::OnResults, but - // EverywhereSaerchParams is located in map project and we do not need dependency. - using OnResults = - std::function const & productInfo)>; - - EverywhereSearchCallback(Delegate & delegate, OnResults onResults); + EverywhereSearchCallback(Delegate & delegate, booking::filter::Tasks const & bookingFilterTasks, + EverywhereSearchParams::OnResults onResults); void operator()(Results const & results); private: Delegate & m_delegate; - OnResults m_onResults; + EverywhereSearchParams::OnResults m_onResults; std::vector m_productInfo; + booking::filter::Tasks m_bookingFilterTasks; }; } // namespace search diff --git a/map/everywhere_search_params.hpp b/map/everywhere_search_params.hpp index 785e1698b0..8c5808a42f 100644 --- a/map/everywhere_search_params.hpp +++ b/map/everywhere_search_params.hpp @@ -1,8 +1,8 @@ #pragma once #include "map/booking_filter_params.hpp" +#include "map/everywhere_search_callback.hpp" -#include "search/everywhere_search_callback.hpp" #include "search/hotels_filter.hpp" #include "search/result.hpp" @@ -13,13 +13,24 @@ namespace search { +struct ProductInfo +{ + static auto constexpr kInvalidRating = kInvalidRatingValue; + + bool m_isLocalAdsCustomer = false; + float m_ugcRating = kInvalidRating; +}; + struct EverywhereSearchParams { std::string m_query; std::string m_inputLocale; std::shared_ptr m_hotelsFilter; - booking::filter::Params m_bookingFilterParams; + booking::filter::Tasks m_bookingFilterTasks; - EverywhereSearchCallback::OnResults m_onResults; + using OnResults = + std::function const & productInfo)>; + + OnResults m_onResults; }; } // namespace search diff --git a/map/framework.cpp b/map/framework.cpp index 111de86e31..a2dbfa7394 100644 --- a/map/framework.cpp +++ b/map/framework.cpp @@ -3125,10 +3125,11 @@ void Framework::SetSearchDisplacementModeEnabled(bool enabled) SetDisplacementMode(DisplacementModeManager::SLOT_INTERACTIVE_SEARCH, enabled /* show */); } -void Framework::ShowViewportSearchResults(bool clear, search::Results::ConstIter begin, +void Framework::ShowViewportSearchResults(bool clear, booking::filter::Types types, + search::Results::ConstIter begin, search::Results::ConstIter end) { - if (GetSearchAPI().GetSponsoredMode() != SearchAPI::SponsoredMode::Booking) + if (types.empty()) { FillSearchResultsMarks(clear, begin, end); return; @@ -3136,27 +3137,33 @@ void Framework::ShowViewportSearchResults(bool clear, search::Results::ConstIter search::Results results; results.AddResultsNoChecks(begin, end); - - auto const fillCallback = [this, clear, results] (std::vector featuresSorted) + for (auto const type : types) { - auto const postProcessing = [featuresSorted] (SearchMarkPoint & mark) + auto const fillCallback = [this, type, clear, results] (std::vector featuresSorted) { - auto const & id = mark.GetFeatureID(); + auto const postProcessing = [type, featuresSorted] (SearchMarkPoint & mark) + { + auto const & id = mark.GetFeatureID(); - if (!id.IsValid()) - return; + if (!id.IsValid()) + return; - auto const isAvailable = - std::binary_search(featuresSorted.cbegin(), featuresSorted.cend(), id); + auto const found = std::binary_search(featuresSorted.cbegin(), featuresSorted.cend(), id); - mark.SetPreparing(!isAvailable); + using booking::filter::Type; + + switch (type) + { + case Type::Deals: mark.SetSale(found); break; + case Type::Availability: mark.SetPreparing(!found); break; + } + }; + + FillSearchResultsMarks(clear, results.begin(), results.end(), postProcessing); }; - FillSearchResultsMarks(clear, results.begin(), results.end(), postProcessing); - }; - - m_bookingFilterProcessor.GetFeaturesFromCache(booking::filter::Type::Availability, results, - fillCallback); + m_bookingFilterProcessor.GetFeaturesFromCache(type, results, fillCallback); + } } void Framework::ClearViewportSearchResults() @@ -3401,46 +3408,70 @@ ugc::Reviews Framework::FilterUGCReviews(ugc::Reviews const & reviews) const return result; } -void Framework::FilterSearchResultsOnBooking(booking::filter::Params const & filterParams, +void Framework::FilterSearchResultsOnBooking(booking::filter::Tasks const & filterTasks, search::Results const & results, bool inViewport) { using namespace booking::filter; - auto const & apiParams = filterParams.m_apiParams; - auto const & cb = filterParams.m_callback; - ParamsInternal paramsInternal + TasksInternal tasksInternal; + + for (auto const & task : filterTasks) { - apiParams, - [this, apiParams, cb, inViewport](search::Results const & results) - { - if (results.GetCount() == 0) - return; + auto const type = task.m_type; + auto const & apiParams = task.m_filterParams.m_apiParams; + auto const & cb = task.m_filterParams.m_callback; - std::vector features; - for (auto const & r : results) + if (apiParams->IsEmpty()) + continue; + + ParamsInternal paramsInternal { - features.push_back(r.GetFeatureID()); - } - - std::sort(features.begin(), features.end()); - - if (inViewport) - { - GetPlatform().RunTask(Platform::Thread::Gui, [this, features]() + apiParams, + [this, type, apiParams, cb, inViewport](search::Results const & results) { - m_searchMarks.SetPreparingState(features, false /* isPreparing */); - }); - } + if (results.GetCount() == 0) + return; - cb(apiParams, features); - } - }; + std::vector features; + for (auto const & r : results) + { + features.push_back(r.GetFeatureID()); + } - m_bookingFilterProcessor.ApplyFilters(results, {{Type::Availability, std::move(paramsInternal)}}); + std::sort(features.begin(), features.end()); + + if (inViewport) + { + GetPlatform().RunTask(Platform::Thread::Gui, [this, type, features]() + { + switch (type) + { + case Type::Deals: + m_searchMarks.SetSales(features, true /* hasSale */); + break; + case Type::Availability: + m_searchMarks.SetPreparingState(features, false /* isPreparing */); + break; + } + }); + } + cb(apiParams, features); + } + }; + + tasksInternal.emplace_back(type, move(paramsInternal)); + } + + m_bookingFilterProcessor.ApplyFilters(results, move(tasksInternal), filterTasks.GetMode()); } -void Framework::OnBookingAvailabilityParamsUpdate(std::shared_ptr const & params) +void Framework::OnBookingFilterParamsUpdate(booking::filter::Tasks const & filterTasks) { - m_bookingAvailabilityParams.Set(*params); - m_bookingFilterProcessor.OnParamsUpdated(booking::filter::Type::Availability, params); + for (auto const & task : filterTasks) + { + if (task.m_type == booking::filter::Type::Availability) + m_bookingAvailabilityParams.Set(*task.m_filterParams.m_apiParams); + + m_bookingFilterProcessor.OnParamsUpdated(task.m_type, task.m_filterParams.m_apiParams); + } } diff --git a/map/framework.hpp b/map/framework.hpp index bce8c42efd..0c5986a5d1 100644 --- a/map/framework.hpp +++ b/map/framework.hpp @@ -1,6 +1,7 @@ #pragma once #include "map/api_mark_point.hpp" +#include "map/booking_filter_params.hpp" #include "map/booking_filter_processor.hpp" #include "map/bookmark.hpp" #include "map/bookmark_manager.hpp" @@ -341,7 +342,8 @@ public: // SearchAPI::Delegate overrides: void RunUITask(function fn) override; void SetSearchDisplacementModeEnabled(bool enabled) override; - void ShowViewportSearchResults(bool clear, search::Results::ConstIter begin, + void ShowViewportSearchResults(bool clear, booking::filter::Types types, + search::Results::ConstIter begin, search::Results::ConstIter end) override; void ClearViewportSearchResults() override; boost::optional GetCurrentPosition() const override; @@ -841,10 +843,9 @@ private: ugc::Reviews FilterUGCReviews(ugc::Reviews const & reviews) const; public: - void FilterSearchResultsOnBooking(booking::filter::Params const & filterParams, + void FilterSearchResultsOnBooking(booking::filter::Tasks const & filterTasks, search::Results const & results, bool inViewport) override; - void OnBookingAvailabilityParamsUpdate( - std::shared_ptr const & params) override; + void OnBookingFilterParamsUpdate(booking::filter::Tasks const & filterTasks) override; private: // m_discoveryManager must be bellow m_searchApi, m_viatorApi, m_localsApi diff --git a/map/map_integration_tests/CMakeLists.txt b/map/map_integration_tests/CMakeLists.txt new file mode 100644 index 0000000000..76ec6b4eac --- /dev/null +++ b/map/map_integration_tests/CMakeLists.txt @@ -0,0 +1,43 @@ +project(map_integration_tests) + +set( + SRC + interactive_search_test.cpp +) + +omim_add_test(${PROJECT_NAME} ${SRC}) + +omim_link_libraries( + ${PROJECT_NAME} + map + search_tests_support + indexer_tests_support + editor_tests_support + generator_tests_support + generator + routing + routing_common + search + storage + stats_client + indexer + editor + platform + mwm_diff + bsdiff + geometry + coding + base + oauthcpp + tess2 + protobuf + jansson + succinct + pugixml + opening_hours + icu + ${Qt5Network_LIBRARIES} + ${LIBZ} +) + +link_qt5_core(${PROJECT_NAME}) \ No newline at end of file diff --git a/search/search_integration_tests/interactive_search_test.cpp b/map/map_integration_tests/interactive_search_test.cpp similarity index 89% rename from search/search_integration_tests/interactive_search_test.cpp rename to map/map_integration_tests/interactive_search_test.cpp index e2d49987b6..41ef0df757 100644 --- a/search/search_integration_tests/interactive_search_test.cpp +++ b/map/map_integration_tests/interactive_search_test.cpp @@ -1,10 +1,11 @@ #include "testing/testing.hpp" #include "search/mode.hpp" -#include "search/search_integration_tests/helpers.hpp" +#include "search/search_tests_support/integration_tests_helpers.hpp" #include "search/search_tests_support/test_results_matching.hpp" #include "search/search_tests_support/test_search_request.hpp" -#include "search/viewport_search_callback.hpp" + +#include "map/viewport_search_callback.hpp" #include "base/macros.hpp" @@ -40,15 +41,20 @@ public: bool IsViewportSearchActive() const override { return true; } - void ShowViewportSearchResults(bool clear, Results::ConstIter begin, - Results::ConstIter end) override + void ShowViewportSearchResults(bool clear, booking::filter::Types /* types */, + Results::ConstIter begin, Results::ConstIter end) override { if (clear) m_stats.m_numShownResults = 0; m_stats.m_numShownResults += distance(begin, end); } - private: + void FilterSearchResultsOnBooking(booking::filter::Tasks const & filterTasks, + search::Results const & results, bool inViewport) override + { + } + +private: Stats & m_stats; }; @@ -62,6 +68,7 @@ public: { SetCustomOnResults( ViewportSearchCallback(static_cast(*this), + {} /* bookingFilterTasks */, bind(&InteractiveSearchRequest::OnResults, this, placeholders::_1))); } }; diff --git a/map/search_api.cpp b/map/search_api.cpp index e563537bf4..f30297eb1a 100644 --- a/map/search_api.cpp +++ b/map/search_api.cpp @@ -152,8 +152,6 @@ void SearchAPI::OnViewportChanged(m2::RectD const & viewport) bool SearchAPI::SearchEverywhere(EverywhereSearchParams const & params) { - UpdateSponsoredMode(params); - SearchParams p; p.m_query = params.m_query; p.m_inputLocale = params.m_inputLocale; @@ -168,28 +166,21 @@ bool SearchAPI::SearchEverywhere(EverywhereSearchParams const & params) p.m_onResults = EverywhereSearchCallback( static_cast(*this), + params.m_bookingFilterTasks, [this, params](Results const & results, std::vector const & productInfo) { if (params.m_onResults) RunUITask([params, results, productInfo] { params.m_onResults(results, productInfo); }); - if (results.IsEndedNormal() && m_sponsoredMode == SponsoredMode::Booking) - { - m_delegate.FilterSearchResultsOnBooking(params.m_bookingFilterParams, results, - false /* inViewport */); - } }); - if (m_sponsoredMode == SponsoredMode::Booking) - m_delegate.OnBookingAvailabilityParamsUpdate(params.m_bookingFilterParams.m_apiParams); + m_delegate.OnBookingFilterParamsUpdate(params.m_bookingFilterTasks); return Search(p, true /* forceSearch */); } bool SearchAPI::SearchInViewport(ViewportSearchParams const & params) { - UpdateSponsoredMode(params); - SearchParams p; p.m_query = params.m_query; p.m_inputLocale = params.m_inputLocale; @@ -209,18 +200,13 @@ bool SearchAPI::SearchInViewport(ViewportSearchParams const & params) p.m_onResults = ViewportSearchCallback( static_cast(*this), + params.m_bookingFilterTasks, [this, params](Results const & results) { if (results.IsEndMarker() && params.m_onCompleted) RunUITask([params, results] { params.m_onCompleted(results); }); - if (results.IsEndedNormal() && m_sponsoredMode == SponsoredMode::Booking) - { - m_delegate.FilterSearchResultsOnBooking(params.m_bookingFilterParams, results, - true /* inViewport */); - } }); - if (m_sponsoredMode == SponsoredMode::Booking) - m_delegate.OnBookingAvailabilityParamsUpdate(params.m_bookingFilterParams.m_apiParams); + m_delegate.OnBookingFilterParamsUpdate(params.m_bookingFilterTasks); return Search(p, false /* forceSearch */); } @@ -262,8 +248,6 @@ void SearchAPI::SearchForDiscovery(DiscoverySearchParams const & params) bool SearchAPI::SearchInDownloader(storage::DownloaderSearchParams const & params) { - m_sponsoredMode = SponsoredMode::None; - SearchParams p; p.m_query = params.m_query; p.m_inputLocale = params.m_inputLocale; @@ -283,8 +267,6 @@ bool SearchAPI::SearchInDownloader(storage::DownloaderSearchParams const & param bool SearchAPI::SearchInBookmarks(search::BookmarksSearchParams const & params) { - m_sponsoredMode = SponsoredMode::None; - SearchParams p; p.m_query = params.m_query; p.m_position = m_delegate.GetCurrentPosition(); @@ -332,8 +314,6 @@ void SearchAPI::CancelSearch(Mode mode) m_delegate.SetSearchDisplacementModeEnabled(false /* enabled */); } - m_sponsoredMode = SponsoredMode::None; - auto & intent = m_searchIntents[static_cast(mode)]; intent.m_params.Clear(); CancelQuery(intent.m_handle); @@ -357,10 +337,10 @@ bool SearchAPI::IsViewportSearchActive() const return !m_searchIntents[static_cast(Mode::Viewport)].m_params.m_query.empty(); } -void SearchAPI::ShowViewportSearchResults(bool clear, Results::ConstIter begin, - Results::ConstIter end) +void SearchAPI::ShowViewportSearchResults(bool clear, booking::filter::Types types, + Results::ConstIter begin, Results::ConstIter end) { - return m_delegate.ShowViewportSearchResults(clear, begin, end); + return m_delegate.ShowViewportSearchResults(clear, types, begin, end); } ProductInfo SearchAPI::GetProductInfo(Result const & result) const @@ -368,6 +348,12 @@ ProductInfo SearchAPI::GetProductInfo(Result const & result) const return m_delegate.GetProductInfo(result); } +void SearchAPI::FilterSearchResultsOnBooking(booking::filter::Tasks const & filterTasks, + search::Results const & results, bool inViewport) +{ + m_delegate.FilterSearchResultsOnBooking(filterTasks, results, inViewport); +} + void SearchAPI::OnBookmarksCreated(vector> const & marks) { vector data; @@ -461,20 +447,3 @@ bool SearchAPI::QueryMayBeSkipped(SearchParams const & prevParams, return true; } - -template -void SearchAPI::UpdateSponsoredMode(T const & searchParams) -{ - m_sponsoredMode = SponsoredMode::None; - if (!searchParams.m_bookingFilterParams.IsEmpty()) - m_sponsoredMode = SponsoredMode::Booking; -} - -string DebugPrint(SearchAPI::SponsoredMode mode) -{ - switch (mode) - { - case SearchAPI::SponsoredMode::None: return "None"; - case SearchAPI::SponsoredMode::Booking: return "Booking"; - } -} diff --git a/map/search_api.hpp b/map/search_api.hpp index 277ee77d45..49ce54b9d1 100644 --- a/map/search_api.hpp +++ b/map/search_api.hpp @@ -2,14 +2,14 @@ #include "map/booking_filter_params.hpp" #include "map/bookmark.hpp" +#include "map/everywhere_search_callback.hpp" +#include "map/viewport_search_callback.hpp" #include "search/downloader_search_callback.hpp" #include "search/engine.hpp" -#include "search/everywhere_search_callback.hpp" #include "search/mode.hpp" #include "search/result.hpp" #include "search/search_params.hpp" -#include "search/viewport_search_callback.hpp" #include "kml/type_utils.hpp" @@ -45,12 +45,6 @@ class SearchAPI : public search::DownloaderSearchCallback::Delegate, public search::ViewportSearchCallback::Delegate { public: - enum class SponsoredMode - { - None, - Booking - }; - struct Delegate { virtual ~Delegate() = default; @@ -59,7 +53,8 @@ public: virtual void SetSearchDisplacementModeEnabled(bool /* enabled */) {} - virtual void ShowViewportSearchResults(bool clear, search::Results::ConstIter begin, + virtual void ShowViewportSearchResults(bool clear, booking::filter::Types types, + search::Results::ConstIter begin, search::Results::ConstIter end) { } @@ -75,15 +70,12 @@ public: virtual double GetMinDistanceBetweenResults() const { return 0.0; }; - virtual void FilterSearchResultsOnBooking(booking::filter::Params const & params, + virtual void FilterSearchResultsOnBooking(booking::filter::Tasks const & filterTasks, search::Results const & results, bool inViewport) { } - virtual void OnBookingAvailabilityParamsUpdate( - std::shared_ptr const & params) - { - } + virtual void OnBookingFilterParamsUpdate(booking::filter::Tasks const & filterTasks) {} virtual search::ProductInfo GetProductInfo(search::Result const & result) const { return {}; }; }; @@ -96,8 +88,6 @@ public: void LoadCitiesBoundaries() { m_engine.LoadCitiesBoundaries(); } - SponsoredMode GetSponsoredMode() const { return m_sponsoredMode; } - // Search everywhere. bool SearchEverywhere(search::EverywhereSearchParams const & params); @@ -129,9 +119,12 @@ public: void RunUITask(std::function fn) override; void SetHotelDisplacementMode() override; bool IsViewportSearchActive() const override; - void ShowViewportSearchResults(bool clear, search::Results::ConstIter begin, + void ShowViewportSearchResults(bool clear, booking::filter::Types types, + search::Results::ConstIter begin, search::Results::ConstIter end) override; search::ProductInfo GetProductInfo(search::Result const & result) const override; + void FilterSearchResultsOnBooking(booking::filter::Tasks const & filterTasks, + search::Results const & results, bool inViewport) override; void OnBookmarksCreated(std::vector> const & marks); void OnBookmarksUpdated(std::vector> const & marks); @@ -153,9 +146,6 @@ private: bool QueryMayBeSkipped(search::SearchParams const & prevParams, search::SearchParams const & currParams) const; - template - void UpdateSponsoredMode(T const & searchParams); - Index & m_index; storage::Storage const & m_storage; storage::CountryInfoGetter const & m_infoGetter; @@ -170,8 +160,4 @@ private: m2::RectD m_viewport; bool m_isViewportInitialized = false; - - SponsoredMode m_sponsoredMode = SponsoredMode::None; }; - -std::string DebugPrint(SearchAPI::SponsoredMode mode); diff --git a/search/viewport_search_callback.cpp b/map/viewport_search_callback.cpp similarity index 56% rename from search/viewport_search_callback.cpp rename to map/viewport_search_callback.cpp index 249fbad687..a507ce2bd2 100644 --- a/search/viewport_search_callback.cpp +++ b/map/viewport_search_callback.cpp @@ -1,30 +1,53 @@ -#include "search/viewport_search_callback.hpp" +#include "map/viewport_search_callback.hpp" #include "search/result.hpp" #include "base/assert.hpp" +namespace +{ +booking::filter::Types FillBookingFilterTypes(search::Results const & results, + booking::filter::Tasks const & tasks) +{ + using namespace booking::filter; + Types types; + for (auto const & task : tasks) + { + switch (task.m_type) + { + case Type::Deals: + if (results.GetType() == search::Results::Type::Hotels) + types.push_back(Type::Deals); + break; + case Type::Availability: + types.push_back(Type::Availability); + break; + } + } + + return types; +} +} // namespace + namespace search { -ViewportSearchCallback::ViewportSearchCallback(Delegate & delegate, OnResults const & onResults) +ViewportSearchCallback::ViewportSearchCallback(Delegate & delegate, + booking::filter::Tasks const & bookingFilterTasks, + OnResults const & onResults) : m_delegate(delegate) , m_onResults(onResults) - , m_hotelsModeSet(false) , m_firstCall(true) , m_lastResultsSize(0) + , m_bookingFilterTasks(bookingFilterTasks) { } void ViewportSearchCallback::operator()(Results const & results) { ASSERT_LESS_OR_EQUAL(m_lastResultsSize, results.GetCount(), ()); - m_hotelsClassif.Add(results.begin() + m_lastResultsSize, results.end()); - if (!m_hotelsModeSet && m_hotelsClassif.IsHotelResults()) - { + if (results.GetType() == Results::Type::Hotels) m_delegate.SetHotelDisplacementMode(); - m_hotelsModeSet = true; - } // We need to clear old results and show a new bunch of results when // the search is completed normally (note that there may be empty @@ -48,15 +71,22 @@ void ViewportSearchCallback::operator()(Results const & results) auto & delegate = m_delegate; bool const firstCall = m_firstCall; + auto const types = FillBookingFilterTypes(results, m_bookingFilterTasks); + auto const lastResultsSize = m_lastResultsSize; - m_delegate.RunUITask([&delegate, firstCall, results, lastResultsSize]() { + m_delegate.RunUITask([&delegate, firstCall, types, results, lastResultsSize]() { if (!delegate.IsViewportSearchActive()) return; - delegate.ShowViewportSearchResults(firstCall, results.begin() + lastResultsSize, + delegate.ShowViewportSearchResults(firstCall, types, results.begin() + lastResultsSize, results.end()); }); } + if (results.IsEndedNormal() && results.GetType() == Results::Type::Hotels) + { + m_delegate.FilterSearchResultsOnBooking(m_bookingFilterTasks, results, true /* inViewport */); + } + m_lastResultsSize = results.GetCount(); m_firstCall = false; diff --git a/search/viewport_search_callback.hpp b/map/viewport_search_callback.hpp similarity index 53% rename from search/viewport_search_callback.hpp rename to map/viewport_search_callback.hpp index 100a624a47..01085ed233 100644 --- a/search/viewport_search_callback.hpp +++ b/map/viewport_search_callback.hpp @@ -1,14 +1,15 @@ #pragma once +#include "map/booking_filter_params.hpp" + #include "search/hotels_classifier.hpp" +#include "search/result.hpp" #include "search/search_params.hpp" #include namespace search { -class Results; - // An on-results-callback that should be used for interactive search. // // *NOTE* the class is NOT thread safe. @@ -23,13 +24,16 @@ public: virtual void RunUITask(std::function fn) = 0; virtual void SetHotelDisplacementMode() = 0; virtual bool IsViewportSearchActive() const = 0; - virtual void ShowViewportSearchResults(bool clear, Results::ConstIter begin, - Results::ConstIter end) = 0; + virtual void ShowViewportSearchResults(bool clear, booking::filter::Types types, + Results::ConstIter begin, Results::ConstIter end) = 0; + virtual void FilterSearchResultsOnBooking(booking::filter::Tasks const & filterTasks, + search::Results const & results, bool inViewport) = 0; }; using OnResults = SearchParams::OnResults; - ViewportSearchCallback(Delegate & delegate, OnResults const & onResults); + ViewportSearchCallback(Delegate & delegate, booking::filter::Tasks const & bookingFilterTasks, + OnResults const & onResults); void operator()(Results const & results); @@ -37,10 +41,8 @@ private: Delegate & m_delegate; OnResults m_onResults; - bool m_hotelsModeSet; bool m_firstCall; - - HotelsClassifier m_hotelsClassif; size_t m_lastResultsSize; + booking::filter::Tasks m_bookingFilterTasks; }; } // namespace search diff --git a/map/viewport_search_params.hpp b/map/viewport_search_params.hpp index b12ef291bd..c257c0de65 100644 --- a/map/viewport_search_params.hpp +++ b/map/viewport_search_params.hpp @@ -20,7 +20,7 @@ struct ViewportSearchParams std::string m_query; std::string m_inputLocale; std::shared_ptr m_hotelsFilter; - booking::filter::Params m_bookingFilterParams; + booking::filter::Tasks m_bookingFilterTasks; OnStarted m_onStarted; OnCompleted m_onCompleted; diff --git a/partners_api/booking_availability_params.cpp b/partners_api/booking_availability_params.cpp index 9e750e52d2..1ab0f3471a 100644 --- a/partners_api/booking_availability_params.cpp +++ b/partners_api/booking_availability_params.cpp @@ -98,6 +98,9 @@ url::Params AvailabilityParams::Get(UrlFilter const & filter /* = {} */) const if (!m_stars.empty() && IsAcceptedByFilter(filter, "stars")) result.emplace_back("stars", strings::JoinStrings(m_stars, ',')); + if (m_dealsOnly) + result.emplace_back("show_only_deals", "smart,lastm"); + return result; } @@ -114,7 +117,8 @@ bool AvailabilityParams::Equals(ParamsBase const & rhs) const bool AvailabilityParams::Equals(AvailabilityParams const & rhs) const { return m_checkin == rhs.m_checkin && m_checkout == rhs.m_checkout && m_rooms == rhs.m_rooms && - m_minReviewScore == rhs.m_minReviewScore && m_stars == rhs.m_stars; + m_minReviewScore == rhs.m_minReviewScore && m_stars == rhs.m_stars && + m_dealsOnly == rhs.m_dealsOnly; } void AvailabilityParams::Set(ParamsBase const & src) diff --git a/partners_api/booking_availability_params.hpp b/partners_api/booking_availability_params.hpp index 1412165a5a..21f7f148dc 100644 --- a/partners_api/booking_availability_params.hpp +++ b/partners_api/booking_availability_params.hpp @@ -70,5 +70,7 @@ struct AvailabilityParams : public ParamsBase double m_minReviewScore = {}; /// Limit to hotels with the given number(s) of stars. Supported values 1-5. Stars m_stars; + /// Only show rates that are deals of given types. + bool m_dealsOnly = false; }; } // namespace booking diff --git a/search/CMakeLists.txt b/search/CMakeLists.txt index c5963745c2..8285d98fad 100644 --- a/search/CMakeLists.txt +++ b/search/CMakeLists.txt @@ -39,8 +39,6 @@ set( emitter.hpp engine.cpp engine.hpp - everywhere_search_callback.cpp - everywhere_search_callback.hpp feature_loader.cpp feature_loader.hpp feature_offset_match.hpp @@ -154,8 +152,6 @@ set( types_skipper.hpp utils.cpp utils.hpp - viewport_search_callback.cpp - viewport_search_callback.hpp ) add_library(${PROJECT_NAME} ${SRC}) diff --git a/search/hotels_classifier.cpp b/search/hotels_classifier.cpp index f633c61960..3ee7cee47f 100644 --- a/search/hotels_classifier.cpp +++ b/search/hotels_classifier.cpp @@ -1,4 +1,5 @@ #include "search/hotels_classifier.hpp" +#include "search/result.hpp" #include "std/cstdint.hpp" @@ -8,17 +9,24 @@ namespace search bool HotelsClassifier::IsHotelResults(Results const & results) { HotelsClassifier classifier; - classifier.Add(results.begin(), results.end()); + auto first = results.begin(); + for (; first != results.end(); ++first) + { + classifier.Add(*first); + } return classifier.IsHotelResults(); } -void HotelsClassifier::Add(Results::ConstIter begin, Results::ConstIter end) +void HotelsClassifier::Add(Result const & result) { - for (; begin != end; ++begin) - { - m_numHotels += (*begin).m_metadata.m_isHotel; - ++m_numResults; - } + m_numHotels += result.m_metadata.m_isHotel; + ++m_numResults; +} + +void HotelsClassifier::Clear() +{ + m_numHotels = 0; + m_numResults = 0; } bool HotelsClassifier::IsHotelResults() const diff --git a/search/hotels_classifier.hpp b/search/hotels_classifier.hpp index 8b30972557..e772cb2ecb 100644 --- a/search/hotels_classifier.hpp +++ b/search/hotels_classifier.hpp @@ -1,9 +1,11 @@ #pragma once -#include "search/result.hpp" +#include namespace search { +class Result; +class Results; // A binary classifier that can be used in conjunction with search // engine to decide whether the majority of results are hotels or not. // @@ -13,7 +15,9 @@ class HotelsClassifier public: static bool IsHotelResults(Results const & results); - void Add(Results::ConstIter begin, Results::ConstIter end); + void Add(Result const & result); + void Clear(); + bool IsHotelResults() const; private: diff --git a/search/result.cpp b/search/result.cpp index a26f84a4be..a6ee26ddeb 100644 --- a/search/result.cpp +++ b/search/result.cpp @@ -238,6 +238,7 @@ void Results::Clear() m_results.clear(); m_bookmarksResults.clear(); m_status = Status::None; + m_hotelsClassif.Clear(); } size_t Results::GetSuggestsCount() const @@ -256,12 +257,6 @@ bookmarks::Results const & Results::GetBookmarksResults() const return m_bookmarksResults; } -void Results::Swap(Results & rhs) -{ - m_results.swap(rhs.m_results); - m_bookmarksResults.swap(rhs.m_bookmarksResults); -} - void Results::InsertResult(vector::iterator where, Result && result) { ASSERT_LESS(m_results.size(), numeric_limits::max(), ()); @@ -274,6 +269,7 @@ void Results::InsertResult(vector::iterator where, Result && result) } result.SetPositionInResults(static_cast(distance(m_results.begin(), where))); + m_hotelsClassif.Add(result); m_results.insert(where, move(result)); } diff --git a/search/result.hpp b/search/result.hpp index 6a259bc2d9..4ca69dda06 100644 --- a/search/result.hpp +++ b/search/result.hpp @@ -1,5 +1,6 @@ #pragma once #include "search/bookmarks/results.hpp" +#include "search/hotels_classifier.hpp" #include "search/ranking_info.hpp" #include "indexer/feature_decl.hpp" @@ -161,6 +162,12 @@ public: using Iter = std::vector::iterator; using ConstIter = std::vector::const_iterator; + enum class Type + { + Simple, + Hotels + }; + Results(); bool IsEndMarker() const { return m_status != Status::None; } @@ -205,8 +212,6 @@ public: bookmarks::Results const & GetBookmarksResults() const; - void Swap(Results & rhs); - template void SortBy(Fn && comparator) { @@ -215,6 +220,11 @@ public: operator[](i).SetPositionInResults(i); } + Type GetType() const + { + return m_hotelsClassif.IsHotelResults() ? Type::Hotels : Type::Simple; + } + private: enum class Status { @@ -232,6 +242,7 @@ private: std::vector m_results; bookmarks::Results m_bookmarksResults; Status m_status; + HotelsClassifier m_hotelsClassif; }; struct AddressInfo diff --git a/search/search_integration_tests/CMakeLists.txt b/search/search_integration_tests/CMakeLists.txt index 03c5edc2ed..dc202c6a95 100644 --- a/search/search_integration_tests/CMakeLists.txt +++ b/search/search_integration_tests/CMakeLists.txt @@ -4,9 +4,6 @@ set( SRC downloader_search_test.cpp generate_tests.cpp - helpers.cpp - helpers.hpp - interactive_search_test.cpp pre_ranker_test.cpp processor_test.cpp ranker_test.cpp diff --git a/search/search_integration_tests/downloader_search_test.cpp b/search/search_integration_tests/downloader_search_test.cpp index 609fd895f5..af1919cdd5 100644 --- a/search/search_integration_tests/downloader_search_test.cpp +++ b/search/search_integration_tests/downloader_search_test.cpp @@ -5,7 +5,7 @@ #include "search/downloader_search_callback.hpp" #include "search/mode.hpp" #include "search/result.hpp" -#include "search/search_integration_tests/helpers.hpp" +#include "search/search_tests_support/integration_tests_helpers.hpp" #include "search/search_tests_support/test_results_matching.hpp" #include "search/search_tests_support/test_search_request.hpp" diff --git a/search/search_integration_tests/pre_ranker_test.cpp b/search/search_integration_tests/pre_ranker_test.cpp index d18398927a..bade42643d 100644 --- a/search/search_integration_tests/pre_ranker_test.cpp +++ b/search/search_integration_tests/pre_ranker_test.cpp @@ -7,7 +7,7 @@ #include "search/model.hpp" #include "search/pre_ranker.hpp" #include "search/ranker.hpp" -#include "search/search_integration_tests/helpers.hpp" +#include "search/search_tests_support/integration_tests_helpers.hpp" #include "search/search_tests_support/test_search_engine.hpp" #include "search/suggest.hpp" diff --git a/search/search_integration_tests/processor_test.cpp b/search/search_integration_tests/processor_test.cpp index 3799661eed..e4f66d2bd3 100644 --- a/search/search_integration_tests/processor_test.cpp +++ b/search/search_integration_tests/processor_test.cpp @@ -3,7 +3,7 @@ #include "search/cities_boundaries_table.hpp" #include "search/features_layer_path_finder.hpp" #include "search/retrieval.hpp" -#include "search/search_integration_tests/helpers.hpp" +#include "search/search_tests_support/integration_tests_helpers.hpp" #include "search/search_tests_support/test_results_matching.hpp" #include "search/search_tests_support/test_search_request.hpp" #include "search/token_range.hpp" diff --git a/search/search_integration_tests/ranker_test.cpp b/search/search_integration_tests/ranker_test.cpp index 48a7a7a73f..30f33f0c87 100644 --- a/search/search_integration_tests/ranker_test.cpp +++ b/search/search_integration_tests/ranker_test.cpp @@ -1,6 +1,6 @@ #include "testing/testing.hpp" -#include "search/search_integration_tests/helpers.hpp" +#include "search/search_tests_support/integration_tests_helpers.hpp" #include "search/search_tests_support/test_results_matching.hpp" #include "generator/generator_tests_support/test_feature.hpp" diff --git a/search/search_integration_tests/search_edited_features_test.cpp b/search/search_integration_tests/search_edited_features_test.cpp index 6b7722a995..8936788980 100644 --- a/search/search_integration_tests/search_edited_features_test.cpp +++ b/search/search_integration_tests/search_edited_features_test.cpp @@ -1,6 +1,6 @@ #include "testing/testing.hpp" -#include "search/search_integration_tests/helpers.hpp" +#include "search/search_tests_support/integration_tests_helpers.hpp" #include "search/search_tests_support/test_results_matching.hpp" diff --git a/search/search_integration_tests/smoke_test.cpp b/search/search_integration_tests/smoke_test.cpp index 0a7f8a6b2d..40f50b0805 100644 --- a/search/search_integration_tests/smoke_test.cpp +++ b/search/search_integration_tests/smoke_test.cpp @@ -1,6 +1,6 @@ #include "testing/testing.hpp" -#include "search/search_integration_tests/helpers.hpp" +#include "search/search_tests_support/integration_tests_helpers.hpp" #include "search/search_tests_support/test_results_matching.hpp" #include "search/search_tests_support/test_search_request.hpp" diff --git a/search/search_integration_tests/tracer_tests.cpp b/search/search_integration_tests/tracer_tests.cpp index 902279e9d7..4e383fbf42 100644 --- a/search/search_integration_tests/tracer_tests.cpp +++ b/search/search_integration_tests/tracer_tests.cpp @@ -1,7 +1,7 @@ #include "testing/testing.hpp" #include "search/geocoder_context.hpp" -#include "search/search_integration_tests/helpers.hpp" +#include "search/search_tests_support/integration_tests_helpers.hpp" #include "search/search_tests_support/test_results_matching.hpp" #include "search/tracer.hpp" diff --git a/search/search_tests_support/CMakeLists.txt b/search/search_tests_support/CMakeLists.txt index 7cf983b7d9..3464f8033c 100644 --- a/search/search_tests_support/CMakeLists.txt +++ b/search/search_tests_support/CMakeLists.txt @@ -2,6 +2,8 @@ project(search_tests_support) set( SRC + integration_tests_helpers.cpp + integration_tests_helpers.hpp test_results_matching.cpp test_results_matching.hpp test_search_engine.cpp diff --git a/search/search_integration_tests/helpers.cpp b/search/search_tests_support/integration_tests_helpers.cpp similarity index 94% rename from search/search_integration_tests/helpers.cpp rename to search/search_tests_support/integration_tests_helpers.cpp index 220a5ee403..d230dc13a0 100644 --- a/search/search_integration_tests/helpers.cpp +++ b/search/search_tests_support/integration_tests_helpers.cpp @@ -1,4 +1,4 @@ -#include "search/search_integration_tests/helpers.hpp" +#include "search/search_tests_support/integration_tests_helpers.hpp" #include "storage/country_info_getter.hpp" @@ -31,8 +31,7 @@ bool SearchTest::ResultsMatch(string const & query, return ResultsMatch(query, "en" /* locale */, rules); } -bool SearchTest::ResultsMatch(string const & query, - string const & locale, +bool SearchTest::ResultsMatch(string const & query, string const & locale, vector> const & rules) { tests_support::TestSearchRequest request(m_engine, query, locale, Mode::Everywhere, m_viewport); diff --git a/search/search_integration_tests/helpers.hpp b/search/search_tests_support/integration_tests_helpers.hpp similarity index 100% rename from search/search_integration_tests/helpers.hpp rename to search/search_tests_support/integration_tests_helpers.hpp diff --git a/xcode/map/map.xcodeproj/project.pbxproj b/xcode/map/map.xcodeproj/project.pbxproj index fcb3f9291f..7e32eba63c 100644 --- a/xcode/map/map.xcodeproj/project.pbxproj +++ b/xcode/map/map.xcodeproj/project.pbxproj @@ -39,6 +39,40 @@ 3DA5714120B5CC80007BDE27 /* booking_availability_filter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3DA5713C20B5CC7F007BDE27 /* booking_availability_filter.cpp */; }; 3DA5714220B5CC80007BDE27 /* booking_filter_processor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3DA5713D20B5CC7F007BDE27 /* booking_filter_processor.cpp */; }; 3DA5714320B5CC80007BDE27 /* booking_filter_processor.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 3DA5713E20B5CC7F007BDE27 /* booking_filter_processor.hpp */; }; + 3DA571F020C19262007BDE27 /* interactive_search_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3DA571EF20C19262007BDE27 /* interactive_search_test.cpp */; }; + 3DA571F120C19289007BDE27 /* testingmain.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 674A29EE1B26FD5F001A525C /* testingmain.cpp */; }; + 3DA571F320C1935B007BDE27 /* libalohalitics.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DA571F220C1935B007BDE27 /* libalohalitics.a */; }; + 3DA571F520C1935B007BDE27 /* libbase.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DA571F420C1935B007BDE27 /* libbase.a */; }; + 3DA571F720C1935B007BDE27 /* libeditor_tests_support.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DA571F620C1935B007BDE27 /* libeditor_tests_support.a */; }; + 3DA571F920C1935B007BDE27 /* libeditor.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DA571F820C1935B007BDE27 /* libeditor.a */; }; + 3DA571FB20C1935B007BDE27 /* libgenerator_tests_support.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DA571FA20C1935B007BDE27 /* libgenerator_tests_support.a */; }; + 3DA571FD20C1935B007BDE27 /* libicu.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DA571FC20C1935B007BDE27 /* libicu.a */; }; + 3DA571FF20C1935B007BDE27 /* libindexer_tests_support.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DA571FE20C1935B007BDE27 /* libindexer_tests_support.a */; }; + 3DA5720120C1935C007BDE27 /* libindexer.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DA5720020C1935C007BDE27 /* libindexer.a */; }; + 3DA5720320C1935C007BDE27 /* libjansson.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DA5720220C1935C007BDE27 /* libjansson.a */; }; + 3DA5720520C1935C007BDE27 /* liboauthcpp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DA5720420C1935C007BDE27 /* liboauthcpp.a */; }; + 3DA5720720C1935C007BDE27 /* libplatform_tests_support.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DA5720620C1935C007BDE27 /* libplatform_tests_support.a */; }; + 3DA5720920C1935C007BDE27 /* libplatform.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DA5720820C1935C007BDE27 /* libplatform.a */; }; + 3DA5720B20C1935C007BDE27 /* librouting_common.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DA5720A20C1935C007BDE27 /* librouting_common.a */; }; + 3DA5720D20C1935C007BDE27 /* librouting.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DA5720C20C1935C007BDE27 /* librouting.a */; }; + 3DA5720F20C1935C007BDE27 /* libsearch_tests_support.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DA5720E20C1935C007BDE27 /* libsearch_tests_support.a */; }; + 3DA5721120C1935C007BDE27 /* libsearch.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DA5721020C1935C007BDE27 /* libsearch.a */; }; + 3DA5721320C1935C007BDE27 /* libstorage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DA5721220C1935C007BDE27 /* libstorage.a */; }; + 3DA5721520C1935C007BDE27 /* libsuccinct.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DA5721420C1935C007BDE27 /* libsuccinct.a */; }; + 3DA5721720C1935C007BDE27 /* libtess2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DA5721620C1935C007BDE27 /* libtess2.a */; }; + 3DA5721820C1935C007BDE27 /* libmap.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 675345BB1A4054AD00A0A8C3 /* libmap.a */; }; + 3DA5721A20C1946F007BDE27 /* libcoding.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DA5721920C1946F007BDE27 /* libcoding.a */; }; + 3DA5721C20C1946F007BDE27 /* libgeometry.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DA5721B20C1946F007BDE27 /* libgeometry.a */; }; + 3DA5721E20C194B8007BDE27 /* libgenerator.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DA5721D20C194B8007BDE27 /* libgenerator.a */; }; + 3DA5722020C194B8007BDE27 /* libopen_location_code.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DA5721F20C194B8007BDE27 /* libopen_location_code.a */; }; + 3DA5722220C194B8007BDE27 /* libopening_hours.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DA5722120C194B8007BDE27 /* libopening_hours.a */; }; + 3DA5722420C194B8007BDE27 /* libprotobuf.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DA5722320C194B8007BDE27 /* libprotobuf.a */; }; + 3DA5722620C194B8007BDE27 /* libpugixml.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DA5722520C194B8007BDE27 /* libpugixml.a */; }; + 3DA5722720C1951D007BDE27 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 67F183741BD5041700AB1840 /* libz.tbd */; }; + 3DA5723020C195ED007BDE27 /* viewport_search_callback.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 3DA5722C20C195EC007BDE27 /* viewport_search_callback.hpp */; }; + 3DA5723120C195ED007BDE27 /* everywhere_search_callback.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 3DA5722D20C195EC007BDE27 /* everywhere_search_callback.hpp */; }; + 3DA5723220C195ED007BDE27 /* everywhere_search_callback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3DA5722E20C195EC007BDE27 /* everywhere_search_callback.cpp */; }; + 3DA5723320C195ED007BDE27 /* viewport_search_callback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3DA5722F20C195EC007BDE27 /* viewport_search_callback.cpp */; }; 45201E931CE4AC90008A4842 /* api_mark_point.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 45201E921CE4AC90008A4842 /* api_mark_point.cpp */; }; 454523A9202A0068009275C1 /* cloud.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 454523A7202A0067009275C1 /* cloud.cpp */; }; 454523AA202A0068009275C1 /* cloud.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 454523A8202A0067009275C1 /* cloud.hpp */; }; @@ -211,6 +245,38 @@ 3DA5713C20B5CC7F007BDE27 /* booking_availability_filter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = booking_availability_filter.cpp; sourceTree = ""; }; 3DA5713D20B5CC7F007BDE27 /* booking_filter_processor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = booking_filter_processor.cpp; sourceTree = ""; }; 3DA5713E20B5CC7F007BDE27 /* booking_filter_processor.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = booking_filter_processor.hpp; sourceTree = ""; }; + 3DA571D820C1921D007BDE27 /* map_integration_tests.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = map_integration_tests.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 3DA571EF20C19262007BDE27 /* interactive_search_test.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = interactive_search_test.cpp; sourceTree = ""; }; + 3DA571F220C1935B007BDE27 /* libalohalitics.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libalohalitics.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 3DA571F420C1935B007BDE27 /* libbase.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libbase.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 3DA571F620C1935B007BDE27 /* libeditor_tests_support.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libeditor_tests_support.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 3DA571F820C1935B007BDE27 /* libeditor.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libeditor.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 3DA571FA20C1935B007BDE27 /* libgenerator_tests_support.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libgenerator_tests_support.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 3DA571FC20C1935B007BDE27 /* libicu.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libicu.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 3DA571FE20C1935B007BDE27 /* libindexer_tests_support.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libindexer_tests_support.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 3DA5720020C1935C007BDE27 /* libindexer.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libindexer.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 3DA5720220C1935C007BDE27 /* libjansson.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libjansson.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 3DA5720420C1935C007BDE27 /* liboauthcpp.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = liboauthcpp.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 3DA5720620C1935C007BDE27 /* libplatform_tests_support.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libplatform_tests_support.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 3DA5720820C1935C007BDE27 /* libplatform.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libplatform.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 3DA5720A20C1935C007BDE27 /* librouting_common.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = librouting_common.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 3DA5720C20C1935C007BDE27 /* librouting.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = librouting.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 3DA5720E20C1935C007BDE27 /* libsearch_tests_support.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libsearch_tests_support.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 3DA5721020C1935C007BDE27 /* libsearch.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libsearch.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 3DA5721220C1935C007BDE27 /* libstorage.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libstorage.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 3DA5721420C1935C007BDE27 /* libsuccinct.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libsuccinct.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 3DA5721620C1935C007BDE27 /* libtess2.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libtess2.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 3DA5721920C1946F007BDE27 /* libcoding.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libcoding.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 3DA5721B20C1946F007BDE27 /* libgeometry.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libgeometry.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 3DA5721D20C194B8007BDE27 /* libgenerator.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libgenerator.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 3DA5721F20C194B8007BDE27 /* libopen_location_code.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libopen_location_code.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 3DA5722120C194B8007BDE27 /* libopening_hours.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libopening_hours.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 3DA5722320C194B8007BDE27 /* libprotobuf.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libprotobuf.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 3DA5722520C194B8007BDE27 /* libpugixml.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libpugixml.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 3DA5722C20C195EC007BDE27 /* viewport_search_callback.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = viewport_search_callback.hpp; sourceTree = ""; }; + 3DA5722D20C195EC007BDE27 /* everywhere_search_callback.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = everywhere_search_callback.hpp; sourceTree = ""; }; + 3DA5722E20C195EC007BDE27 /* everywhere_search_callback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = everywhere_search_callback.cpp; sourceTree = ""; }; + 3DA5722F20C195EC007BDE27 /* viewport_search_callback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = viewport_search_callback.cpp; sourceTree = ""; }; 45201E921CE4AC90008A4842 /* api_mark_point.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = api_mark_point.cpp; sourceTree = ""; }; 454523A7202A0067009275C1 /* cloud.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cloud.cpp; sourceTree = ""; }; 454523A8202A0067009275C1 /* cloud.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = cloud.hpp; sourceTree = ""; }; @@ -352,6 +418,41 @@ /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ + 3DA571D520C1921D007BDE27 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 3DA5722720C1951D007BDE27 /* libz.tbd in Frameworks */, + 3DA5721E20C194B8007BDE27 /* libgenerator.a in Frameworks */, + 3DA5722020C194B8007BDE27 /* libopen_location_code.a in Frameworks */, + 3DA5722220C194B8007BDE27 /* libopening_hours.a in Frameworks */, + 3DA5722420C194B8007BDE27 /* libprotobuf.a in Frameworks */, + 3DA5722620C194B8007BDE27 /* libpugixml.a in Frameworks */, + 3DA5721A20C1946F007BDE27 /* libcoding.a in Frameworks */, + 3DA5721C20C1946F007BDE27 /* libgeometry.a in Frameworks */, + 3DA5721820C1935C007BDE27 /* libmap.a in Frameworks */, + 3DA571F320C1935B007BDE27 /* libalohalitics.a in Frameworks */, + 3DA571F520C1935B007BDE27 /* libbase.a in Frameworks */, + 3DA571F720C1935B007BDE27 /* libeditor_tests_support.a in Frameworks */, + 3DA571F920C1935B007BDE27 /* libeditor.a in Frameworks */, + 3DA571FB20C1935B007BDE27 /* libgenerator_tests_support.a in Frameworks */, + 3DA571FD20C1935B007BDE27 /* libicu.a in Frameworks */, + 3DA571FF20C1935B007BDE27 /* libindexer_tests_support.a in Frameworks */, + 3DA5720120C1935C007BDE27 /* libindexer.a in Frameworks */, + 3DA5720320C1935C007BDE27 /* libjansson.a in Frameworks */, + 3DA5720520C1935C007BDE27 /* liboauthcpp.a in Frameworks */, + 3DA5720720C1935C007BDE27 /* libplatform_tests_support.a in Frameworks */, + 3DA5720920C1935C007BDE27 /* libplatform.a in Frameworks */, + 3DA5720B20C1935C007BDE27 /* librouting_common.a in Frameworks */, + 3DA5720D20C1935C007BDE27 /* librouting.a in Frameworks */, + 3DA5720F20C1935C007BDE27 /* libsearch_tests_support.a in Frameworks */, + 3DA5721120C1935C007BDE27 /* libsearch.a in Frameworks */, + 3DA5721320C1935C007BDE27 /* libstorage.a in Frameworks */, + 3DA5721520C1935C007BDE27 /* libsuccinct.a in Frameworks */, + 3DA5721720C1935C007BDE27 /* libtess2.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 674A29DC1B26FD1C001A525C /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -418,6 +519,32 @@ 34DDA17E1DBE5DF40088A609 /* Frameworks */ = { isa = PBXGroup; children = ( + 3DA5721D20C194B8007BDE27 /* libgenerator.a */, + 3DA5721F20C194B8007BDE27 /* libopen_location_code.a */, + 3DA5722120C194B8007BDE27 /* libopening_hours.a */, + 3DA5722320C194B8007BDE27 /* libprotobuf.a */, + 3DA5722520C194B8007BDE27 /* libpugixml.a */, + 3DA5721920C1946F007BDE27 /* libcoding.a */, + 3DA5721B20C1946F007BDE27 /* libgeometry.a */, + 3DA571F220C1935B007BDE27 /* libalohalitics.a */, + 3DA571F420C1935B007BDE27 /* libbase.a */, + 3DA571F620C1935B007BDE27 /* libeditor_tests_support.a */, + 3DA571F820C1935B007BDE27 /* libeditor.a */, + 3DA571FA20C1935B007BDE27 /* libgenerator_tests_support.a */, + 3DA571FC20C1935B007BDE27 /* libicu.a */, + 3DA571FE20C1935B007BDE27 /* libindexer_tests_support.a */, + 3DA5720020C1935C007BDE27 /* libindexer.a */, + 3DA5720220C1935C007BDE27 /* libjansson.a */, + 3DA5720420C1935C007BDE27 /* liboauthcpp.a */, + 3DA5720620C1935C007BDE27 /* libplatform_tests_support.a */, + 3DA5720820C1935C007BDE27 /* libplatform.a */, + 3DA5720A20C1935C007BDE27 /* librouting_common.a */, + 3DA5720C20C1935C007BDE27 /* librouting.a */, + 3DA5720E20C1935C007BDE27 /* libsearch_tests_support.a */, + 3DA5721020C1935C007BDE27 /* libsearch.a */, + 3DA5721220C1935C007BDE27 /* libstorage.a */, + 3DA5721420C1935C007BDE27 /* libsuccinct.a */, + 3DA5721620C1935C007BDE27 /* libtess2.a */, 47A9D82320A19EC300E4671B /* libkml.a */, 47A9D82120A19E9E00E4671B /* libopen_location_code.a */, 56EE14D81FE80F290036F20C /* libbsdiff.a */, @@ -437,6 +564,15 @@ name = Frameworks; sourceTree = ""; }; + 3DA571D920C1921D007BDE27 /* map_integration_tests */ = { + isa = PBXGroup; + children = ( + 3DA571EF20C19262007BDE27 /* interactive_search_test.cpp */, + ); + name = map_integration_tests; + path = ../../map/map_integration_tests; + sourceTree = ""; + }; 674A29CA1B26FCC0001A525C /* map_tests */ = { isa = PBXGroup; children = ( @@ -519,6 +655,7 @@ 674A2A341B2700B2001A525C /* libs */, 675345BD1A4054AD00A0A8C3 /* map */, 674A29CA1B26FCC0001A525C /* map_tests */, + 3DA571D920C1921D007BDE27 /* map_integration_tests */, 675345BC1A4054AD00A0A8C3 /* Products */, 34DDA17E1DBE5DF40088A609 /* Frameworks */, ); @@ -529,6 +666,7 @@ children = ( 675345BB1A4054AD00A0A8C3 /* libmap.a */, 674A29DF1B26FD1C001A525C /* map_tests.app */, + 3DA571D820C1921D007BDE27 /* map_integration_tests.app */, ); name = Products; sourceTree = ""; @@ -536,18 +674,18 @@ 675345BD1A4054AD00A0A8C3 /* map */ = { isa = PBXGroup; children = ( - 3DA5713C20B5CC7F007BDE27 /* booking_availability_filter.cpp */, - 3DA5713A20B5CC7F007BDE27 /* booking_availability_filter.hpp */, - 3DA5713B20B5CC7F007BDE27 /* booking_filter_params.hpp */, - 3DA5713D20B5CC7F007BDE27 /* booking_filter_processor.cpp */, - 3DA5713E20B5CC7F007BDE27 /* booking_filter_processor.hpp */, 675345CB1A4054E800A0A8C3 /* address_finder.cpp */, 45201E921CE4AC90008A4842 /* api_mark_point.cpp */, 34921F611BFA0A6900737D6E /* api_mark_point.hpp */, 45580ABC1E2CBD5E00CD535D /* benchmark_tools.cpp */, 45580ABD1E2CBD5E00CD535D /* benchmark_tools.hpp */, + 3DA5713C20B5CC7F007BDE27 /* booking_availability_filter.cpp */, + 3DA5713A20B5CC7F007BDE27 /* booking_availability_filter.hpp */, 3D4E999F1FB4A6400025B48C /* booking_filter_cache.cpp */, 3D4E999E1FB4A6400025B48C /* booking_filter_cache.hpp */, + 3DA5713B20B5CC7F007BDE27 /* booking_filter_params.hpp */, + 3DA5713D20B5CC7F007BDE27 /* booking_filter_processor.cpp */, + 3DA5713E20B5CC7F007BDE27 /* booking_filter_processor.hpp */, 3D4E99A11FB4A6410025B48C /* booking_filter.hpp */, 4564FA81209497A70043CCFB /* bookmark_catalog.cpp */, 4564FA80209497A60043CCFB /* bookmark_catalog.hpp */, @@ -567,6 +705,8 @@ 342D83391D5233E8000D8AEA /* displacement_mode_manager.hpp */, 3D47B2C51F20EF06000828D2 /* displayed_categories_modifiers.cpp */, 3D47B2C61F20EF06000828D2 /* displayed_categories_modifiers.hpp */, + 3DA5722E20C195EC007BDE27 /* everywhere_search_callback.cpp */, + 3DA5722D20C195EC007BDE27 /* everywhere_search_callback.hpp */, 3D4E99801FB462B60025B48C /* everywhere_search_params.hpp */, 675345F31A4054E800A0A8C3 /* feature_vec_model.cpp */, 675345F41A4054E800A0A8C3 /* feature_vec_model.hpp */, @@ -623,6 +763,8 @@ 675346331A4054E800A0A8C3 /* user_mark.hpp */, 45A2D9D31F7556EB003310A0 /* user.cpp */, 45A2D9D41F7556EB003310A0 /* user.hpp */, + 3DA5722F20C195EC007BDE27 /* viewport_search_callback.cpp */, + 3DA5722C20C195EC007BDE27 /* viewport_search_callback.hpp */, 3D4E99811FB462B60025B48C /* viewport_search_params.hpp */, ); name = map; @@ -693,6 +835,8 @@ 3D4E99A21FB4A6410025B48C /* booking_filter_cache.hpp in Headers */, F6D67CE32063F4980032FD38 /* framework_light.hpp in Headers */, 45F6EE9D1FB1C77600019892 /* search_api.hpp in Headers */, + 3DA5723120C195ED007BDE27 /* everywhere_search_callback.hpp in Headers */, + 3DA5723020C195ED007BDE27 /* viewport_search_callback.hpp in Headers */, F6FC3CB51FC323430001D929 /* discovery_client_params.hpp in Headers */, 0831F23C200E53600034C365 /* bookmarks_search_params.hpp in Headers */, 0C2B73DF1E92AB9900530BB8 /* local_ads_manager.hpp in Headers */, @@ -715,6 +859,23 @@ /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ + 3DA571D720C1921D007BDE27 /* map_integration_tests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 3DA571EE20C1921E007BDE27 /* Build configuration list for PBXNativeTarget "map_integration_tests" */; + buildPhases = ( + 3DA571D420C1921D007BDE27 /* Sources */, + 3DA571D520C1921D007BDE27 /* Frameworks */, + 3DA571D620C1921D007BDE27 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = map_integration_tests; + productName = map_integration_tests; + productReference = 3DA571D820C1921D007BDE27 /* map_integration_tests.app */; + productType = "com.apple.product-type.application"; + }; 674A29DE1B26FD1C001A525C /* map_tests */ = { isa = PBXNativeTarget; buildConfigurationList = 674A29E31B26FD1C001A525C /* Build configuration list for PBXNativeTarget "map_tests" */; @@ -758,6 +919,9 @@ LastUpgradeCheck = 0700; ORGANIZATIONNAME = maps.me; TargetAttributes = { + 3DA571D720C1921D007BDE27 = { + CreatedOnToolsVersion = 9.3.1; + }; 674A29DE1B26FD1C001A525C = { CreatedOnToolsVersion = 6.3.2; }; @@ -772,6 +936,7 @@ hasScannedForEncodings = 0; knownRegions = ( en, + Base, ); mainGroup = 675345B21A4054AD00A0A8C3; productRefGroup = 675345BC1A4054AD00A0A8C3 /* Products */; @@ -780,11 +945,31 @@ targets = ( 675345BA1A4054AD00A0A8C3 /* map */, 674A29DE1B26FD1C001A525C /* map_tests */, + 3DA571D720C1921D007BDE27 /* map_integration_tests */, ); }; /* End PBXProject section */ +/* Begin PBXResourcesBuildPhase section */ + 3DA571D620C1921D007BDE27 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + /* Begin PBXSourcesBuildPhase section */ + 3DA571D420C1921D007BDE27 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 3DA571F020C19262007BDE27 /* interactive_search_test.cpp in Sources */, + 3DA571F120C19289007BDE27 /* testingmain.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 674A29DB1B26FD1C001A525C /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -831,6 +1016,7 @@ 675346621A4054E800A0A8C3 /* feature_vec_model.cpp in Sources */, 454523A9202A0068009275C1 /* cloud.cpp in Sources */, 674C38621BFF3095000D603B /* user_mark.cpp in Sources */, + 3DA5723320C195ED007BDE27 /* viewport_search_callback.cpp in Sources */, 675346641A4054E800A0A8C3 /* framework.cpp in Sources */, BB4E5F281FCC664A00A77250 /* transit_reader.cpp in Sources */, 454649F11F2728CE00EF4064 /* local_ads_mark.cpp in Sources */, @@ -853,6 +1039,7 @@ BBA014B220754997007402E4 /* user_mark_id_storage.cpp in Sources */, 6753464A1A4054E800A0A8C3 /* bookmark.cpp in Sources */, 45580ABE1E2CBD5E00CD535D /* benchmark_tools.cpp in Sources */, + 3DA5723220C195ED007BDE27 /* everywhere_search_callback.cpp in Sources */, BBD9E2C61EE9D01900DF189A /* routing_mark.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -860,6 +1047,30 @@ /* End PBXSourcesBuildPhase section */ /* Begin XCBuildConfiguration section */ + 3DA571EB20C1921E007BDE27 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_BUNDLE_IDENTIFIER = "maps.me.map-integration-tests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 3DA571EC20C1921E007BDE27 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_BUNDLE_IDENTIFIER = "maps.me.map-integration-tests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; + 3DA571ED20C1921E007BDE27 /* Production Full */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_BUNDLE_IDENTIFIER = "maps.me.map-integration-tests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = "Production Full"; + }; 674A29E41B26FD1C001A525C /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -986,6 +1197,16 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ + 3DA571EE20C1921E007BDE27 /* Build configuration list for PBXNativeTarget "map_integration_tests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 3DA571EB20C1921E007BDE27 /* Debug */, + 3DA571EC20C1921E007BDE27 /* Release */, + 3DA571ED20C1921E007BDE27 /* Production Full */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; 674A29E31B26FD1C001A525C /* Build configuration list for PBXNativeTarget "map_tests" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/xcode/map/map_tests copy-Info.plist b/xcode/map/map_tests copy-Info.plist new file mode 100644 index 0000000000..7327b8f105 --- /dev/null +++ b/xcode/map/map_tests copy-Info.plist @@ -0,0 +1,269 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + ${PRODUCT_NAME} + CFBundleDocumentTypes + + + CFBundleTypeIconFiles + + 320-pro.png + 64-pro.png + 44x58-pro.png + 22x29-pro.png + + CFBundleTypeName + Google Earth KML Document + LSItemContentTypes + + com.google.earth.kml + + + + CFBundleTypeIconFiles + + 320-pro.png + 64-pro.png + 44x58-pro.png + 22x29-pro.png + + CFBundleTypeName + Google Earth KMZ Document + LSItemContentTypes + + com.google.earth.kmz + + + + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + ${CURRENT_PROJECT_VERSION} + CFBundleSignature + ???? + CFBundleURLTypes + + + CFBundleTypeRole + Viewer + CFBundleURLName + com.mapswithme.maps + CFBundleURLSchemes + + mapswithme + mapsme + ge0 + geo + fb185237551520383 + mapswithmepro + + + + CFBundleTypeRole + Editor + CFBundleURLSchemes + + com.googleusercontent.apps.1033279251462-k2pp753lp1f39dacjn0pkurcc8pbbvsi + + + + CFBundleVersion + 0 + Fabric + + APIKey + 2773ac2121a74ed96c8cfd4009ed7ea1eb0d2313 + Kits + + + KitInfo + + KitName + Crashlytics + + + + FacebookAppID + 185237551520383 + FacebookDisplayName + MapsWithMe, offline maps + LSApplicationQueriesSchemes + + fbapi + fb-messenger-api + fbauth2 + fbshareextension + uber + yandextaxi + tel + booking + + LSRequiresIPhoneOS + + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + NSExceptionDomains + + akamaihd.net + + NSIncludesSubdomains + + NSThirdPartyExceptionRequiresForwardSecrecy + + + facebook.com + + NSIncludesSubdomains + + NSThirdPartyExceptionRequiresForwardSecrecy + + + fbcdn.net + + NSIncludesSubdomains + + NSThirdPartyExceptionRequiresForwardSecrecy + + + maps.me + + NSExceptionAllowsInsecureHTTPLoads + + NSIncludesSubdomains + + + mapswithme.com + + NSExceptionAllowsInsecureHTTPLoads + + NSIncludesSubdomains + + + + + NSCameraUsageDescription + Unused by an application + NSPhotoLibraryUsageDescription + Unused by an application + PW_USE_GPS + + Pushwoosh_APPID + 84E00-0F767 + Pushwoosh_LOG_LEVEL + WARNING + UIApplicationShortcutItems + + + UIApplicationShortcutItemIconFile + ic_3dtouch_search + UIApplicationShortcutItemTitle + search + UIApplicationShortcutItemType + me.maps.3daction.search + + + UIApplicationShortcutItemIconFile + ic_3dtouch_bookmarks + UIApplicationShortcutItemTitle + bookmarks + UIApplicationShortcutItemType + me.maps.3daction.bookmarks + + + UIApplicationShortcutItemIconFile + ic_3dtouch_planing_route + UIApplicationShortcutItemTitle + route + UIApplicationShortcutItemType + me.maps.3daction.route + + + UIBackgroundModes + + audio + fetch + location + remote-notification + + UIFileSharingEnabled + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIPrerenderedIcon + + UIStatusBarHidden + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UTImportedTypeDeclarations + + + UTTypeConformsTo + + public.xml + + UTTypeDescription + Google Earth KML Document + UTTypeIdentifier + com.google.earth.kml + UTTypeReferenceURL + http://earth.google.com/kml/ + UTTypeTagSpecification + + com.apple.ostype + GKml + public.filename-extension + + kml + + public.mime-type + application/vnd.google-earth.kml+xml + + + + UTTypeConformsTo + + com.pkware.zip-archive + + UTTypeDescription + Google Earth KMZ Document + UTTypeIdentifier + com.google.earth.kmz + UTTypeReferenceURL + http://earth.google.com/kmz/ + UTTypeTagSpecification + + com.apple.ostype + GKmz + public.filename-extension + + kmz + + public.mime-type + application/vnd.google-earth.kmz+xml + + + + + diff --git a/xcode/search/search.xcodeproj/project.pbxproj b/xcode/search/search.xcodeproj/project.pbxproj index 834ba85901..a19bff775f 100644 --- a/xcode/search/search.xcodeproj/project.pbxproj +++ b/xcode/search/search.xcodeproj/project.pbxproj @@ -48,8 +48,6 @@ 3461C9A51D79949600E6E6F5 /* utils.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 3461C9A11D79949600E6E6F5 /* utils.hpp */; }; 3465B2821D5DE71A0021E14D /* search_params.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3465B27D1D5DE71A0021E14D /* search_params.cpp */; }; 3465B2831D5DE71A0021E14D /* search_params.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 3465B27E1D5DE71A0021E14D /* search_params.hpp */; }; - 3465B2841D5DE71A0021E14D /* viewport_search_callback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3465B27F1D5DE71A0021E14D /* viewport_search_callback.cpp */; }; - 3465B2851D5DE71A0021E14D /* viewport_search_callback.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 3465B2801D5DE71A0021E14D /* viewport_search_callback.hpp */; }; 347F33161C4540A8009758CC /* cancel_exception.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 347F32FB1C4540A8009758CC /* cancel_exception.hpp */; }; 347F33191C4540A8009758CC /* dummy_rank_table.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 347F32FE1C4540A8009758CC /* dummy_rank_table.cpp */; }; 347F331A1C4540A8009758CC /* dummy_rank_table.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 347F32FF1C4540A8009758CC /* dummy_rank_table.hpp */; }; @@ -122,11 +120,8 @@ 39AEF87A1FB45E1600943FC9 /* libindexer.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 671C62271AE9233200076BD0 /* libindexer.a */; }; 39AEF87B1FB45E1600943FC9 /* libsearch.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 675346B01A4055CF00A0A8C3 /* libsearch.a */; }; 39AEF87C1FB45E1600943FC9 /* libsearch_tests_support.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 679624831D10133300AE4E3C /* libsearch_tests_support.a */; }; - 39B2B9401FB461F800AB85A1 /* interactive_search_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 39B2B93B1FB461F800AB85A1 /* interactive_search_test.cpp */; }; 39B2B9411FB461F800AB85A1 /* generate_tests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 39B2B93C1FB461F800AB85A1 /* generate_tests.cpp */; }; 39B2B9421FB461F800AB85A1 /* downloader_search_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 39B2B93D1FB461F800AB85A1 /* downloader_search_test.cpp */; }; - 39B2B9431FB461F800AB85A1 /* helpers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 39B2B93E1FB461F800AB85A1 /* helpers.cpp */; }; - 39B2B9441FB461F800AB85A1 /* helpers.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 39B2B93F1FB461F800AB85A1 /* helpers.hpp */; }; 39B2B9491FB4620200AB85A1 /* pre_ranker_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 39B2B9451FB4620200AB85A1 /* pre_ranker_test.cpp */; }; 39B2B94A1FB4620200AB85A1 /* processor_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 39B2B9461FB4620200AB85A1 /* processor_test.cpp */; }; 39B2B94B1FB4620200AB85A1 /* ranker_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 39B2B9471FB4620200AB85A1 /* ranker_test.cpp */; }; @@ -141,8 +136,6 @@ 39B2B9561FB4621D00AB85A1 /* search_edited_features_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 39B2B9481FB4620200AB85A1 /* search_edited_features_test.cpp */; }; 39B2B9571FB4621D00AB85A1 /* downloader_search_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 39B2B93D1FB461F800AB85A1 /* downloader_search_test.cpp */; }; 39B2B9581FB4621D00AB85A1 /* generate_tests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 39B2B93C1FB461F800AB85A1 /* generate_tests.cpp */; }; - 39B2B9591FB4621D00AB85A1 /* helpers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 39B2B93E1FB461F800AB85A1 /* helpers.cpp */; }; - 39B2B95B1FB4621D00AB85A1 /* interactive_search_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 39B2B93B1FB461F800AB85A1 /* interactive_search_test.cpp */; }; 39B2B95C1FB4624800AB85A1 /* libgenerator_tests_support.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 39B2B95D1FB4624800AB85A1 /* libgenerator_tests_support.a */; }; 39B2B95E1FB4625A00AB85A1 /* libindexer_tests_support.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 39B2B95F1FB4625A00AB85A1 /* libindexer_tests_support.a */; }; 39B2B9601FB4627600AB85A1 /* libgenerator.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 39B2B9611FB4627600AB85A1 /* libgenerator.a */; }; @@ -161,8 +154,8 @@ 39BBC1421F9FD68C009D1687 /* highlighting_tests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 39BBC1411F9FD68C009D1687 /* highlighting_tests.cpp */; }; 3D0AEB021FBB102C00AD042B /* libgenerator_tests_support.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3D0AEB041FBB102C00AD042B /* libgenerator_tests_support.a */; }; 3D0AEB031FBB102C00AD042B /* libindexer_tests_support.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3D0AEB051FBB102C00AD042B /* libindexer_tests_support.a */; }; - 3DF37FAA1EA11B380012CB31 /* everywhere_search_callback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3DF37FA81EA11B380012CB31 /* everywhere_search_callback.cpp */; }; - 3DF37FAB1EA11B380012CB31 /* everywhere_search_callback.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 3DF37FA91EA11B380012CB31 /* everywhere_search_callback.hpp */; }; + 3DA5722A20C1956D007BDE27 /* integration_tests_helpers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3DA5722820C1956D007BDE27 /* integration_tests_helpers.cpp */; }; + 3DA5722B20C1956D007BDE27 /* integration_tests_helpers.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 3DA5722920C1956D007BDE27 /* integration_tests_helpers.hpp */; }; 3DFEBF761EF2D55800317D5C /* city_finder.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 3DFEBF751EF2D55800317D5C /* city_finder.hpp */; }; 453C623B2004BABE00467120 /* region_info_getter.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 453C62392004BABE00467120 /* region_info_getter.hpp */; }; 453C623C2004BABE00467120 /* region_info_getter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 453C623A2004BABE00467120 /* region_info_getter.cpp */; }; @@ -339,8 +332,6 @@ 3461C9A11D79949600E6E6F5 /* utils.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = utils.hpp; sourceTree = ""; }; 3465B27D1D5DE71A0021E14D /* search_params.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = search_params.cpp; sourceTree = ""; }; 3465B27E1D5DE71A0021E14D /* search_params.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = search_params.hpp; sourceTree = ""; }; - 3465B27F1D5DE71A0021E14D /* viewport_search_callback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = viewport_search_callback.cpp; sourceTree = ""; }; - 3465B2801D5DE71A0021E14D /* viewport_search_callback.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = viewport_search_callback.hpp; sourceTree = ""; }; 347F32FB1C4540A8009758CC /* cancel_exception.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = cancel_exception.hpp; sourceTree = ""; }; 347F32FE1C4540A8009758CC /* dummy_rank_table.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = dummy_rank_table.cpp; sourceTree = ""; }; 347F32FF1C4540A8009758CC /* dummy_rank_table.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = dummy_rank_table.hpp; sourceTree = ""; }; @@ -387,11 +378,8 @@ 39AEF84B1FB45D7800943FC9 /* feature_loader.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = feature_loader.hpp; sourceTree = ""; }; 39AEF84F1FB45DA100943FC9 /* test_with_custom_mwms.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = test_with_custom_mwms.hpp; sourceTree = ""; }; 39AEF8811FB45E1600943FC9 /* search_integration_tests.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = search_integration_tests.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 39B2B93B1FB461F800AB85A1 /* interactive_search_test.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = interactive_search_test.cpp; sourceTree = ""; }; 39B2B93C1FB461F800AB85A1 /* generate_tests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = generate_tests.cpp; sourceTree = ""; }; 39B2B93D1FB461F800AB85A1 /* downloader_search_test.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = downloader_search_test.cpp; sourceTree = ""; }; - 39B2B93E1FB461F800AB85A1 /* helpers.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = helpers.cpp; sourceTree = ""; }; - 39B2B93F1FB461F800AB85A1 /* helpers.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = helpers.hpp; sourceTree = ""; }; 39B2B9451FB4620200AB85A1 /* pre_ranker_test.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = pre_ranker_test.cpp; sourceTree = ""; }; 39B2B9461FB4620200AB85A1 /* processor_test.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = processor_test.cpp; sourceTree = ""; }; 39B2B9471FB4620200AB85A1 /* ranker_test.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ranker_test.cpp; sourceTree = ""; }; @@ -416,8 +404,8 @@ 39BBC1411F9FD68C009D1687 /* highlighting_tests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = highlighting_tests.cpp; sourceTree = ""; }; 3D0AEB041FBB102C00AD042B /* libgenerator_tests_support.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libgenerator_tests_support.a; sourceTree = BUILT_PRODUCTS_DIR; }; 3D0AEB051FBB102C00AD042B /* libindexer_tests_support.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libindexer_tests_support.a; sourceTree = BUILT_PRODUCTS_DIR; }; - 3DF37FA81EA11B380012CB31 /* everywhere_search_callback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = everywhere_search_callback.cpp; sourceTree = ""; }; - 3DF37FA91EA11B380012CB31 /* everywhere_search_callback.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = everywhere_search_callback.hpp; sourceTree = ""; }; + 3DA5722820C1956D007BDE27 /* integration_tests_helpers.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = integration_tests_helpers.cpp; sourceTree = ""; }; + 3DA5722920C1956D007BDE27 /* integration_tests_helpers.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = integration_tests_helpers.hpp; sourceTree = ""; }; 3DFEBF751EF2D55800317D5C /* city_finder.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = city_finder.hpp; sourceTree = ""; }; 453C62392004BABE00467120 /* region_info_getter.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = region_info_getter.hpp; sourceTree = ""; }; 453C623A2004BABE00467120 /* region_info_getter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = region_info_getter.cpp; sourceTree = ""; }; @@ -684,14 +672,19 @@ 39B2B9481FB4620200AB85A1 /* search_edited_features_test.cpp */, 39B2B93D1FB461F800AB85A1 /* downloader_search_test.cpp */, 39B2B93C1FB461F800AB85A1 /* generate_tests.cpp */, - 39B2B93E1FB461F800AB85A1 /* helpers.cpp */, - 39B2B93F1FB461F800AB85A1 /* helpers.hpp */, - 39B2B93B1FB461F800AB85A1 /* interactive_search_test.cpp */, ); name = search_integration_tests; path = ../../search/search_integration_tests; sourceTree = ""; }; + 3DA571D320C1802C007BDE27 /* Recovered References */ = { + isa = PBXGroup; + children = ( + 3925B85520B2FB1B00CEFE4D /* libstorage.a */, + ); + name = "Recovered References"; + sourceTree = ""; + }; 670D04A61B0B94F90013A7AC /* libs */ = { isa = PBXGroup; children = ( @@ -751,6 +744,7 @@ 6796248E1D10134200AE4E3C /* search_tests_support */, 675346B11A4055CF00A0A8C3 /* Products */, 34F558391DBF2E0E00A4FC11 /* Frameworks */, + 3DA571D320C1802C007BDE27 /* Recovered References */, ); sourceTree = ""; }; @@ -797,8 +791,6 @@ 3453BD561DAF91C100380ECB /* emitter.hpp */, F652D8BB1CFDE1E800FC29A0 /* engine.cpp */, F652D8BC1CFDE1E800FC29A0 /* engine.hpp */, - 3DF37FA81EA11B380012CB31 /* everywhere_search_callback.cpp */, - 3DF37FA91EA11B380012CB31 /* everywhere_search_callback.hpp */, 39AEF84A1FB45D7700943FC9 /* feature_loader.cpp */, 39AEF84B1FB45D7800943FC9 /* feature_loader.hpp */, 675346C11A40560D00A0A8C3 /* feature_offset_match.hpp */, @@ -912,8 +904,6 @@ 670F88731CE4C032003F68BA /* types_skipper.hpp */, 34EEAD711E55AE5C00E95575 /* utils.cpp */, 3461C9A11D79949600E6E6F5 /* utils.hpp */, - 3465B27F1D5DE71A0021E14D /* viewport_search_callback.cpp */, - 3465B2801D5DE71A0021E14D /* viewport_search_callback.hpp */, ); name = search; path = ../../search; @@ -922,13 +912,15 @@ 6796248E1D10134200AE4E3C /* search_tests_support */ = { isa = PBXGroup; children = ( - 39AEF84F1FB45DA100943FC9 /* test_with_custom_mwms.hpp */, + 3DA5722820C1956D007BDE27 /* integration_tests_helpers.cpp */, + 3DA5722920C1956D007BDE27 /* integration_tests_helpers.hpp */, 6796248F1D10137D00AE4E3C /* test_results_matching.cpp */, 679624901D10137D00AE4E3C /* test_results_matching.hpp */, 679624911D10137D00AE4E3C /* test_search_engine.cpp */, 679624921D10137D00AE4E3C /* test_search_engine.hpp */, 679624931D10137D00AE4E3C /* test_search_request.cpp */, 679624941D10137D00AE4E3C /* test_search_request.hpp */, + 39AEF84F1FB45DA100943FC9 /* test_with_custom_mwms.hpp */, ); name = search_tests_support; path = ../../search/search_tests_support; @@ -976,7 +968,6 @@ F652D9091CFDE21900FC29A0 /* ranking_utils.hpp in Headers */, 345C8DB41D2D15A50037E3A6 /* streets_matcher.hpp in Headers */, 345C8DB21D2D15A50037E3A6 /* geocoder_context.hpp in Headers */, - 39B2B9441FB461F800AB85A1 /* helpers.hpp in Headers */, 0831F256200E56110034C365 /* results.hpp in Headers */, 56D5456F1C74A48C00E3719C /* mode.hpp in Headers */, 0810EC371D6D9D2E00ABFEE7 /* displayed_categories.hpp in Headers */, @@ -993,7 +984,6 @@ 675346EE1A40560D00A0A8C3 /* locality_finder.hpp in Headers */, 392688B320B2D19000721762 /* text_index.hpp in Headers */, 675346EC1A40560D00A0A8C3 /* latlon_match.hpp in Headers */, - 3465B2851D5DE71A0021E14D /* viewport_search_callback.hpp in Headers */, A1347D521B8758C3009050FF /* query_saver.hpp in Headers */, 3459A7A81E4C4D0200ED235F /* geocoder_locality.hpp in Headers */, 675346EA1A40560D00A0A8C3 /* keyword_matcher.hpp in Headers */, @@ -1017,7 +1007,6 @@ 349B658A1D4F21E5001798E2 /* lazy_centers_table.hpp in Headers */, 344A71391F3DA03200B8DDB8 /* segment_tree.hpp in Headers */, 3441CE531CFC1D7000CF30D4 /* query_params.hpp in Headers */, - 3DF37FAB1EA11B380012CB31 /* everywhere_search_callback.hpp in Headers */, 3453BD591DAF91C100380ECB /* emitter.hpp in Headers */, 3DFEBF761EF2D55800317D5C /* city_finder.hpp in Headers */, F6E2B0001D9E794800793C36 /* categories_cache.hpp in Headers */, @@ -1038,6 +1027,7 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( + 3DA5722B20C1956D007BDE27 /* integration_tests_helpers.hpp in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1166,8 +1156,6 @@ 39B2B9561FB4621D00AB85A1 /* search_edited_features_test.cpp in Sources */, 39B2B9571FB4621D00AB85A1 /* downloader_search_test.cpp in Sources */, 39B2B9581FB4621D00AB85A1 /* generate_tests.cpp in Sources */, - 39B2B9591FB4621D00AB85A1 /* helpers.cpp in Sources */, - 39B2B95B1FB4621D00AB85A1 /* interactive_search_test.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1212,7 +1200,6 @@ 39BBC13E1F9FD679009D1687 /* segment_tree_tests.cpp in Sources */, F652D8F01CFDE21900FC29A0 /* geocoder.cpp in Sources */, F652D8F21CFDE21900FC29A0 /* geometry_cache.cpp in Sources */, - 39B2B9401FB461F800AB85A1 /* interactive_search_test.cpp in Sources */, 34586B8C1DCB1E8300CF7FC9 /* locality_scorer_test.cpp in Sources */, 34EEAD721E55AE5C00E95575 /* utils.cpp in Sources */, 345C8DB11D2D15A50037E3A6 /* geocoder_context.cpp in Sources */, @@ -1236,7 +1223,6 @@ 392688B220B2D19000721762 /* text_index.cpp in Sources */, F652D8F41CFDE21900FC29A0 /* house_numbers_matcher.cpp in Sources */, F652D8F61CFDE21900FC29A0 /* house_to_street_table.cpp in Sources */, - 3465B2841D5DE71A0021E14D /* viewport_search_callback.cpp in Sources */, 0831F257200E56110034C365 /* processor.cpp in Sources */, F652D8FC1CFDE21900FC29A0 /* model.cpp in Sources */, 342D83341D5233B3000D8AEA /* hotels_classifier.cpp in Sources */, @@ -1278,11 +1264,9 @@ F652D8EC1CFDE21900FC29A0 /* features_layer_path_finder.cpp in Sources */, 39B2B9421FB461F800AB85A1 /* downloader_search_test.cpp in Sources */, 39AEF8361FB4597300943FC9 /* tracer.cpp in Sources */, - 3DF37FAA1EA11B380012CB31 /* everywhere_search_callback.cpp in Sources */, F6E2AFFF1D9E794800793C36 /* categories_cache.cpp in Sources */, 39AEF84C1FB45D7800943FC9 /* feature_loader.cpp in Sources */, 3441CE521CFC1D7000CF30D4 /* query_params.cpp in Sources */, - 39B2B9431FB461F800AB85A1 /* helpers.cpp in Sources */, 670F88741CE4C032003F68BA /* types_skipper.cpp in Sources */, 45A008521FE9088400D77690 /* doc_vec.cpp in Sources */, 675346EB1A40560D00A0A8C3 /* latlon_match.cpp in Sources */, @@ -1303,6 +1287,7 @@ files = ( 6796249B1D10138400AE4E3C /* test_results_matching.cpp in Sources */, 6796249C1D10138400AE4E3C /* test_search_engine.cpp in Sources */, + 3DA5722A20C1956D007BDE27 /* integration_tests_helpers.cpp in Sources */, 6796249D1D10138400AE4E3C /* test_search_request.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0;