diff options
Diffstat (limited to 'src/components/application_manager/rpc_plugins/rc_rpc_plugin/include')
30 files changed, 718 insertions, 186 deletions
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_button_press_request.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_button_press_request.h index fc3721e763..3bc34be8d1 100644 --- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_button_press_request.h +++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_button_press_request.h @@ -30,19 +30,20 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_COMMANDS_HMI_RC_BUTTON_PRESS_REQUEST_H -#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_COMMANDS_HMI_RC_BUTTON_PRESS_REQUEST_H +#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_HMI_RC_BUTTON_PRESS_REQUEST_H_ +#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_HMI_RC_BUTTON_PRESS_REQUEST_H_ #include "application_manager/commands/request_to_hmi.h" +#include "rc_rpc_plugin/commands/rc_command_request.h" #include "rc_rpc_plugin/resource_allocation_manager.h" +#include "rc_rpc_plugin/interior_data_cache.h" #include "utils/macro.h" namespace rc_rpc_plugin { namespace app_mngr = application_manager; namespace commands { -class RCButtonPressRequest - : public application_manager::commands::RequestToHMI { +class RCButtonPressRequest : public app_mngr::commands::RequestToHMI { public: /** * @brief RCButtonPressRequest class constructor @@ -54,11 +55,7 @@ class RCButtonPressRequest * @param resource_allocation_manager ResourceAllocationManager **/ RCButtonPressRequest(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 RCCommandParams& params); /** * @brief Execute command */ @@ -68,4 +65,4 @@ class RCButtonPressRequest } // namespace commands } // namespace rc_rpc_plugin -#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_COMMANDS_HMI_RC_BUTTON_PRESS_REQUEST_H +#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_HMI_RC_BUTTON_PRESS_REQUEST_H_ diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_button_press_response.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_button_press_response.h index c16f4de0cc..939d5fa468 100644 --- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_button_press_response.h +++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_button_press_response.h @@ -30,11 +30,13 @@ POSSIBILITY OF SUCH DAMAGE. */ -#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_COMMANDS_HMI_RC_BUTTON_PRESS_RESPONSE_H -#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_COMMANDS_HMI_RC_BUTTON_PRESS_RESPONSE_H +#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_HMI_RC_BUTTON_PRESS_RESPONSE_H_ +#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_HMI_RC_BUTTON_PRESS_RESPONSE_H_ #include "application_manager/commands/response_from_hmi.h" +#include "rc_rpc_plugin/commands/rc_command_request.h" #include "rc_rpc_plugin/resource_allocation_manager.h" +#include "rc_rpc_plugin/interior_data_cache.h" #include "utils/macro.h" namespace rc_rpc_plugin { @@ -54,11 +56,7 @@ class RCButtonPressResponse * @param resource_allocation_manager ResourceAllocationManager **/ RCButtonPressResponse(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 RCCommandParams& params); void Run() OVERRIDE; @@ -67,4 +65,4 @@ class RCButtonPressResponse } // namespace commands } // namespace rc_rpc_plugin -#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_COMMANDS_HMI_RC_BUTTON_PRESS_RESPONSE_H +#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_HMI_RC_BUTTON_PRESS_RESPONSE_H_ diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_get_interior_vehicle_data_consent_request.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_get_interior_vehicle_data_consent_request.h index fc2e0d6536..97df5e8390 100644 --- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_get_interior_vehicle_data_consent_request.h +++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_get_interior_vehicle_data_consent_request.h @@ -34,7 +34,9 @@ #define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_HMI_RC_GET_INTERIOR_VEHICLE_DATA_CONSENT_REQUEST_H_ #include "application_manager/commands/request_to_hmi.h" +#include "rc_rpc_plugin/commands/rc_command_request.h" #include "rc_rpc_plugin/resource_allocation_manager.h" +#include "rc_rpc_plugin/interior_data_cache.h" #include "utils/macro.h" namespace rc_rpc_plugin { @@ -45,12 +47,8 @@ class RCGetInteriorVehicleDataConsentRequest : public application_manager::commands::RequestToHMI { public: RCGetInteriorVehicleDataConsentRequest( - 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); void Run() OVERRIDE; ~RCGetInteriorVehicleDataConsentRequest(); diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_get_interior_vehicle_data_consent_response.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_get_interior_vehicle_data_consent_response.h index a037d33d5a..46232987a5 100644 --- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_get_interior_vehicle_data_consent_response.h +++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_get_interior_vehicle_data_consent_response.h @@ -34,7 +34,9 @@ #define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_HMI_RC_GET_INTERIOR_VEHICLE_DATA_CONSENT_RESPONSE_H_ #include "application_manager/commands/response_from_hmi.h" +#include "rc_rpc_plugin/commands/rc_command_request.h" #include "rc_rpc_plugin/resource_allocation_manager.h" +#include "rc_rpc_plugin/interior_data_cache.h" #include "utils/macro.h" namespace rc_rpc_plugin { @@ -54,12 +56,8 @@ class RCGetInteriorVehicleDataConsentResponse * @param resource_allocation_manager ResourceAllocationManager **/ RCGetInteriorVehicleDataConsentResponse( - 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); void Run() OVERRIDE; diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_get_interior_vehicle_data_request.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_get_interior_vehicle_data_request.h index 9f7b1211b7..a88a39aa7a 100644 --- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_get_interior_vehicle_data_request.h +++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_get_interior_vehicle_data_request.h @@ -34,7 +34,9 @@ #define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_HMI_RC_GET_INTERIOR_VEHICLE_DATA_REQUEST_H_ #include "application_manager/commands/request_to_hmi.h" +#include "rc_rpc_plugin/commands/rc_command_request.h" #include "rc_rpc_plugin/resource_allocation_manager.h" +#include "rc_rpc_plugin/interior_data_cache.h" #include "utils/macro.h" namespace rc_rpc_plugin { @@ -45,12 +47,8 @@ class RCGetInteriorVehicleDataRequest : public application_manager::commands::RequestToHMI { public: RCGetInteriorVehicleDataRequest( - 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); void Run() OVERRIDE; ~RCGetInteriorVehicleDataRequest(); diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_get_interior_vehicle_data_response.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_get_interior_vehicle_data_response.h index 28f9b4b9c7..c9e5d39d1d 100644 --- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_get_interior_vehicle_data_response.h +++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_get_interior_vehicle_data_response.h @@ -34,7 +34,9 @@ #define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_HMI_RC_GET_INTERIOR_VEHICLE_DATA_RESPONSE_H_ #include "application_manager/commands/response_from_hmi.h" +#include "rc_rpc_plugin/commands/rc_command_request.h" #include "rc_rpc_plugin/resource_allocation_manager.h" +#include "rc_rpc_plugin/interior_data_cache.h" #include "utils/macro.h" namespace rc_rpc_plugin { @@ -45,12 +47,8 @@ class RCGetInteriorVehicleDataResponse : public application_manager::commands::ResponseFromHMI { public: RCGetInteriorVehicleDataResponse( - 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); void Run() OVERRIDE; diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_on_interior_vehicle_data_notification.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_on_interior_vehicle_data_notification.h index 0afa613c7c..aeb0a06d22 100644 --- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_on_interior_vehicle_data_notification.h +++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_on_interior_vehicle_data_notification.h @@ -30,11 +30,13 @@ POSSIBILITY OF SUCH DAMAGE. */ -#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_COMMANDS_HMI_RC_ON_INTERIOR_VEHICLE_DATA_NOTIFICATION_H -#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_COMMANDS_HMI_RC_ON_INTERIOR_VEHICLE_DATA_NOTIFICATION_H +#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_HMI_RC_ON_INTERIOR_VEHICLE_DATA_NOTIFICATION_H_ +#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_HMI_RC_ON_INTERIOR_VEHICLE_DATA_NOTIFICATION_H_ #include "application_manager/commands/notification_from_hmi.h" +#include "rc_rpc_plugin/commands/rc_command_request.h" #include "rc_rpc_plugin/resource_allocation_manager.h" +#include "rc_rpc_plugin/interior_data_cache.h" #include "utils/macro.h" namespace rc_rpc_plugin { @@ -54,12 +56,8 @@ class RCOnInteriorVehicleDataNotification * @param resource_allocation_manager ResourceAllocationManager **/ RCOnInteriorVehicleDataNotification( - 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); ~RCOnInteriorVehicleDataNotification(); @@ -71,4 +69,4 @@ class RCOnInteriorVehicleDataNotification } // namespace commands } // namespace rc_rpc_plugin -#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_COMMANDS_HMI_RC_ON_INTERIOR_VEHICLE_DATA_NOTIFICATION_H +#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_HMI_RC_ON_INTERIOR_VEHICLE_DATA_NOTIFICATION_H_ diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_on_remote_control_settings_notification.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_on_remote_control_settings_notification.h index b9ab821176..7aa1aa3dba 100644 --- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_on_remote_control_settings_notification.h +++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_on_remote_control_settings_notification.h @@ -30,15 +30,18 @@ POSSIBILITY OF SUCH DAMAGE. */ -#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_COMMANDS_HMI_RC_ON_REMOTE_CONTROL_SETTINGS_NOTIFICATION_H -#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_COMMANDS_HMI_RC_ON_REMOTE_CONTROL_SETTINGS_NOTIFICATION_H +#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_HMI_RC_ON_REMOTE_CONTROL_SETTINGS_NOTIFICATION_H_ +#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_HMI_RC_ON_REMOTE_CONTROL_SETTINGS_NOTIFICATION_H_ #include "application_manager/commands/notification_from_hmi.h" +#include "rc_rpc_plugin/commands/rc_command_request.h" +#include "rc_rpc_plugin/interior_data_cache.h" #include "rc_rpc_plugin/resource_allocation_manager.h" #include "utils/macro.h" namespace rc_rpc_plugin { namespace app_mngr = application_manager; +class InteriorDataManager; namespace commands { class RCOnRemoteControlSettingsNotification @@ -54,12 +57,8 @@ class RCOnRemoteControlSettingsNotification * @param resource_allocation_manager ResourceAllocationManager **/ RCOnRemoteControlSettingsNotification( - 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, - rc_rpc_plugin::ResourceAllocationManager& resource_allocation_manager); + const application_manager::commands::MessageSharedPtr& message, + const RCCommandParams& params); /** * @brief Execute command **/ @@ -69,7 +68,7 @@ class RCOnRemoteControlSettingsNotification private: ResourceAllocationManager& resource_allocation_manager_; - + InteriorDataManager& interior_data_manager_; /** * @brief Disalows RC functionality for all RC apps * All registered apps will be unsubsribed from OnInteriorVehicleData @@ -80,4 +79,4 @@ class RCOnRemoteControlSettingsNotification } // namespace commands } // namespace rc_rpc_plugin -#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_COMMANDS_HMI_RC_ON_REMOTE_CONTROL_SETTINGS_NOTIFICATION_H +#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_HMI_RC_ON_REMOTE_CONTROL_SETTINGS_NOTIFICATION_H_ diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_set_interior_vehicle_data_request.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_set_interior_vehicle_data_request.h index 194b423b1a..69b48bfecf 100644 --- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_set_interior_vehicle_data_request.h +++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_set_interior_vehicle_data_request.h @@ -34,7 +34,9 @@ #define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_HMI_RC_SET_INTERIOR_VEHICLE_DATA_REQUEST_H_ #include "application_manager/commands/request_to_hmi.h" +#include "rc_rpc_plugin/commands/rc_command_request.h" #include "rc_rpc_plugin/resource_allocation_manager.h" +#include "rc_rpc_plugin/interior_data_cache.h" #include "utils/macro.h" namespace rc_rpc_plugin { @@ -54,12 +56,8 @@ class RCSetInteriorVehicleDataRequest * @param resource_allocation_manager ResourceAllocationManager **/ RCSetInteriorVehicleDataRequest( - 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); void Run() OVERRIDE; ~RCSetInteriorVehicleDataRequest(); }; diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_set_interior_vehicle_data_response.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_set_interior_vehicle_data_response.h index f23acda4d4..8a63503220 100644 --- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_set_interior_vehicle_data_response.h +++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/hmi/rc_set_interior_vehicle_data_response.h @@ -30,11 +30,13 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_COMMANDS_HMI_SET_INTERIOR_VEHICLE_DATA_RESPONSE_H -#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_COMMANDS_HMI_SET_INTERIOR_VEHICLE_DATA_RESPONSE_H +#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_HMI_RC_SET_INTERIOR_VEHICLE_DATA_RESPONSE_H_ +#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_HMI_RC_SET_INTERIOR_VEHICLE_DATA_RESPONSE_H_ #include "application_manager/commands/response_from_hmi.h" +#include "rc_rpc_plugin/commands/rc_command_request.h" #include "rc_rpc_plugin/resource_allocation_manager.h" +#include "rc_rpc_plugin/interior_data_cache.h" #include "utils/macro.h" namespace rc_rpc_plugin { @@ -54,12 +56,8 @@ class RCSetInteriorVehicleDataResponse * @param resource_allocation_manager ResourceAllocationManager **/ RCSetInteriorVehicleDataResponse( - 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); void Run() OVERRIDE; @@ -68,4 +66,4 @@ class RCSetInteriorVehicleDataResponse } // namespace commands } // namespace rc_rpc_plugin -#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_COMMANDS_HMI_SET_INTERIOR_VEHICLE_DATA_RESPONSE_H +#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_HMI_RC_SET_INTERIOR_VEHICLE_DATA_RESPONSE_H_ diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/button_press_request.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/button_press_request.h index fa89c10bf9..d6ecfd0128 100644 --- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/button_press_request.h +++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/button_press_request.h @@ -30,8 +30,8 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_COMMANDS_BUTTON_PRESS_REQUEST_H -#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_COMMANDS_BUTTON_PRESS_REQUEST_H +#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_MOBILE_BUTTON_PRESS_REQUEST_H_ +#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_MOBILE_BUTTON_PRESS_REQUEST_H_ #include "rc_rpc_plugin/commands/rc_command_request.h" @@ -41,12 +41,9 @@ namespace app_mngr = application_manager; namespace commands { class ButtonPressRequest : public RCCommandRequest { public: - ButtonPressRequest(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); + ButtonPressRequest( + const application_manager::commands::MessageSharedPtr& message, + const RCCommandParams& params); /** * @brief Execute command @@ -96,4 +93,4 @@ class ButtonPressRequest : public RCCommandRequest { } // namespace commands } // namespace rc_rpc_plugin -#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_COMMANDS_BUTTON_PRESS_REQUEST_H +#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_MOBILE_BUTTON_PRESS_REQUEST_H_ diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/button_press_response.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/button_press_response.h index 16d7b0e3fe..0f3964494e 100644 --- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/button_press_response.h +++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/button_press_response.h @@ -30,11 +30,13 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_COMMANDS_BUTTON_PRESS_RESPONSE_H -#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_COMMANDS_BUTTON_PRESS_RESPONSE_H +#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_MOBILE_BUTTON_PRESS_RESPONSE_H_ +#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_MOBILE_BUTTON_PRESS_RESPONSE_H_ #include "application_manager/commands/command_response_impl.h" #include "rc_rpc_plugin/resource_allocation_manager.h" +#include "rc_rpc_plugin/commands/rc_command_request.h" +#include "rc_rpc_plugin/interior_data_cache.h" #include "utils/macro.h" namespace rc_rpc_plugin { @@ -44,12 +46,9 @@ namespace commands { class ButtonPressResponse : public application_manager::commands::CommandResponseImpl { public: - ButtonPressResponse(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); + ButtonPressResponse( + const application_manager::commands::MessageSharedPtr& message, + const RCCommandParams& params); void Run() OVERRIDE; /** * @brief ButtonPressResponse class destructor @@ -59,4 +58,4 @@ class ButtonPressResponse } // namespace commands } // namespace rc_rpc_plugin -#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_COMMANDS_BUTTON_PRESS_RESPONSE_H +#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_MOBILE_BUTTON_PRESS_RESPONSE_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..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 @@ -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 */ @@ -67,6 +63,9 @@ class GetInteriorVehicleDataRequest : public RCCommandRequest { ~GetInteriorVehicleDataRequest(); private: + std::vector<application_manager::ApplicationSharedPtr> + AppsSubscribedToModuleType(const std::string& module_type); + /** * @brief Check if app wants to proceed with already setup subscription * @param request_params request parameters to check @@ -80,8 +79,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 @@ -91,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 diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/get_interior_vehicle_data_response.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/get_interior_vehicle_data_response.h index 78148ab7df..bf8208edc2 100644 --- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/get_interior_vehicle_data_response.h +++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/get_interior_vehicle_data_response.h @@ -30,11 +30,13 @@ POSSIBILITY OF SUCH DAMAGE. */ -#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_COMMANDS_GET_INTERIOR_VEHICLE_DATA_RESPONSE_H -#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_COMMANDS_GET_INTERIOR_VEHICLE_DATA_RESPONSE_H +#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_MOBILE_GET_INTERIOR_VEHICLE_DATA_RESPONSE_H_ +#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_MOBILE_GET_INTERIOR_VEHICLE_DATA_RESPONSE_H_ #include "application_manager/commands/command_response_impl.h" +#include "rc_rpc_plugin/commands/rc_command_request.h" #include "rc_rpc_plugin/resource_allocation_manager.h" +#include "rc_rpc_plugin/interior_data_cache.h" #include "utils/macro.h" namespace rc_rpc_plugin { @@ -45,12 +47,8 @@ class GetInteriorVehicleDataResponse : public application_manager::commands::CommandResponseImpl { public: GetInteriorVehicleDataResponse( - 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); void Run() OVERRIDE; @@ -59,4 +57,4 @@ class GetInteriorVehicleDataResponse } // namespace commands } // namespace rc_rpc_plugin -#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_COMMANDS_GET_INTERIOR_VEHICLE_DATA_RESPONSE_H +#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_MOBILE_GET_INTERIOR_VEHICLE_DATA_RESPONSE_H_ diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/on_interior_vehicle_data_notification.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/on_interior_vehicle_data_notification.h index 20a7e69868..931e79366c 100644 --- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/on_interior_vehicle_data_notification.h +++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/on_interior_vehicle_data_notification.h @@ -36,6 +36,8 @@ #include <string> #include "application_manager/commands/command_notification_impl.h" #include "rc_rpc_plugin/resource_allocation_manager.h" +#include "rc_rpc_plugin/interior_data_cache.h" +#include "rc_rpc_plugin/commands/rc_command_request.h" #include "utils/macro.h" namespace rc_rpc_plugin { @@ -46,18 +48,18 @@ class OnInteriorVehicleDataNotification : public application_manager::commands::CommandNotificationImpl { public: OnInteriorVehicleDataNotification( - 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_handler, - ResourceAllocationManager& resource_allocation_manager); + const application_manager::commands::MessageSharedPtr& message, + const RCCommandParams& params); void Run() OVERRIDE; std::string ModuleType(); ~OnInteriorVehicleDataNotification(); + + private: + InteriorDataCache& interior_data_cache_; + void AddDataToCache(const std::string& module_type); }; } // namespace commands } // namespace rc_rpc_plugin diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/set_interior_vehicle_data_request.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/set_interior_vehicle_data_request.h index 83a8dfdd75..d5de4981c6 100644 --- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/set_interior_vehicle_data_request.h +++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/set_interior_vehicle_data_request.h @@ -30,8 +30,8 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_COMMANDS_SET_INTERIOR_VEHICLE_DATA_REQUEST_H -#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_COMMANDS_SET_INTERIOR_VEHICLE_DATA_REQUEST_H +#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_MOBILE_SET_INTERIOR_VEHICLE_DATA_REQUEST_H_ +#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_MOBILE_SET_INTERIOR_VEHICLE_DATA_REQUEST_H_ #include "rc_rpc_plugin/commands/rc_command_request.h" @@ -42,12 +42,8 @@ namespace commands { class SetInteriorVehicleDataRequest : public RCCommandRequest { public: SetInteriorVehicleDataRequest( - 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, - rc_rpc_plugin::ResourceAllocationManager& resource_allocation_manager); + const application_manager::commands::MessageSharedPtr& message, + const RCCommandParams& params); /** * @brief Execute command @@ -118,8 +114,17 @@ class SetInteriorVehicleDataRequest : public RCCommandRequest { */ const smart_objects::SmartObject& ControlData( const smart_objects::SmartObject& module_data); + + /** + * @brief CheckAudioSource check that if app wants to change + * the audio source from MOBILE_APP to other types of audio + * source without keepContext parameter or with keepContext=false + * then this app will go to HMI level 'BACKGROUND' + * @param module_data received params + */ + void CheckAudioSource(const smart_objects::SmartObject& audio_data); }; } // namespace commands } // namespace rc_rpc_plugin -#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_COMMANDS_SET_INTERIOR_VEHICLE_DATA_REQUEST_H +#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_MOBILE_SET_INTERIOR_VEHICLE_DATA_REQUEST_H_ diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/set_interior_vehicle_data_response.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/set_interior_vehicle_data_response.h index 5661a57c07..1ab5ccc6bc 100644 --- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/set_interior_vehicle_data_response.h +++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/set_interior_vehicle_data_response.h @@ -30,11 +30,13 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_COMMANDS_SET_INTERIOR_VEHICLE_DATA_RESPONSE_H -#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_COMMANDS_SET_INTERIOR_VEHICLE_DATA_RESPONSE_H +#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_MOBILE_SET_INTERIOR_VEHICLE_DATA_RESPONSE_H_ +#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_MOBILE_SET_INTERIOR_VEHICLE_DATA_RESPONSE_H_ #include "application_manager/commands/command_response_impl.h" #include "rc_rpc_plugin/resource_allocation_manager.h" +#include "rc_rpc_plugin/interior_data_cache.h" +#include "rc_rpc_plugin/commands/rc_command_request.h" #include "utils/macro.h" namespace rc_rpc_plugin { @@ -45,12 +47,8 @@ class SetInteriorVehicleDataResponse : public application_manager::commands::CommandResponseImpl { public: SetInteriorVehicleDataResponse( - 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); void Run() OVERRIDE; @@ -59,4 +57,4 @@ class SetInteriorVehicleDataResponse } // namespace commands } // namespace rc_rpc_plugin -#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_COMMANDS_SET_INTERIOR_VEHICLE_DATA_RESPONSE_H +#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_MOBILE_SET_INTERIOR_VEHICLE_DATA_RESPONSE_H_ diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/rc_command_params.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/rc_command_params.h new file mode 100644 index 0000000000..8e7ed9c667 --- /dev/null +++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/rc_command_params.h @@ -0,0 +1,64 @@ +/* + Copyright (c) 2018, Ford Motor Company + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following + disclaimer in the documentation and/or other materials provided with the + distribution. + + Neither the name of the Ford Motor Company nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_RC_COMMAND_PARAMS_H_ +#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_RC_COMMAND_PARAMS_H_ + +namespace application_manager { +class ApplicationManager; +namespace rpc_service { +class RPCService; +} +class HMICapabilities; +} + +namespace policy { +class PolicyHandlerInterface; +} + +namespace rc_rpc_plugin { + +class ResourceAllocationManager; +class InteriorDataCache; +class InteriorDataManager; + +struct RCCommandParams { + application_manager::ApplicationManager& application_manager_; + application_manager::rpc_service::RPCService& rpc_service_; + application_manager::HMICapabilities& hmi_capabilities_; + policy::PolicyHandlerInterface& policy_handler_; + rc_rpc_plugin::ResourceAllocationManager& resource_allocation_manager_; + rc_rpc_plugin::InteriorDataCache& interior_data_cache_; + rc_rpc_plugin::InteriorDataManager& interior_data_manager_; +}; +} +#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_RC_COMMAND_PARAMS_H_ diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/rc_command_request.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/rc_command_request.h index 7c5e6f0ebc..ce95617b6c 100644 --- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/rc_command_request.h +++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/rc_command_request.h @@ -30,12 +30,14 @@ POSSIBILITY OF SUCH DAMAGE. */ -#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_RC_COMMAND_REQUEST_H -#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_RC_COMMAND_REQUEST_H +#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_RC_COMMAND_REQUEST_H_ +#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_RC_COMMAND_REQUEST_H_ #include "rc_rpc_plugin/resource_allocation_manager.h" #include "rc_rpc_plugin/rc_app_extension.h" #include "application_manager/commands/command_request_impl.h" +#include "rc_rpc_plugin/interior_data_cache.h" +#include "rc_rpc_plugin/commands/rc_command_params.h" namespace rc_rpc_plugin { namespace app_mngr = application_manager; @@ -56,12 +58,8 @@ class RCCommandRequest : public app_mngr::commands::CommandRequestImpl { * @param resource_allocation_manager ResourceAllocationManager **/ RCCommandRequest( - 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_handl, - rc_rpc_plugin::ResourceAllocationManager& resource_allocation_manager); + const application_manager::commands::MessageSharedPtr& message, + const RCCommandParams& params); virtual ~RCCommandRequest(); @@ -73,9 +71,11 @@ class RCCommandRequest : public app_mngr::commands::CommandRequestImpl { protected: bool is_subscribed; - ResourceAllocationManager& resource_allocation_manager_; bool auto_allowed_; + ResourceAllocationManager& resource_allocation_manager_; + InteriorDataCache& interior_data_cache_; + InteriorDataManager& interior_data_manager_; /** * @brief AcquireResource try to allocate resource for application * In case if allocation of resource is not required, return ALLOWED by @@ -169,4 +169,4 @@ class RCCommandRequest : public app_mngr::commands::CommandRequestImpl { } } -#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_RC_COMMAND_REQUEST_H +#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_RC_COMMAND_REQUEST_H_ diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/interior_data_cache.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/interior_data_cache.h new file mode 100644 index 0000000000..f12566d14c --- /dev/null +++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/interior_data_cache.h @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2018, Ford Motor Company + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following + * disclaimer in the documentation and/or other materials provided with the + * distribution. + * + * Neither the name of the Ford Motor Company nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_INTERIOR_DATA_CACHE_H_ +#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_INTERIOR_DATA_CACHE_H_ +#include <string> +#include "smart_objects/smart_object.h" + +namespace rc_rpc_plugin { + +/** + * @brief The InteriorDataCache interface for caching data class + * Provide ability to cache module data by module type name and clear cache + */ +class InteriorDataCache { + public: + /** + * @brief Add module data to cache + * @param module_type module type name + * @param module_data data to be cached + */ + virtual void Add(const std::string& module_type, + const smart_objects::SmartObject& module_data) = 0; + + /** + * @brief Retrieve Get cached data + * @param module_type data type to get from cache + * @return smart object with cached data, or nulll smart object + */ + virtual smart_objects::SmartObject Retrieve( + const std::string& module_type) const = 0; + + /** + * @brief Contains check if data exists in cache + * @param module_type module type name to check in cache + * @return true if cached, false otherwize + */ + virtual bool Contains(const std::string& module_type) const = 0; + + /** + * @brief Remove cached data + * @param module_type data type to remove from cache + */ + virtual void Remove(const std::string& module_type) = 0; + + /** + * @brief Clear clear all cached data + */ + virtual void Clear() = 0; +}; +} // rc_rpc_plugin + +#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_INTERIOR_DATA_CACHE_H_ diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/interior_data_cache_impl.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/interior_data_cache_impl.h new file mode 100644 index 0000000000..f2971e3d72 --- /dev/null +++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/interior_data_cache_impl.h @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2018, Ford Motor Company + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following + * disclaimer in the documentation and/or other materials provided with the + * distribution. + * + * Neither the name of the Ford Motor Company nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_INTERIOR_DATA_CACHE_IMPL_H_ +#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_INTERIOR_DATA_CACHE_IMPL_H_ + +#include <map> + +#include "utils/macro.h" +#include "utils/lock.h" +#include "rc_rpc_plugin/interior_data_cache.h" + +namespace rc_rpc_plugin { +class InteriorDataCacheImpl : public InteriorDataCache { + public: + InteriorDataCacheImpl(); + + ~InteriorDataCacheImpl(); + + void Add(const std::string& module_type, + const smart_objects::SmartObject& module_data) OVERRIDE; + smart_objects::SmartObject Retrieve( + const std::string& module_type) const OVERRIDE; + bool Contains(const std::string& module_type) const OVERRIDE; + void Remove(const std::string& module_type) OVERRIDE; + void Clear() OVERRIDE; + + private: + std::map<std::string, smart_objects::SmartObject> cached_data_; + mutable sync_primitives::Lock cached_data_lock_; +}; + +} // rc_rpc_plugin + +#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_INTERIOR_DATA_CACHE_IMPL_H_ diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/interior_data_manager.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/interior_data_manager.h new file mode 100644 index 0000000000..f28c388055 --- /dev/null +++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/interior_data_manager.h @@ -0,0 +1,86 @@ +/* + Copyright (c) 2018, Ford Motor Company + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following + disclaimer in the documentation and/or other materials provided with the + distribution. + + Neither the name of the Ford Motor Company nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_INTERIOR_DATA_MANAGER_H_ +#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_INTERIOR_DATA_MANAGER_H_ + +#include "application_manager/application.h" +#include "application_manager/plugin_manager/rpc_plugin.h" + +namespace rc_rpc_plugin { + +namespace app_mngr = application_manager; +namespace plugins = application_manager::plugin_manager; + +class InteriorDataManager { + public: + /** + * @brief OnPolicyEvent Processes policy related events + * @param event Policy event + */ + virtual void OnPolicyEvent(app_mngr::plugin_manager::PolicyEvent event) = 0; + + /** + * @brief OnApplicationEvent Notifies modules on certain application events + * @param event Event + * @param application Pointer to application struct + */ + virtual void OnApplicationEvent( + plugins::ApplicationEvent event, + app_mngr::ApplicationSharedPtr application) = 0; + + /** + * @brief OnDisablingRC process disable RC event. Unsubscribe from all modules + * and clear cache + */ + virtual void OnDisablingRC() = 0; + + /** + * @brief StoreRequestToHMITime save information and time stamp of + * current interior data subscriptions + */ + virtual void StoreRequestToHMITime(const std::string& module_type) = 0; + + /** + * @brief CheckRequestsToHMIFrequency check that rate limits are not allowed of + * bounce during current time frame. + * calculate amount of requests per module type in time frame and checks if it + * bigger then allowed by ini file + * @param module_type moduletype to calculate frequency on + * @return true if amount of requests was not exceeded, otherwise return false. + */ + virtual bool CheckRequestsToHMIFrequency(const std::string& module_type) = 0; +}; + +} // namespace rc_rpc_plugin + +#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_INTERIOR_DATA_MANAGER_H_ diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/interior_data_manager_impl.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/interior_data_manager_impl.h new file mode 100644 index 0000000000..b36f47f260 --- /dev/null +++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/interior_data_manager_impl.h @@ -0,0 +1,122 @@ +/* + Copyright (c) 2018, Ford Motor Company + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following + disclaimer in the documentation and/or other materials provided with the + distribution. + + Neither the name of the Ford Motor Company nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_INTERIOR_DATA_MANAGER_IMPL_H_ +#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_INTERIOR_DATA_MANAGER_IMPL_H_ +#include "rc_rpc_plugin/interior_data_manager.h" +#include "utils/date_time.h" + +namespace application_manager { +class ApplicationManager; +namespace rpc_service { +class RPCService; +} +} +namespace rc_rpc_plugin { + +class InteriorDataCache; +class RCRPCPlugin; + +class InteriorDataManagerImpl : public InteriorDataManager { + public: + InteriorDataManagerImpl( + RCRPCPlugin& rc_plugin, + InteriorDataCache& cache, + application_manager::ApplicationManager& app_mngr, + application_manager::rpc_service::RPCService& rpc_service); + + void OnPolicyEvent(app_mngr::plugin_manager::PolicyEvent event) OVERRIDE; + + void OnApplicationEvent(plugins::ApplicationEvent event, + app_mngr::ApplicationSharedPtr application) OVERRIDE; + + void OnDisablingRC() OVERRIDE; + + void StoreRequestToHMITime(const std::string& module_type) OVERRIDE; + + bool CheckRequestsToHMIFrequency(const std::string& module_type) OVERRIDE; + + private: + /** + * @brief UpdateHMISubscriptionsOnPolicyUpdated process policy update event. + * If some modules was disabeled by policies and there are no applications + * that subscribed to them - send RC.GetInteriorVehicleData(subscribe=false) + * and clear cache + */ + void UpdateHMISubscriptionsOnPolicyUpdated(); + + /** + * @brief UpdateHMISubscriptionsOnAppUnregistered process AppUnregistered + * event and unsubscribed from not actual module types + * @param app application that was unregistered + */ + void UpdateHMISubscriptionsOnAppUnregistered( + application_manager::Application& app); + + /** + * @brief UnsubscribeFromInteriorVehicleData remove module_type from cache and + * send RC.GetInteriorVehicleData(subscribe=false) to HMI + * @param module_type module type that need to be unsubscribed + */ + void UnsubscribeFromInteriorVehicleData(const std::string& module_type); + + void ClearOldRequestsToHMIHistory(); + /** + * @brief AppsModules mapping from applications to list of modules + */ + typedef std::map<application_manager::ApplicationSharedPtr, + std::vector<std::string> > AppsModules; + + /** + * @brief AppsSubscribedModules get mapping of application to list of + * subscribed modules + * @return map of applications to list of subscribed modules + */ + AppsModules AppsSubscribedModules(); + + /** + * @brief RequestsToHMIHistory mapping from module type to vector of time + * stamps + */ + typedef std::map<std::string, std::deque<TimevalStruct> > + RequestsToHMIHistory; + RequestsToHMIHistory requests_to_hmi_history_; + mutable sync_primitives::Lock requests_to_hmi_history_lock_; + + RCRPCPlugin& rc_plugin_; + InteriorDataCache& cache_; + application_manager::ApplicationManager& app_mngr_; + application_manager::rpc_service::RPCService& rpc_service_; +}; + +} // namespace rc_rpc_plugin +#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_INTERIOR_DATA_MANAGER_IMPL_H_ diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_app_extension.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_app_extension.h index 72f29c7de1..14397237c5 100644 --- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_app_extension.h +++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_app_extension.h @@ -30,8 +30,8 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_RC_APP_EXTENSION_H_ -#define SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_RC_APP_EXTENSION_H_ +#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_RC_APP_EXTENSION_H_ +#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_RC_APP_EXTENSION_H_ #include <string> #include <set> @@ -69,6 +69,12 @@ class RCAppExtension : public application_manager::AppExtension { */ bool IsSubscibedToInteriorVehicleData(const std::string& module_type); + /** + * @brief get list of subscriptions of application + * @return list of subscriptions of application + */ + std::set<std::string> InteriorVehicleDataSubscriptions() const; + private: std::set<std::string> subscribed_interior_vehicle_data_; @@ -84,4 +90,4 @@ typedef std::shared_ptr<RCAppExtension> RCAppExtensionPtr; } // namespace rc_rpc_plugin -#endif // SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_RC_APP_EXTENSION_H_ +#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_RC_APP_EXTENSION_H_ diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_command_factory.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_command_factory.h index 6f101cefef..56be342b56 100644 --- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_command_factory.h +++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_command_factory.h @@ -30,8 +30,8 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_RC_COMMAND_FACTORY_H -#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_RC_COMMAND_FACTORY_H +#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_RC_COMMAND_FACTORY_H_ +#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_RC_COMMAND_FACTORY_H_ #include <memory> #include "application_manager/command_factory.h" @@ -41,6 +41,8 @@ #include "application_manager/hmi_capabilities.h" #include "application_manager/policies/policy_handler_interface.h" #include "rc_rpc_plugin/resource_allocation_manager.h" +#include "rc_rpc_plugin/interior_data_cache.h" +#include "rc_rpc_plugin/commands/rc_command_params.h" #include "utils/macro.h" namespace rc_rpc_plugin { @@ -56,11 +58,7 @@ class RCCommandFactory : public application_manager::CommandFactory { * @param policy_handler PolicyHandlerInterface * @param allocation_manager ResourceAllocationManager **/ - RCCommandFactory(app_mngr::ApplicationManager& app_manager, - app_mngr::rpc_service::RPCService& rpc_service, - app_mngr::HMICapabilities& hmi_capabilities, - policy::PolicyHandlerInterface& policy_handler, - ResourceAllocationManager& allocation_manager); + RCCommandFactory(const RCCommandParams& params); application_manager::CommandSharedPtr CreateCommand( const app_mngr::commands::MessageSharedPtr& message, app_mngr::commands::Command::CommandSource source) OVERRIDE; @@ -84,11 +82,7 @@ class RCCommandFactory : public application_manager::CommandFactory { hmi_apis::FunctionID::eType id, hmi_apis::messageType::eType message_type) const; - app_mngr::ApplicationManager& app_manager_; - app_mngr::rpc_service::RPCService& rpc_service_; - app_mngr::HMICapabilities& hmi_capabilities_; - PolicyHandlerInterface& policy_handler_; - ResourceAllocationManager& allocation_manager_; + RCCommandParams params_; }; } // namespace rc_rpc_plugin -#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_RC_COMMAND_FACTORY_H +#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_RC_COMMAND_FACTORY_H_ diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_helpers.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_helpers.h new file mode 100644 index 0000000000..cf3c6cd5e4 --- /dev/null +++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_helpers.h @@ -0,0 +1,96 @@ +/* + Copyright (c) 2018, Ford Motor Company + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following + disclaimer in the documentation and/or other materials provided with the + distribution. + + Neither the name of the Ford Motor Company nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_RC_HELPERS_H_ +#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_RC_HELPERS_H_ + +#include <map> +#include <string> +#include "application_manager/application.h" +#include "rc_rpc_plugin/rc_app_extension.h" + +namespace rc_rpc_plugin { +class RCRPCPlugin; + +/** + * @brief The RCHelpers class contains frequently used static data + * structures related strictly to RC + * Converters, mapping, factory functions + */ +class RCHelpers { + public: + /** + * @brief GetModuleTypeToDataMapping get mapping of module type enum naming to + * actual module data filed name + * @return module mapping from enum naming to filed name + */ + static const std::function<std::string(const std::string& module_type)> + GetModuleTypeToDataMapping(); + + /** + * @brief GetModuleTypeToDataMapping get mapping of module type enum naming to + * actual module capabilities key + * @return module mapping from enum naming to capabilities key + */ + static const std::function<std::string(const std::string& module_type)> + GetModuleTypeToCapabilitiesMapping(); + + /** + * @brief GetModulesList get list of all known modules + * @return vector contains all known modules + */ + static const std::vector<std::string> GetModulesList(); + + /** + * @brief GetRCExtension extract RC extension from application + * @param app application to extract extension + * @return rc extension of app is rc applicaiton, otherwise return emty shared + * pointer. + */ + static RCAppExtensionPtr GetRCExtension( + application_manager::Application& app); + + static smart_objects::SmartObjectSPtr CreateUnsubscribeRequestToHMI( + const std::string& module_type, const uint32_t correlation_id); + + static std::vector<application_manager::ApplicationSharedPtr> + AppsSubscribedToModuleType(application_manager::ApplicationManager& app_mngr, + const std::string& module_type); + + typedef std::map<application_manager::ApplicationSharedPtr, + std::vector<std::string> > AppsModules; + static AppsModules GetApplicationsAllowedModules( + application_manager::ApplicationManager& app_mngr); +}; + +} // rc_rpc_plugin +#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_RC_HELPERS_H_ diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_module_constants.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_module_constants.h index f2037aabbb..e80507445b 100644 --- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_module_constants.h +++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_module_constants.h @@ -30,8 +30,8 @@ POSSIBILITY OF SUCH DAMAGE. */ -#ifndef SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_RC_MODULE_CONSTANTS_H_ -#define SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_RC_MODULE_CONSTANTS_H_ +#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_RC_MODULE_CONSTANTS_H_ +#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_RC_MODULE_CONSTANTS_H_ namespace rc_rpc_plugin { @@ -40,7 +40,23 @@ namespace strings { const char kclimateControlCapabilities[] = "climateControlCapabilities"; const char kradioControlCapabilities[] = "radioControlCapabilities"; const char kbuttonCapabilities[] = "buttonCapabilities"; +const char kaudioControlCapabilities[] = "audioControlCapabilities"; +const char klightControlCapabilities[] = "lightControlCapabilities"; +const char khmiSettingsControlCapabilities[] = "hmiSettingsControlCapabilities"; const char kseatControlCapabilities[] = "seatControlCapabilities"; +// RemoteControlCapabilities constants + +const char kRadioControlData[] = "radioControlData"; +const char kClimateControlData[] = "climateControlData"; +const char kSupportedLights[] = "supportedLights"; + +// LightControlCapabilities +const char kName[] = "name"; +const char kDensityAvailable[] = "densityAvailable"; +const char kRGBColorSpaceAvailable[] = "rgbColorSpaceAvailable"; + +// RadioControlCapabilities +const char kSiriusxmRadioAvailable[] = "siriusxmRadioAvailable"; } // strings namespace result_codes { @@ -139,6 +155,7 @@ const char kSignalStrength[] = "signalStrength"; const char kSignalChangeThreshold[] = "signalChangeThreshold"; const char kRadioEnable[] = "radioEnable"; const char kState[] = "state"; +const char kSisData[] = "sisData"; // RadioControlData struct // ClimateControlData struct @@ -153,11 +170,30 @@ const char kDefrostZone[] = "defrostZone"; const char kDualModeEnable[] = "dualModeEnable"; const char kACMaxEnable[] = "acMaxEnable"; const char kVentilationMode[] = "ventilationMode"; +const char kHeatedSteeringWheelEnable[] = "heatedSteeringWheelEnable"; +const char kHeatedWindshieldEnable[] = "heatedWindshieldEnable"; +const char kHeatedRearWindowEnable[] = "heatedRearWindowEnable"; +const char kHeatedMirrorsEnable[] = "heatedMirrorsEnable"; // ClimateControlData struct +// LightControlData +const char kLightState[] = "lightState"; +const char kStatus[] = "status"; +const char kDensity[] = "density"; +const char kColor[] = "color"; + +// AudioControlData +const char kSource[] = "source"; +const char kKeepContext[] = "keepContext"; +const char kEqualizerSettings[] = "equalizerSettings"; +const char kChannelName[] = "channelName"; + // ModuleData struct const char kRadioControlData[] = "radioControlData"; const char kClimateControlData[] = "climateControlData"; +const char kAudioControlData[] = "audioControlData"; +const char kLightControlData[] = "lightControlData"; +const char kHmiSettingsControlData[] = "hmiSettingsControlData"; const char kSeatControlData[] = "seatControlData"; // ModuleData struct @@ -173,6 +209,9 @@ namespace enums_value { const char kClimate[] = "CLIMATE"; const char kRadio[] = "RADIO"; const char kSeat[] = "SEAT"; +const char kAudio[] = "AUDIO"; +const char kLight[] = "LIGHT"; +const char kHmiSettings[] = "HMI_SETTINGS"; // ModuleType enum // RadioBand enum @@ -235,4 +274,4 @@ const char kAskDriver[] = "ASK_DRIVER"; } // namespace remote_control -#endif // SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_RC_MODULE_CONSTANTS_H_ +#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_RC_MODULE_CONSTANTS_H_ diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_rpc_plugin.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_rpc_plugin.h index 910eda6d3c..ae88ed9cc0 100644 --- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_rpc_plugin.h +++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_rpc_plugin.h @@ -30,15 +30,21 @@ POSSIBILITY OF SUCH DAMAGE. */ -#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_RC_PLUGIN_H -#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_RC_PLUGIN_H +#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_RC_RPC_PLUGIN_H_ +#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_RC_RPC_PLUGIN_H_ + +#include <memory> + #include "application_manager/plugin_manager/rpc_plugin.h" #include "application_manager/command_factory.h" #include "rc_rpc_plugin/resource_allocation_manager.h" +#include "rc_rpc_plugin/interior_data_cache.h" +#include "rc_rpc_plugin/interior_data_manager.h" namespace rc_rpc_plugin { namespace plugins = application_manager::plugin_manager; namespace app_mngr = application_manager; + class RCRPCPlugin : public plugins::RPCPlugin { public: /** @@ -72,6 +78,7 @@ class RCRPCPlugin : public plugins::RPCPlugin { * @return plugins command factory */ app_mngr::CommandFactory& GetCommandFactory() OVERRIDE; + /** * @brief OnPolicyEvent Processes policy related events * @param event Policy event @@ -92,11 +99,15 @@ class RCRPCPlugin : public plugins::RPCPlugin { application_manager::ApplicationManager& app_mngr); private: + application_manager::rpc_service::RPCService* rpc_service_; + application_manager::ApplicationManager* app_mngr_; std::unique_ptr<application_manager::CommandFactory> command_factory_; std::unique_ptr<ResourceAllocationManager> resource_allocation_manager_; + std::unique_ptr<InteriorDataCache> interior_data_cache_; + std::unique_ptr<InteriorDataManager> interior_data_manager_; }; } // namespace rc_rpc_plugin extern "C" application_manager::plugin_manager::RPCPlugin* Create(); -#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_RC_PLUGIN_H +#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_RC_RPC_PLUGIN_H_ diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/resource_allocation_manager.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/resource_allocation_manager.h index 91d1b09fca..67598b667b 100644 --- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/resource_allocation_manager.h +++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/resource_allocation_manager.h @@ -30,8 +30,8 @@ POSSIBILITY OF SUCH DAMAGE. */ -#ifndef SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_RESOURCE_ALLOCATION_H -#define SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_RESOURCE_ALLOCATION_H +#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_RESOURCE_ALLOCATION_MANAGER_H_ +#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_RESOURCE_ALLOCATION_MANAGER_H_ #include <string> #include "utils/macro.h" @@ -154,9 +154,6 @@ class ResourceAllocationManager { */ virtual void ResetAllAllocations() = 0; - virtual RCAppExtensionPtr GetApplicationExtention( - application_manager::ApplicationSharedPtr application) = 0; - /** * @brief Create and send OnRCStatusNotification to mobile and HMI * @param event trigger for notification sending @@ -178,4 +175,4 @@ class ResourceAllocationManager { }; } // namespace rc_rpc_plugin -#endif // SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_RESOURCE_ALLOCATION_H +#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_RESOURCE_ALLOCATION_MANAGER_H_ diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/resource_allocation_manager_impl.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/resource_allocation_manager_impl.h index d6124a026b..b359ee4d29 100644 --- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/resource_allocation_manager_impl.h +++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/resource_allocation_manager_impl.h @@ -30,8 +30,8 @@ POSSIBILITY OF SUCH DAMAGE. */ -#ifndef SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_RESOURCE_ALLOCATION_IMPL_H -#define SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_RESOURCE_ALLOCATION_IMPL_H +#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_RESOURCE_ALLOCATION_MANAGER_IMPL_H_ +#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_RESOURCE_ALLOCATION_MANAGER_IMPL_H_ #include "rc_rpc_plugin/resource_allocation_manager.h" #include "application_manager/application_impl.h" #include "rc_rpc_plugin/rc_app_extension.h" @@ -110,14 +110,6 @@ class ResourceAllocationManagerImpl : public ResourceAllocationManager { void ResetAllAllocations() FINAL; - /** - * @brief GetApplicationExtention Provides access to application RC extention - * @param application Application - * @return Pointer to RC extention of application or NULL if not available - */ - RCAppExtensionPtr GetApplicationExtention( - application_manager::ApplicationSharedPtr application) FINAL; - void SendOnRCStatusNotifications( NotificationTrigger::eType event, application_manager::ApplicationSharedPtr application) FINAL; @@ -198,8 +190,6 @@ class ResourceAllocationManagerImpl : public ResourceAllocationManager { */ void SetResourceFree(const std::string& module_type, const uint32_t app_id); - std::vector<std::string> all_supported_modules(); - /** * @brief AllocatedResources contains link between resource and application * owning that resource @@ -231,4 +221,4 @@ class ResourceAllocationManagerImpl : public ResourceAllocationManager { }; } // rc_rpc_plugin -#endif // SRC_COMPONENTS_REMOTE_CONTROL_INCLUDE_REMOTE_CONTROL_RESOURCE_ALLOCATION_IMPL_H +#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_RESOURCE_ALLOCATION_MANAGER_IMPL_H_ |