summaryrefslogtreecommitdiff
path: root/src/components/application_manager/include/application_manager/message_helper.h
diff options
context:
space:
mode:
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.h90
1 files changed, 82 insertions, 8 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..b94609c01b 100644
--- a/src/components/application_manager/include/application_manager/message_helper.h
+++ b/src/components/application_manager/include/application_manager/message_helper.h
@@ -2,6 +2,9 @@
Copyright (c) 2015, Ford Motor Company
All rights reserved.
+ Copyright (c) 2017, Livio, Inc.
+ All rights reserved.
+
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -42,11 +45,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 +64,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 +141,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
@@ -213,10 +217,12 @@ class MessageHelper {
static smart_objects::SmartObjectSPtr CreateSetAppIcon(
const std::string& path_to_icon, uint32_t app_id);
+ DEPRECATED static bool SendIVISubscribtions(const uint32_t app_id,
+ ApplicationManager& app_mngr);
/**
* @brief Sends IVI subscription requests
*/
- static bool SendIVISubscribtions(const uint32_t app_id,
+ static bool SendIVISubscriptions(const uint32_t app_id,
ApplicationManager& app_mngr);
/**
@@ -702,6 +708,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 +800,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.