diff options
Diffstat (limited to 'src/components/application_manager/src/app_service_manager.cc')
-rw-r--r-- | src/components/application_manager/src/app_service_manager.cc | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/components/application_manager/src/app_service_manager.cc b/src/components/application_manager/src/app_service_manager.cc index 9b31d57ca0..4955c792c2 100644 --- a/src/components/application_manager/src/app_service_manager.cc +++ b/src/components/application_manager/src/app_service_manager.cc @@ -617,6 +617,25 @@ bool AppServiceManager::UpdateNavigationCapabilities( return true; } +AppService* AppServiceManager::FindWayPointsHandler() { + auto service = ActiveServiceForType( + EnumToString(mobile_apis::AppServiceType::NAVIGATION)); + if (!service || !service->mobile_service || + !service->record[strings::service_manifest].keyExists( + strings::handled_rpcs)) { + return nullptr; + } + + smart_objects::SmartObject& handled_rpcs = + service->record[strings::service_manifest][strings::handled_rpcs]; + for (size_t i = 0; i < handled_rpcs.length(); ++i) { + if (handled_rpcs[i].asInt() == mobile_apis::FunctionID::GetWayPointsID) { + return service; + } + } + return nullptr; +} + void AppServiceManager::AppServiceUpdated( const smart_objects::SmartObject& service_record, const mobile_apis::ServiceUpdateReason::eType update_reason, |