diff options
author | Alexander <akutsan@luxoft.com> | 2018-06-11 19:51:33 +0000 |
---|---|---|
committer | Ira Lytvynenko (GitHub) <ILytvynenko@luxoft.com> | 2018-06-26 12:01:47 +0300 |
commit | 68d72d184e0f54eb17f471de13679485e5bfb1d4 (patch) | |
tree | 555035f81115ee9488253affc35145c7ef7606d0 /src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_system_request_notification.cc | |
parent | 50b77c114ac7c2fdb00052c8ebf719d8bf6902da (diff) | |
download | sdl_core-68d72d184e0f54eb17f471de13679485e5bfb1d4.tar.gz |
Style fix
Diffstat (limited to 'src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_system_request_notification.cc')
-rw-r--r-- | src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_system_request_notification.cc | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_system_request_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_system_request_notification.cc index 67e9275691..1f44dc865a 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_system_request_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_system_request_notification.cc @@ -1,5 +1,5 @@ /* - Copyright (c) 2018, Ford Motor Company + Copyright (c) 2016, Ford Motor Company All rights reserved. Redistribution and use in source and binary forms, with or without @@ -33,7 +33,6 @@ #include <cstring> #include <cstdio> #include <string> -#include <iostream> #include "sdl_rpc_plugin/commands/mobile/on_system_request_notification.h" #include "interfaces/MOBILE_API.h" #include "utils/file_system.h" @@ -75,15 +74,18 @@ void OnSystemRequestNotification::Run() { << " is not registered."); return; } + const mobile_apis::RequestType::eType request_type = static_cast<mobile_apis::RequestType::eType>( (*message_)[strings::msg_params][strings::request_type].asInt()); + const policy::PolicyHandlerInterface& policy_handler = policy_handler_; const std::string stringified_request_type = rpc::policy_table_interface_base::EnumToJsonString( static_cast<rpc::policy_table_interface_base::RequestType>( request_type)); - if (!policy_handler_.IsRequestTypeAllowed(app->policy_app_id(), - request_type)) { + + if (!policy_handler.IsRequestTypeAllowed(app->policy_app_id(), + request_type)) { LOG4CXX_WARN(logger_, "Request type " << stringified_request_type << " is not allowed by policies"); @@ -95,8 +97,8 @@ void OnSystemRequestNotification::Run() { if (request_subtype_present) { const std::string request_subtype = (*message_)[strings::msg_params][strings::request_subtype].asString(); - if (!policy_handler_.IsRequestSubTypeAllowed(app->policy_app_id(), - request_subtype)) { + if (!policy_handler.IsRequestSubTypeAllowed(app->policy_app_id(), + request_subtype)) { LOG4CXX_ERROR(logger_, "Request subtype: " << request_subtype << " is DISALLOWED by policies"); @@ -128,7 +130,7 @@ void OnSystemRequestNotification::Run() { (*message_)[strings::msg_params][strings::file_type] = FileType::BINARY; if ((*message_)[strings::msg_params].keyExists(strings::url)) { (*message_)[strings::msg_params][strings::timeout] = - policy_handler_.TimeoutExchangeSec(); + policy_handler.TimeoutExchangeSec(); } } |