[search] move everywhere search params and viewport search params into map project

This commit is contained in:
Arsentiy Milchakov 2017-11-09 12:58:11 +03:00 committed by mpimenov
parent fdb316f3de
commit cb3890ab6f
17 changed files with 35 additions and 27 deletions

View file

@ -7,13 +7,12 @@
#include "com/mapswithme/util/NetworkPolicy.hpp"
#include "map/chart_generator.hpp"
#include "map/everywhere_search_params.hpp"
#include "map/user_mark.hpp"
#include "partners_api/ads_engine.hpp"
#include "partners_api/banner.hpp"
#include "search/everywhere_search_params.hpp"
#include "storage/storage_helpers.hpp"
#include "drape/pointers.hpp"

View file

@ -1,10 +1,11 @@
#include "Framework.hpp"
#include "search/everywhere_search_params.hpp"
#include "map/everywhere_search_params.hpp"
#include "map/viewport_search_params.hpp"
#include "search/hotels_filter.hpp"
#include "search/mode.hpp"
#include "search/result.hpp"
#include "search/viewport_search_params.hpp"
#include "base/assert.hpp"
#include "base/logging.hpp"

View file

@ -25,6 +25,7 @@ set(
displacement_mode_manager.hpp
displayed_categories_modifiers.cpp
displayed_categories_modifiers.hpp
everywhere_search_params.hpp
feature_vec_model.cpp
feature_vec_model.hpp
framework.cpp
@ -74,6 +75,7 @@ set(
user_mark_container.hpp
user_mark.cpp
user_mark.hpp
viewport_search_params.hpp
)
add_library(${PROJECT_NAME} ${SRC})

View file

@ -1,5 +1,7 @@
#pragma once
#include "map/booking_filter_availability_params.hpp"
#include "search/hotels_filter.hpp"
#include "search/result.hpp"
@ -18,6 +20,7 @@ struct EverywhereSearchParams
std::string m_query;
std::string m_inputLocale;
std::shared_ptr<hotels_filter::Rule> m_hotelsFilter;
booking::filter::availability::Params m_bookingFilterParams;
OnResults m_onResults;
};

View file

@ -2,11 +2,13 @@
#include "map/benchmark_tools.hpp"
#include "map/chart_generator.hpp"
#include "map/displayed_categories_modifiers.hpp"
#include "map/everywhere_search_params.hpp"
#include "map/ge0_parser.hpp"
#include "map/geourl_process.hpp"
#include "map/gps_tracker.hpp"
#include "map/taxi_delegate.hpp"
#include "map/user_mark.hpp"
#include "map/viewport_search_params.hpp"
#include "defines.hpp"
#include "private.h"
@ -23,12 +25,10 @@
#include "search/downloader_search_callback.hpp"
#include "search/editor_delegate.hpp"
#include "search/engine.hpp"
#include "search/everywhere_search_params.hpp"
#include "search/geometry_utils.hpp"
#include "search/intermediate_result.hpp"
#include "search/locality_finder.hpp"
#include "search/reverse_geocoder.hpp"
#include "search/viewport_search_params.hpp"
#include "storage/downloader_search_params.hpp"
#include "storage/routing_helpers.hpp"

View file

@ -18,6 +18,7 @@ HEADERS += \
chart_generator.hpp \
displacement_mode_manager.hpp \
displayed_categories_modifiers.hpp \
everywhere_search_params.hpp \
feature_vec_model.hpp \
framework.hpp \
ge0_parser.hpp \
@ -42,6 +43,7 @@ HEADERS += \
user.hpp \
user_mark.hpp \
user_mark_container.hpp \
viewport_search_params.hpp \
SOURCES += \
../api/src/c/api-client.c \

View file

@ -11,8 +11,7 @@
#include "search/search_tests_support/test_with_custom_mwms.hpp"
#include "map/search_api.hpp"
#include "search/viewport_search_params.hpp"
#include "map/viewport_search_params.hpp"
#include "storage/country_info_getter.hpp"
#include "storage/storage.hpp"

View file

@ -1,9 +1,10 @@
#include "map/search_api.hpp"
#include "search/everywhere_search_params.hpp"
#include "map/everywhere_search_params.hpp"
#include "map/viewport_search_params.hpp"
#include "search/geometry_utils.hpp"
#include "search/hotels_filter.hpp"
#include "search/viewport_search_params.hpp"
#include "storage/downloader_search_params.hpp"

View file

@ -1,5 +1,7 @@
#pragma once
#include "map/booking_filter_availability_params.hpp"
#include "search/hotels_filter.hpp"
#include <functional>
@ -18,6 +20,7 @@ struct ViewportSearchParams
std::string m_query;
std::string m_inputLocale;
std::shared_ptr<hotels_filter::Rule> m_hotelsFilter;
booking::filter::availability::Params m_bookingFilterParams;
OnStarted m_onStarted;
OnCompleted m_onCompleted;

