diff options
Diffstat (limited to 'src/components/application_manager/include/application_manager/message_helper.h')
-rw-r--r-- | src/components/application_manager/include/application_manager/message_helper.h | 83 |
1 files changed, 76 insertions, 7 deletions
diff --git a/src/components/application_manager/include/application_manager/message_helper.h b/src/components/application_manager/include/application_manager/message_helper.h index c0a3f37c34..fc84538dae 100644 --- a/src/components/application_manager/include/application_manager/message_helper.h +++ b/src/components/application_manager/include/application_manager/message_helper.h @@ -42,11 +42,11 @@ #include "utils/macro.h" #include "connection_handler/device.h" #include "application_manager/application.h" -#include "application_manager/vehicle_info_data.h" #include "policy/policy_types.h" #include "protocol_handler/session_observer.h" #include "application_manager/policies/policy_handler_interface.h" #include "smart_objects/smart_object.h" +#include "transport_manager/common.h" namespace policy { class PolicyHandlerInterface; @@ -61,7 +61,7 @@ namespace mobile_api = mobile_apis; * @param const char* Name of the parameter in mobile request * @param VehicleDataType Enum for vehicle data */ -typedef std::map<std::string, VehicleDataType> VehicleData; +typedef std::map<std::string, mobile_apis::VehicleDataType::eType> VehicleData; /** * @brief MessageHelper class @@ -138,7 +138,8 @@ class MessageHelper { mobile_apis::Result::eType mobile_result); static std::string GetDeviceMacAddressForHandle( - const uint32_t device_handle, const ApplicationManager& app_mngr); + const transport_manager::DeviceHandle device_handle, + const ApplicationManager& app_mngr); /** * @brief Converts string to mobile Result enum value * @param mobile_result stringified value @@ -702,6 +703,71 @@ class MessageHelper { int32_t connection_key, mobile_api::AppInterfaceUnregisteredReason::eType reason); + /** + * @brief SendDeleteCommandRequest sends requests to HMI to remove UI/VR + * command data depending on command parameters + * @param cmd Command data + * @param application Application owning the command data + * @param app_mngr Application manager + */ + static void SendDeleteCommandRequest(smart_objects::SmartObject* cmd, + ApplicationSharedPtr application, + ApplicationManager& app_mngr); + + /** + * @brief SendDeleteSubmenuRequest sends UI/VR requests to HMI to remove + * submenues-related data depending on command parameters + * @param cmd Command data + * @param application Application owning the commmand data + * @param app_mngr Application manager + */ + static void SendDeleteSubmenuRequest(smart_objects::SmartObject* cmd, + ApplicationSharedPtr application, + ApplicationManager& app_mngr); + + /** + * @brief SendDeleteChoiceSetRequest sends requests to HMI to remove + * choice sets - related data depending on command parameters + * @param cmd Command data + * @param application Application owning command data + * @param app_mngr Application manager + */ + static void SendDeleteChoiceSetRequest(smart_objects::SmartObject* cmd, + ApplicationSharedPtr application, + ApplicationManager& app_mngr); + + /** + * @brief SendResetPropertiesRequest sends requests to HMI to remove/reset + * global properties for application + * @param application Application to remove/reset global properties for + * @param app_mngr Application manager + */ + static void SendResetPropertiesRequest(ApplicationSharedPtr application, + ApplicationManager& app_mngr); + + /** + * @brief SendUnsubscribeButtonNotification sends notification to HMI to + * remove button subscription for application + * @param button Button type + * @param application Application to unsubscribe + * @param app_mngr Application manager + */ + static void SendUnsubscribeButtonNotification( + mobile_apis::ButtonName::eType button, + ApplicationSharedPtr application, + ApplicationManager& app_mngr); + + /** + * @brief SendUnsubscribeIVIRequest sends request to HMI to remove vehicle + * data subscription for application + * @param ivi_id Vehicle data item id + * @param application Application to unsubscribe + * @param app_mngr Application manager + */ + static void SendUnsubscribeIVIRequest(int32_t ivi_id, + ApplicationSharedPtr application, + ApplicationManager& app_mngr); + #ifdef SDL_REMOTE_CONTROL /** * @brief Sends HMI status notification to mobile @@ -729,11 +795,14 @@ class MessageHelper { private: /** - * @brief Creates new request object and fill its header - * @return New request object + * @brief CreateMessageForHMI Creates HMI message with prepared header + * acccoring to message type + * @param message_type Message type + * @param correlation_id Correlation id + * @return HMI message object with filled header */ - static smart_objects::SmartObjectSPtr CreateRequestObject( - const uint32_t correlation_id); + static smart_objects::SmartObjectSPtr CreateMessageForHMI( + hmi_apis::messageType::eType message_type, const uint32_t correlation_id); /** * @brief Allows to fill SO according to the current permissions. |