diff options
Diffstat (limited to 'src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile')
2 files changed, 10 insertions, 10 deletions
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_interaction_choice_set_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_interaction_choice_set_request.cc index 0d6114cc50..92c15afd6d 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_interaction_choice_set_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_interaction_choice_set_request.cc @@ -123,17 +123,16 @@ void CreateInteractionChoiceSetRequest::Run() { SendResponse(false, result); return; } - int vr_status = MessageHelper::CheckChoiceSet_VRCommands( + auto vr_status = MessageHelper::CheckChoiceSetVRCommands( (*message_)[strings::msg_params][strings::choice_set]); - if (vr_status == -1) { + if (vr_status == MessageHelper::ChoiceSetVRCommandsStatus::MIXED) { // this is an error SendResponse(false, Result::INVALID_DATA, "Some choices don't contain VR commands. Either all or none " "must have voice commands."); return; // exit now, this is a bad set - - } else if (vr_status == 0) { + } else if (vr_status == MessageHelper::ChoiceSetVRCommandsStatus::ALL) { // everyone had a vr command, setup the grammar uint32_t grammar_id = application_manager_.GenerateGrammarID(); (*message_)[strings::msg_params][strings::grammar_id] = grammar_id; @@ -141,10 +140,11 @@ void CreateInteractionChoiceSetRequest::Run() { // continue on as usual app->AddChoiceSet(choice_set_id_, (*message_)[strings::msg_params]); - if (vr_status == 0) { + if (vr_status == MessageHelper::ChoiceSetVRCommandsStatus::ALL) { // we have VR commands SendVRAddCommandRequests(app); } else { + // we have none, just return with success SendResponse(true, Result::SUCCESS); } } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_interaction_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_interaction_request.cc index d013244f57..a9370845ad 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_interaction_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_interaction_request.cc @@ -186,7 +186,7 @@ void PerformInteractionRequest::Run() { LOG4CXX_DEBUG(logger_, "Interaction Mode: BOTH"); if (!CheckChoiceSetVRSynonyms(app) || !CheckChoiceSetMenuNames(app) || !CheckVrHelpItemPositions(app) || - !CheckChoiceSetList_VRCommands(app)) { + !CheckChoiceSetListVRCommands(app)) { return; } break; @@ -202,7 +202,7 @@ void PerformInteractionRequest::Run() { case mobile_apis::InteractionMode::VR_ONLY: { LOG4CXX_DEBUG(logger_, "Interaction Mode: VR_ONLY"); if (!CheckChoiceSetVRSynonyms(app) || !CheckVrHelpItemPositions(app) || - !CheckChoiceSetList_VRCommands(app)) { + !CheckChoiceSetListVRCommands(app)) { return; } break; @@ -952,7 +952,7 @@ bool PerformInteractionRequest::CheckChoiceIDFromResponse( return false; } -bool PerformInteractionRequest::CheckChoiceSetList_VRCommands( +bool PerformInteractionRequest::CheckChoiceSetListVRCommands( ApplicationSharedPtr app) { LOG4CXX_AUTO_TRACE(logger_); @@ -974,10 +974,10 @@ bool PerformInteractionRequest::CheckChoiceSetList_VRCommands( const smart_objects::SmartObject& choices_list = (*choice_set)[strings::choice_set]; - int vr_status = MessageHelper::CheckChoiceSet_VRCommands(choices_list); + auto vr_status = MessageHelper::CheckChoiceSetVRCommands(choices_list); // if not all choices have vr commands - if (vr_status != 0) { + if (vr_status != MessageHelper::ChoiceSetVRCommandsStatus::ALL) { LOG4CXX_ERROR(logger_, "PerformInteraction has choice sets with " "missing vrCommands, not in MANUAL_ONLY mode"); |