View file

@ -2,10 +2,10 @@
#include "qt/qt_common/map_widget.hpp"
#include "map/everywhere_search_params.hpp"
#include "map/place_page_info.hpp"
#include "map/routing_manager.hpp"
#include "search/everywhere_search_params.hpp"
#include "search/result.hpp"
#include "routing/router.hpp"

View file

@ -1,7 +1,8 @@
#pragma once
#include "map/everywhere_search_params.hpp"
#include "search/result.hpp"
#include "search/everywhere_search_params.hpp"
#include "base/thread_checker.hpp"

View file

@ -28,7 +28,6 @@ set(
engine.hpp
everywhere_search_callback.cpp
everywhere_search_callback.hpp
everywhere_search_params.hpp
feature_loader.cpp
feature_loader.hpp
feature_offset_match.hpp
@ -140,7 +139,6 @@ set(
utils.hpp
viewport_search_callback.cpp
viewport_search_callback.hpp
viewport_search_params.hpp
)
add_library(${PROJECT_NAME} ${SRC})

View file

@ -1,8 +1,8 @@
#pragma once
#include "search/everywhere_search_params.hpp"
#include "search/result.hpp"
#include <functional>
#include <vector>
namespace search
@ -22,7 +22,8 @@ public:
virtual bool IsLocalAdsCustomer(Result const & result) const = 0;
};
using OnResults = EverywhereSearchParams::OnResults;
using OnResults =
std::function<void(Results const & results, std::vector<bool> const & isLocalAdsCustomer)>;
EverywhereSearchCallback(Delegate & delegate, OnResults onResults);

View file

@ -25,7 +25,6 @@ HEADERS += \
emitter.hpp \
engine.hpp \
everywhere_search_callback.hpp \
everywhere_search_params.hpp \
feature_loader.hpp \
feature_offset_match.hpp \
features_filter.hpp \
@ -85,7 +84,6 @@ HEADERS += \
types_skipper.hpp \
utils.hpp \
viewport_search_callback.hpp \
viewport_search_params.hpp \
SOURCES += \
approximate_string_match.cpp \

View file

@ -1,10 +1,10 @@
#include "testing/testing.hpp"
#include "search/viewport_search_callback.hpp"
#include "search/mode.hpp"
#include "search/search_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 "base/macros.hpp"

View file

