From 298ff1d4653862eba66616712cdf4286a0cbfb69 Mon Sep 17 00:00:00 2001 From: Alexander Date: Fri, 20 Jul 2018 13:08:11 +0300 Subject: Namespace fix Add namespace to RPCService --- .../rc_rpc_plugin/commands/mobile/get_interior_vehicle_data_request.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/get_interior_vehicle_data_request.h') diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/get_interior_vehicle_data_request.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/get_interior_vehicle_data_request.h index c2ae0e887f..2ffb770159 100644 --- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/get_interior_vehicle_data_request.h +++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/get_interior_vehicle_data_request.h @@ -80,8 +80,7 @@ class GetInteriorVehicleDataRequest : public RCCommandRequest { * @brief Handle subscription to vehicle data * @param hmi_response json message with response from HMI */ - void ProccessSubscription( - const NsSmartDeviceLink::NsSmartObjects::SmartObject& hmi_response); + void ProccessSubscription(const smart_objects::SmartObject& hmi_response); /** * @brief Cuts off subscribe parameter -- cgit v1.2.1 From 7c702d26c10380d14583c2fba6c955080bd6cbef Mon Sep 17 00:00:00 2001 From: Alexander Date: Fri, 20 Jul 2018 13:25:28 +0300 Subject: Rework dependency injection in RC commands Pass components to RC commands with RCParams struct to avoid big changes on every adding component Add InteriorDataCache and manager to RC commands --- .../commands/mobile/get_interior_vehicle_data_request.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/get_interior_vehicle_data_request.h') diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/get_interior_vehicle_data_request.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/get_interior_vehicle_data_request.h index 2ffb770159..debc78eaa1 100644 --- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/get_interior_vehicle_data_request.h +++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/get_interior_vehicle_data_request.h @@ -43,12 +43,8 @@ namespace commands { class GetInteriorVehicleDataRequest : public RCCommandRequest { public: GetInteriorVehicleDataRequest( - const app_mngr::commands::MessageSharedPtr& message, - app_mngr::ApplicationManager& application_manager, - app_mngr::rpc_service::RPCService& rpc_service, - app_mngr::HMICapabilities& hmi_capabilities, - policy::PolicyHandlerInterface& policy_handle, - ResourceAllocationManager& resource_allocation_manager); + const application_manager::commands::MessageSharedPtr& message, + const RCCommandParams& params); /** * @brief Execute command */ -- cgit v1.2.1 From 36ccbe8e8386a5e6229cf6ac9a55dc2162b6ced0 Mon Sep 17 00:00:00 2001 From: Alexander Date: Fri, 20 Jul 2018 13:33:43 +0300 Subject: Add cache processing on GetInteriorVehicleData request On GetInteriorVehicleData request from mobile add lookup for cached data. In case if no data available in cache SDL transfer request to HMI. On HMI response SDL will add data to cache. If the last application unsubscribes from data, SDL transfer request to HMI, and clear cache by module type. --- .../commands/mobile/get_interior_vehicle_data_request.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/get_interior_vehicle_data_request.h') diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/get_interior_vehicle_data_request.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/get_interior_vehicle_data_request.h index debc78eaa1..4624d79b56 100644 --- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/get_interior_vehicle_data_request.h +++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/get_interior_vehicle_data_request.h @@ -63,6 +63,9 @@ class GetInteriorVehicleDataRequest : public RCCommandRequest { ~GetInteriorVehicleDataRequest(); private: + std::vector + AppsSubscribedToModuleType(const std::string& module_type); + /** * @brief Check if app wants to proceed with already setup subscription * @param request_params request parameters to check @@ -86,6 +89,11 @@ class GetInteriorVehicleDataRequest : public RCCommandRequest { std::string ModuleType() FINAL; bool excessive_subscription_occured_; + bool ProcessCapabilities(); + void ProcessResponseToMobileFromCache(app_mngr::ApplicationSharedPtr app); + bool CheckRateLimits(); + bool AppShouldBeUnsubscribed(); + bool TheLastAppShouldBeUnsubscribed(app_mngr::ApplicationSharedPtr app); }; } // namespace commands } // namespace rc_rpc_plugin -- cgit v1.2.1