| 384 | } |
| 385 | |
| 386 | bool SearchAPI::Search(SearchParams params, bool forceSearch) |
| 387 | { |
| 388 | if (m_delegate.ParseSearchQueryCommand(params)) |
| 389 | return false; |
| 390 | |
| 391 | auto const mode = params.m_mode; |
| 392 | auto & intent = m_searchIntents[static_cast<size_t>(mode)]; |
| 393 | |
| 394 | if (!forceSearch && QueryMayBeSkipped(intent.m_params, params)) |
| 395 | return false; |
| 396 | |
| 397 | intent.m_params = std::move(params); |
| 398 | |
| 399 | // Cancels previous search request (if any) and initiates a new search request. |
| 400 | CancelQuery(intent.m_handle); |
| 401 | |
| 402 | intent.m_params.m_minDistanceOnMapBetweenResults = m_delegate.GetMinDistanceBetweenResults(); |
| 403 | |
| 404 | Search(intent); |
| 405 | |
| 406 | return true; |
| 407 | } |
| 408 | |
| 409 | void SearchAPI::Search(SearchIntent & intent) |
| 410 | { |
nothing calls this directly
no test coverage detected