summaryrefslogtreecommitdiff
path: root/src/components/application_manager/src/application_manager_impl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/application_manager/src/application_manager_impl.cc')
-rw-r--r--src/components/application_manager/src/application_manager_impl.cc65
1 files changed, 62 insertions, 3 deletions
diff --git a/src/components/application_manager/src/application_manager_impl.cc b/src/components/application_manager/src/application_manager_impl.cc
index 3829005047..94e67a0c80 100644
--- a/src/components/application_manager/src/application_manager_impl.cc
+++ b/src/components/application_manager/src/application_manager_impl.cc
@@ -1917,7 +1917,7 @@ void ApplicationManagerImpl::OnServiceStartedCallback(
"ServiceType = " << type << ". Session = " << std::hex << session_key);
std::vector<std::string> empty;
- if (type == kRpc) {
+ if (kRpc == type) {
LOG4CXX_DEBUG(logger_, "RPC service is about to be started.");
connection_handler().NotifyServiceStartedResult(session_key, true, empty);
return;
@@ -1944,6 +1944,7 @@ void ApplicationManagerImpl::OnServiceStartedCallback(
} else {
LOG4CXX_WARN(logger_, "Refuse unknown service");
}
+
connection_handler().NotifyServiceStartedResult(session_key, false, empty);
}
@@ -2026,6 +2027,34 @@ void ApplicationManagerImpl::OnServiceEndedCallback(
}
}
+void ApplicationManagerImpl::ProcessServiceStatusUpdate(
+ const uint32_t connection_key,
+ hmi_apis::Common_ServiceType::eType service_type,
+ hmi_apis::Common_ServiceEvent::eType service_event,
+ utils::Optional<hmi_apis::Common_ServiceStatusUpdateReason::eType>
+ service_update_reason) {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ LOG4CXX_DEBUG(logger_,
+ "Processing status update with connection key: "
+ << connection_key << " service type: " << service_type
+ << " service_event " << service_event
+ << " service_update_reason " << service_update_reason);
+
+ const auto app = application(connection_key);
+
+ const uint32_t app_id = app ? app->app_id() : 0u;
+
+ auto reason = service_update_reason
+ ? *service_update_reason
+ : hmi_apis::Common_ServiceStatusUpdateReason::INVALID_ENUM;
+
+ auto notification = MessageHelper::CreateOnServiceUpdateNotification(
+ service_type, service_event, reason, app_id);
+
+ rpc_service_->ManageHMICommand(notification);
+}
+
void ApplicationManagerImpl::OnSecondaryTransportStartedCallback(
const connection_handler::DeviceHandle device_handle,
const int32_t session_key) {
@@ -2118,7 +2147,12 @@ bool ApplicationManagerImpl::OnHandshakeDone(
using namespace helpers;
ApplicationSharedPtr app = application(connection_key);
- DCHECK_OR_RETURN(app, false);
+ if (!app) {
+ LOG4CXX_WARN(logger_,
+ "Application for connection key: " << connection_key
+ << " was not found");
+ return false;
+ }
if (Compare<SSLContext::HandshakeResult, EQ, ONE>(
result,
SSLContext::Handshake_Result_CertExpired,
@@ -2131,7 +2165,12 @@ bool ApplicationManagerImpl::OnHandshakeDone(
return false;
}
-bool ApplicationManagerImpl::OnHandshakeFailed() {
+bool ApplicationManagerImpl::OnPTUFailed() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ return false;
+}
+
+bool ApplicationManagerImpl::OnGetSystemTimeFailed() {
LOG4CXX_AUTO_TRACE(logger_);
return false;
}
@@ -3889,6 +3928,7 @@ void ApplicationManagerImpl::ProcessReconnection(
void ApplicationManagerImpl::OnPTUFinished(const bool ptu_result) {
LOG4CXX_AUTO_TRACE(logger_);
if (!ptu_result) {
+ protocol_handler_->ProcessFailedPTU();
return;
}
@@ -3907,6 +3947,25 @@ void ApplicationManagerImpl::OnPTUFinished(const bool ptu_result) {
plugin_manager_->ForEachPlugin(on_app_policy_updated);
}
+#if defined(EXTERNAL_PROPRIETARY_MODE) && defined(ENABLE_SECURITY)
+void ApplicationManagerImpl::OnCertDecryptFinished(const bool decrypt_result) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ if (!decrypt_result) {
+ protocol_handler_->ProcessFailedCertDecrypt();
+ }
+}
+
+bool ApplicationManagerImpl::OnCertDecryptFailed() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ return false;
+}
+#endif
+
+void ApplicationManagerImpl::OnPTUTimeoutExceeded() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ protocol_handler_->ProcessFailedPTU();
+}
+
void ApplicationManagerImpl::SendDriverDistractionState(
ApplicationSharedPtr application) {
LOG4CXX_AUTO_TRACE(logger_);