diff options
Diffstat (limited to 'src/components/application_manager/rpc_plugins/rc_rpc_plugin')
11 files changed, 53 insertions, 68 deletions
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_on_remote_control_settings_notification.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_on_remote_control_settings_notification.cc index 7bc72faced..8bcb6b08ed 100644 --- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_on_remote_control_settings_notification.cc +++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_on_remote_control_settings_notification.cc @@ -105,8 +105,8 @@ void RCOnRemoteControlSettingsNotification::DisallowRCFunctionality() { app->app_id(), mobile_apis::HMILevel::eType::HMI_NONE); const RCAppExtensionPtr extension = - std::static_pointer_cast< - RCAppExtension>(app->QueryInterface(RCRPCPlugin::kRCPluginID)); + std::static_pointer_cast<RCAppExtension>( + app->QueryInterface(RCRPCPlugin::kRCPluginID)); if (extension) { UnsubscribeFromInteriorVehicleDataForAllModules(extension); } diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/on_interior_vehicle_data_notification.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/on_interior_vehicle_data_notification.cc index 8238e9a943..fca9962fb5 100644 --- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/on_interior_vehicle_data_notification.cc +++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/on_interior_vehicle_data_notification.cc @@ -70,9 +70,8 @@ void OnInteriorVehicleDataNotification::Run() { DCHECK(*it); application_manager::Application& app = **it; - RCAppExtensionPtr extension = - std::static_pointer_cast< - RCAppExtension>(app.QueryInterface(RCRPCPlugin::kRCPluginID)); + RCAppExtensionPtr extension = std::static_pointer_cast<RCAppExtension>( + app.QueryInterface(RCRPCPlugin::kRCPluginID)); DCHECK(extension); LOG4CXX_TRACE(logger_, "Check subscription for " diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_rpc_plugin.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_rpc_plugin.cc index a562e45b1d..984d6ec9a0 100644 --- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_rpc_plugin.cc +++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_rpc_plugin.cc @@ -91,7 +91,8 @@ void RCRPCPlugin::OnApplicationEvent( } switch (event) { case plugins::kApplicationRegistered: { - application->AddExtension(std::shared_ptr<RCAppExtension>(new RCAppExtension(kRCPluginID))); + application->AddExtension( + std::shared_ptr<RCAppExtension>(new RCAppExtension(kRCPluginID))); resource_allocation_manager_->SendOnRCStatusNotifications( NotificationTrigger::APP_REGISTRATION, application); break; diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/resource_allocation_manager_impl.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/resource_allocation_manager_impl.cc index 01c2e3a7c6..011950b35a 100644 --- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/resource_allocation_manager_impl.cc +++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/resource_allocation_manager_impl.cc @@ -42,7 +42,6 @@ #include "json/json.h" #include "utils/helpers.h" - namespace rc_rpc_plugin { CREATE_LOGGERPTR_GLOBAL(logger_, "RemoteControlModule") @@ -197,9 +196,7 @@ RCAppExtensionPtr ResourceAllocationManagerImpl::GetApplicationExtention( return rc_app_extension; } - rc_app_extension = - std::static_pointer_cast<RCAppExtension>( - app_extension); + rc_app_extension = std::static_pointer_cast<RCAppExtension>(app_extension); return rc_app_extension; } diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/button_press_request_test.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/button_press_request_test.cc index 329f4de5a6..8613fb1829 100644 --- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/button_press_request_test.cc +++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/button_press_request_test.cc @@ -42,7 +42,6 @@ #include "application_manager/commands/command_request_test.h" #include "application_manager/policies/mock_policy_handler_interface.h" - #include "interfaces/HMI_API.h" #include "interfaces/MOBILE_API.h" @@ -147,15 +146,14 @@ class ButtonPressRequestTest } template <class Command> - std::shared_ptr<Command> CreateRCCommand( - MessageSharedPtr& msg) { + std::shared_ptr<Command> CreateRCCommand(MessageSharedPtr& msg) { InitCommand(kDefaultTimeout_); return std::make_shared<Command>(msg ? msg : msg = CreateMessage(), - app_mngr_, - mock_rpc_service_, - mock_hmi_capabilities_, - mock_policy_handler_, - mock_allocation_manager_); + app_mngr_, + mock_rpc_service_, + mock_hmi_capabilities_, + mock_policy_handler_, + mock_allocation_manager_); } protected: @@ -195,8 +193,8 @@ TEST_F(ButtonPressRequestTest, .WillOnce(Return(true)); // Act - std::shared_ptr<rc_rpc_plugin::commands::ButtonPressRequest> - command = CreateRCCommand<rc_rpc_plugin::commands::ButtonPressRequest>( + std::shared_ptr<rc_rpc_plugin::commands::ButtonPressRequest> command = + CreateRCCommand<rc_rpc_plugin::commands::ButtonPressRequest>( mobile_message); ASSERT_TRUE(command->Init()); command->Run(); @@ -234,8 +232,8 @@ TEST_F( .WillOnce(DoAll(SaveArg<0>(&command_result), Return(true))); // Act - std::shared_ptr<rc_rpc_plugin::commands::ButtonPressRequest> - command = CreateRCCommand<rc_rpc_plugin::commands::ButtonPressRequest>( + std::shared_ptr<rc_rpc_plugin::commands::ButtonPressRequest> command = + CreateRCCommand<rc_rpc_plugin::commands::ButtonPressRequest>( mobile_message); ASSERT_TRUE(command->Init()); command->Run(); @@ -273,8 +271,8 @@ TEST_F(ButtonPressRequestTest, OnEvent_ExpectSuccessfullResponseSentToMobile) { application_manager::event_engine::Event event( hmi_apis::FunctionID::Buttons_ButtonPress); event.set_smart_object(*hmi_message); - std::shared_ptr<rc_rpc_plugin::commands::ButtonPressRequest> - command = CreateRCCommand<rc_rpc_plugin::commands::ButtonPressRequest>( + std::shared_ptr<rc_rpc_plugin::commands::ButtonPressRequest> command = + CreateRCCommand<rc_rpc_plugin::commands::ButtonPressRequest>( mobile_message); command->on_event(event); } @@ -312,8 +310,8 @@ TEST_F(ButtonPressRequestTest, application_manager::event_engine::Event event( hmi_apis::FunctionID::Buttons_ButtonPress); event.set_smart_object(*hmi_message); - std::shared_ptr<rc_rpc_plugin::commands::ButtonPressRequest> - command = CreateRCCommand<rc_rpc_plugin::commands::ButtonPressRequest>( + std::shared_ptr<rc_rpc_plugin::commands::ButtonPressRequest> command = + CreateRCCommand<rc_rpc_plugin::commands::ButtonPressRequest>( mobile_message); command->on_event(event); } diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/get_interior_vehicle_data_request_test.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/get_interior_vehicle_data_request_test.cc index 8f69b29275..a6f0ee12ca 100644 --- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/get_interior_vehicle_data_request_test.cc +++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/get_interior_vehicle_data_request_test.cc @@ -41,8 +41,6 @@ #include "application_manager/commands/command_request_test.h" #include "rc_rpc_plugin/mock/mock_resource_allocation_manager.h" - - using ::testing::_; using ::testing::Mock; using ::testing::NiceMock; @@ -116,15 +114,14 @@ class GetInteriorVehicleDataRequestTest return message; } template <class Command> - std::shared_ptr<Command> CreateRCCommand( - MessageSharedPtr& msg) { + std::shared_ptr<Command> CreateRCCommand(MessageSharedPtr& msg) { InitCommand(kDefaultTimeout_); return std::make_shared<Command>(msg ? msg : msg = CreateMessage(), - app_mngr_, - mock_rpc_service_, - mock_hmi_capabilities_, - mock_policy_handler_, - mock_allocation_manager_); + app_mngr_, + mock_rpc_service_, + mock_hmi_capabilities_, + mock_policy_handler_, + mock_allocation_manager_); } protected: diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/on_interior_vehicle_data_notification_test.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/on_interior_vehicle_data_notification_test.cc index 690586d0e1..df11bf8c88 100644 --- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/on_interior_vehicle_data_notification_test.cc +++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/on_interior_vehicle_data_notification_test.cc @@ -85,15 +85,14 @@ class OnInteriorVehicleDataNotificationTest } template <class Command> - std::shared_ptr<Command> CreateRCCommand( - MessageSharedPtr& msg) { + std::shared_ptr<Command> CreateRCCommand(MessageSharedPtr& msg) { InitCommand(kDefaultTimeout_); return std::make_shared<Command>(msg ? msg : msg = CreateMessage(), - app_mngr_, - mock_rpc_service_, - mock_hmi_capabilities_, - mock_policy_handler_, - mock_allocation_manager_); + app_mngr_, + mock_rpc_service_, + mock_hmi_capabilities_, + mock_policy_handler_, + mock_allocation_manager_); } protected: @@ -126,9 +125,8 @@ TEST_F(OnInteriorVehicleDataNotificationTest, EXPECT_CALL(mock_rpc_service_, SendMessageToMobile(_, false)) .WillOnce(SaveArg<0>(&message)); // Act - std::shared_ptr< - rc_rpc_plugin::commands::OnInteriorVehicleDataNotification> command = - CreateRCCommand< + std::shared_ptr<rc_rpc_plugin::commands::OnInteriorVehicleDataNotification> + command = CreateRCCommand< rc_rpc_plugin::commands::OnInteriorVehicleDataNotification>( mobile_message); command->Run(); diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/on_remote_control_settings_test.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/on_remote_control_settings_test.cc index 907292f150..9054ce4830 100644 --- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/on_remote_control_settings_test.cc +++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/on_remote_control_settings_test.cc @@ -85,15 +85,14 @@ class RCOnRemoteControlSettingsNotificationTest } template <class Command> - std::shared_ptr<Command> CreateRCCommand( - MessageSharedPtr& msg) { + std::shared_ptr<Command> CreateRCCommand(MessageSharedPtr& msg) { InitCommand(kDefaultTimeout_); return std::make_shared<Command>(msg ? msg : msg = CreateMessage(), - app_mngr_, - mock_rpc_service_, - mock_hmi_capabilities_, - mock_policy_handler_, - mock_allocation_manager_); + app_mngr_, + mock_rpc_service_, + mock_hmi_capabilities_, + mock_policy_handler_, + mock_allocation_manager_); } protected: diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/rc_get_interior_vehicle_data_consent_test.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/rc_get_interior_vehicle_data_consent_test.cc index a1fff199ee..7d32d64a87 100644 --- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/rc_get_interior_vehicle_data_consent_test.cc +++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/rc_get_interior_vehicle_data_consent_test.cc @@ -54,7 +54,6 @@ #include "include/test/protocol_handler/mock_protocol_handler.h" #include "test/application_manager/mock_application_manager_settings.h" - using ::testing::_; using ::testing::Return; using ::testing::ReturnRef; @@ -146,15 +145,14 @@ class RCGetInteriorVehicleDataConsentTest } template <class Command> - std::shared_ptr<Command> CreateRCCommand( - MessageSharedPtr& msg) { + std::shared_ptr<Command> CreateRCCommand(MessageSharedPtr& msg) { InitCommand(kDefaultTimeout_); return std::make_shared<Command>(msg ? msg : msg = CreateMessage(), - app_mngr_, - rpc_service, - mock_hmi_capabilities_, - mock_policy_handler_, - mock_allocation_manager_); + app_mngr_, + rpc_service, + mock_hmi_capabilities_, + mock_policy_handler_, + mock_allocation_manager_); } MessageSharedPtr CreateBasicMessage() { diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/set_interior_vehicle_data_request_test.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/set_interior_vehicle_data_request_test.cc index fdee55a30c..8072783a71 100644 --- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/set_interior_vehicle_data_request_test.cc +++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/set_interior_vehicle_data_request_test.cc @@ -106,15 +106,14 @@ class SetInteriorVehicleDataRequestTest } template <class Command> - std::shared_ptr<Command> CreateRCCommand( - MessageSharedPtr& msg) { + std::shared_ptr<Command> CreateRCCommand(MessageSharedPtr& msg) { InitCommand(kDefaultTimeout_); return std::make_shared<Command>(msg ? msg : msg = CreateMessage(), - app_mngr_, - mock_rpc_service_, - mock_hmi_capabilities_, - mock_policy_handler_, - mock_allocation_manager_); + app_mngr_, + mock_rpc_service_, + mock_hmi_capabilities_, + mock_policy_handler_, + mock_allocation_manager_); } protected: diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/resource_allocation_manager_impl_test.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/resource_allocation_manager_impl_test.cc index 3842814f84..3358dfbe4c 100644 --- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/resource_allocation_manager_impl_test.cc +++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/resource_allocation_manager_impl_test.cc @@ -40,7 +40,6 @@ #include "application_manager/mock_rpc_service.h" #include "application_manager/policies/mock_policy_handler_interface.h" - #include "interfaces/HMI_API.h" #include "interfaces/MOBILE_API.h" |