| 178 | } |
| 179 | |
| 180 | bool SearchAPI::SearchEverywhere(EverywhereSearchParams params) |
| 181 | { |
| 182 | SearchParams p; |
| 183 | p.m_query = std::move(params.m_query); |
| 184 | p.m_inputLocale = std::move(params.m_inputLocale); |
| 185 | p.m_mode = Mode::Everywhere; |
| 186 | p.m_position = m_delegate.GetCurrentPosition(); |
| 187 | SetViewportIfPossible(p); // Search request will be delayed if viewport is not available. |
| 188 | p.m_maxNumResults = SearchParams::kDefaultNumResultsEverywhere; |
| 189 | p.m_suggestsEnabled = true; |
| 190 | p.m_needAddress = true; |
| 191 | p.m_needHighlighting = true; |
| 192 | p.m_categorialRequest = params.m_isCategory; |
| 193 | if (params.m_timeout) |
| 194 | p.m_timeout = *params.m_timeout; |
| 195 | |
| 196 | p.m_onResults = EverywhereSearchCallback(*this, std::move(params.m_onResults)); |
| 197 | |
| 198 | return Search(std::move(p), true /* forceSearch */); |
| 199 | } |
| 200 | |
| 201 | bool SearchAPI::SearchInViewport(ViewportSearchParams params) |
| 202 | { |