@ -24,6 +24,8 @@
3D47B2941F054BC5000828D2 /* taxi_delegate.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 3D47B2911F054BC5000828D2 /* taxi_delegate.hpp */; };
3D47B2C71F20EF06000828D2 /* displayed_categories_modifiers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3D47B2C51F20EF06000828D2 /* displayed_categories_modifiers.cpp */; };
3D47B2C81F20EF06000828D2 /* displayed_categories_modifiers.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 3D47B2C61F20EF06000828D2 /* displayed_categories_modifiers.hpp */; };
3D4E99821FB462B60025B48C /* everywhere_search_params.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 3D4E99801FB462B60025B48C /* everywhere_search_params.hpp */; };
3D4E99831FB462B60025B48C /* viewport_search_params.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 3D4E99811FB462B60025B48C /* viewport_search_params.hpp */; };
3D74ABBE1EA76F1D0063A898 /* local_ads_supported_types.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3D74ABBD1EA76F1D0063A898 /* local_ads_supported_types.cpp */; };
45201E931CE4AC90008A4842 /* api_mark_point.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 45201E921CE4AC90008A4842 /* api_mark_point.cpp */; };
454649F11F2728CE00EF4064 /* local_ads_mark.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 454649EF1F2728CE00EF4064 /* local_ads_mark.cpp */; };
@ -159,6 +161,8 @@
3D47B2911F054BC5000828D2 /* taxi_delegate.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = taxi_delegate.hpp; sourceTree = "<group>"; };
3D47B2C51F20EF06000828D2 /* displayed_categories_modifiers.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = displayed_categories_modifiers.cpp; sourceTree = "<group>"; };
3D47B2C61F20EF06000828D2 /* displayed_categories_modifiers.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = displayed_categories_modifiers.hpp; sourceTree = "<group>"; };
3D4E99801FB462B60025B48C /* everywhere_search_params.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = everywhere_search_params.hpp; sourceTree = "<group>"; };
3D4E99811FB462B60025B48C /* viewport_search_params.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = viewport_search_params.hpp; sourceTree = "<group>"; };
3D74ABBD1EA76F1D0063A898 /* local_ads_supported_types.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = local_ads_supported_types.cpp; sourceTree = "<group>"; };
45201E921CE4AC90008A4842 /* api_mark_point.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = api_mark_point.cpp; sourceTree = "<group>"; };
454649EF1F2728CE00EF4064 /* local_ads_mark.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = local_ads_mark.cpp; sourceTree = "<group>"; };
@ -445,6 +449,8 @@
675345BD1A4054AD00A0A8C3 /* map */ = {
isa = PBXGroup;
children = (
3D4E99801FB462B60025B48C /* everywhere_search_params.hpp */,
3D4E99811FB462B60025B48C /* viewport_search_params.hpp */,
45F6EE9B1FB1C77500019892 /* mwm_tree.hpp */,
45F6EE9C1FB1C77500019892 /* search_api.cpp */,
45F6EE9A1FB1C77500019892 /* search_api.hpp */,
@ -531,8 +537,10 @@
675346A21A4054E800A0A8C3 /* user_mark.hpp in Headers */,
454649F21F2728CE00EF4064 /* local_ads_mark.hpp in Headers */,
F6B283061C1B03320081957A /* gps_track_filter.hpp in Headers */,
3D4E99831FB462B60025B48C /* viewport_search_params.hpp in Headers */,
34583BD01C88556800F94664 /* place_page_info.hpp in Headers */,
34921F661BFA0A6900737D6E /* api_mark_point.hpp in Headers */,
3D4E99821FB462B60025B48C /* everywhere_search_params.hpp in Headers */,
675346751A4054E800A0A8C3 /* mwm_url.hpp in Headers */,
6753464B1A4054E800A0A8C3 /* bookmark.hpp in Headers */,
3D47B2941F054BC5000828D2 /* taxi_delegate.hpp in Headers */,

View file

@ -42,8 +42,6 @@
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 */; };
3465B2861D5DE71A0021E14D /* viewport_search_params.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 3465B2811D5DE71A0021E14D /* viewport_search_params.hpp */; };
3469FAD31D6C5D9C00F35A88 /* everywhere_search_params.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 3469FAD01D6C5D9C00F35A88 /* everywhere_search_params.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 */; };
@ -310,8 +308,6 @@
3465B27E1D5DE71A0021E14D /* search_params.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = search_params.hpp; sourceTree = "<group>"; };
3465B27F1D5DE71A0021E14D /* viewport_search_callback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = viewport_search_callback.cpp; sourceTree = "<group>"; };
3465B2801D5DE71A0021E14D /* viewport_search_callback.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = viewport_search_callback.hpp; sourceTree = "<group>"; };
3465B2811D5DE71A0021E14D /* viewport_search_params.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = viewport_search_params.hpp; sourceTree = "<group>"; };
3469FAD01D6C5D9C00F35A88 /* everywhere_search_params.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = everywhere_search_params.hpp; sourceTree = "<group>"; };
347F32FB1C4540A8009758CC /* cancel_exception.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = cancel_exception.hpp; sourceTree = "<group>"; };
347F32FE1C4540A8009758CC /* dummy_rank_table.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = dummy_rank_table.cpp; sourceTree = "<group>"; };
347F32FF1C4540A8009758CC /* dummy_rank_table.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = dummy_rank_table.hpp; sourceTree = "<group>"; };
@ -722,7 +718,6 @@
F652D8BC1CFDE1E800FC29A0 /* engine.hpp */,
3DF37FA81EA11B380012CB31 /* everywhere_search_callback.cpp */,
3DF37FA91EA11B380012CB31 /* everywhere_search_callback.hpp */,
3469FAD01D6C5D9C00F35A88 /* everywhere_search_params.hpp */,
675346C11A40560D00A0A8C3 /* feature_offset_match.hpp */,
F652D8BD1CFDE1E800FC29A0 /* features_filter.cpp */,
F652D8C21CFDE21900FC29A0 /* features_filter.hpp */,
@ -824,7 +819,6 @@
3461C9A11D79949600E6E6F5 /* utils.hpp */,
3465B27F1D5DE71A0021E14D /* viewport_search_callback.cpp */,
3465B2801D5DE71A0021E14D /* viewport_search_callback.hpp */,
3465B2811D5DE71A0021E14D /* viewport_search_params.hpp */,
);
name = search;
path = ../../search;
@ -913,8 +907,6 @@
F652D8EB1CFDE21900FC29A0 /* features_layer_matcher.hpp in Headers */,
347F331B1C4540A8009758CC /* interval_set.hpp in Headers */,
F652D9051CFDE21900FC29A0 /* rank_table_cache.hpp in Headers */,
3469FAD31D6C5D9C00F35A88 /* everywhere_search_params.hpp in Headers */,
3465B2861D5DE71A0021E14D /* viewport_search_params.hpp in Headers */,
F652D8C01CFDE1E800FC29A0 /* engine.hpp in Headers */,
39AEF84D1FB45D7800943FC9 /* feature_loader.hpp in Headers */,
675346DF1A40560D00A0A8C3 /* feature_offset_match.hpp in Headers */,