summaryrefslogtreecommitdiff
path: root/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_audio_pass_thru_request.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_audio_pass_thru_request.cc')
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_audio_pass_thru_request.cc30
1 files changed, 12 insertions, 18 deletions
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_audio_pass_thru_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_audio_pass_thru_request.cc
index 0accdd1e76..a690c0bc9b 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_audio_pass_thru_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_audio_pass_thru_request.cc
@@ -32,6 +32,7 @@
*/
#include "sdl_rpc_plugin/commands/mobile/perform_audio_pass_thru_request.h"
+
#include <cstring>
#include "application_manager/application_impl.h"
@@ -53,23 +54,21 @@ PerformAudioPassThruRequest::PerformAudioPassThruRequest(
app_mngr::rpc_service::RPCService& rpc_service,
app_mngr::HMICapabilities& hmi_capabilities,
policy::PolicyHandlerInterface& policy_handler)
- : CommandRequestImpl(message,
- application_manager,
- rpc_service,
- hmi_capabilities,
- policy_handler)
+ : RequestFromMobileImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler)
, result_tts_speak_(hmi_apis::Common_Result::INVALID_ENUM)
- , result_ui_(hmi_apis::Common_Result::INVALID_ENUM) {
- subscribe_on_event(hmi_apis::FunctionID::TTS_OnResetTimeout);
-}
+ , result_ui_(hmi_apis::Common_Result::INVALID_ENUM) {}
PerformAudioPassThruRequest::~PerformAudioPassThruRequest() {}
-void PerformAudioPassThruRequest::onTimeOut() {
+void PerformAudioPassThruRequest::OnTimeOut() {
SDL_LOG_AUTO_TRACE();
FinishTTSSpeak();
- CommandRequestImpl::onTimeOut();
+ RequestFromMobileImpl::OnTimeOut();
}
bool PerformAudioPassThruRequest::Init() {
@@ -183,24 +182,19 @@ void PerformAudioPassThruRequest::on_event(const event_engine::Event& event) {
StartMicrophoneRecording();
// update request timeout to get time for perform audio recording
- application_manager_.updateRequestTimeout(
+ application_manager_.UpdateRequestTimeout(
connection_key(), correlation_id(), default_timeout());
}
break;
}
- case hmi_apis::FunctionID::TTS_OnResetTimeout: {
- SDL_LOG_INFO("Received TTS_OnResetTimeout event");
- application_manager_.updateRequestTimeout(
- connection_key(), correlation_id(), default_timeout());
- break;
- }
default: {
SDL_LOG_ERROR("Received unknown event " << event.id());
return;
}
}
- if (IsWaitingHMIResponse()) {
+ if (IsPendingResponseExist()) {
+ SDL_LOG_DEBUG("Command still wating for HMI response");
return;
}