summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Keeler <jacob.keeler@livioradio.com>2019-07-31 13:49:15 -0400
committerGitHub <noreply@github.com>2019-07-31 13:49:15 -0400
commitc323382c54fc11a79829946663107aab8f048986 (patch)
tree7bd4930393346921983a5d52459ac3b761ea7c55
parentbdf676ad0818ab2144ef337979ed8b1fe4c7f85e (diff)
parentb7a3f9c0e528d533909c1ef92f0b477c98d3cf07 (diff)
downloadsdl_core-feature/cancel_interaction.tar.gz
Merge branch 'develop' into feature/cancel_interactionfeature/cancel_interaction
-rw-r--r--README.md1
-rwxr-xr-xsrc/appMain/hmi_capabilities.json10
-rw-r--r--src/appMain/sdl_preloaded_pt.json6
-rw-r--r--src/components/application_manager/include/application_manager/smart_object_keys.h2
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_show_app_menu_request.h74
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_show_app_menu_response.h74
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/show_app_menu_request.h81
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/show_app_menu_response.h74
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_show_app_menu_request.cc61
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_show_app_menu_response.cc63
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_request.cc17
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_app_menu_request.cc142
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_app_menu_response.cc63
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_request.cc16
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/hmi_command_factory.cc7
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/mobile_command_factory.cc7
-rw-r--r--src/components/application_manager/src/hmi_interfaces_impl.cc1
-rw-r--r--src/components/application_manager/src/smart_object_keys.cc2
-rw-r--r--src/components/interfaces/HMI_API.xml33
-rw-r--r--src/components/interfaces/MOBILE_API.xml64
-rw-r--r--src/components/policy/policy_external/include/policy/policy_table/enums.h5
-rw-r--r--src/components/policy/policy_external/src/policy_table/enums.cc5
-rw-r--r--src/components/policy/policy_regular/include/policy/policy_table/enums.h5
-rw-r--r--src/components/policy/policy_regular/src/policy_table/enums.cc9
24 files changed, 815 insertions, 7 deletions
diff --git a/README.md b/README.md
index 86d07c3d83..6166a51344 100644
--- a/README.md
+++ b/README.md
@@ -97,6 +97,7 @@ There are several RPCs that are "required" to be implemented in order for SDL to
* DeleteCommand
* AddSubMenu
* DeleteSubMenu
+ * ShowAppMenu
* CreateInteractionChoiceSet
* PerformInteraction
* DeleteInteractionChoiceSet
diff --git a/src/appMain/hmi_capabilities.json b/src/appMain/hmi_capabilities.json
index 481c6d0c6b..71c0b14100 100755
--- a/src/appMain/hmi_capabilities.json
+++ b/src/appMain/hmi_capabilities.json
@@ -242,6 +242,16 @@
"resolutionWidth": 35,
"resolutionHeight": 35
}
+ },
+ {
+ "name": "alertIcon",
+ "imageTypeSupported": [
+ "GRAPHIC_PNG"
+ ],
+ "imageResolution": {
+ "resolutionWidth": 225,
+ "resolutionHeight": 225
+ }
}
],
diff --git a/src/appMain/sdl_preloaded_pt.json b/src/appMain/sdl_preloaded_pt.json
index 4c1be7126a..c36150b230 100644
--- a/src/appMain/sdl_preloaded_pt.json
+++ b/src/appMain/sdl_preloaded_pt.json
@@ -49,6 +49,9 @@
"FULL",
"LIMITED"]
},
+ "ShowAppMenu": {
+ "hmi_levels": ["FULL"]
+ },
"Alert": {
"hmi_levels": ["FULL",
"LIMITED"]
@@ -789,6 +792,9 @@
"FULL",
"LIMITED"]
},
+ "ShowAppMenu": {
+ "hmi_levels": ["FULL"]
+ },
"Alert": {
"hmi_levels": ["FULL",
"LIMITED"]
diff --git a/src/components/application_manager/include/application_manager/smart_object_keys.h b/src/components/application_manager/include/application_manager/smart_object_keys.h
index 8b03993e4e..7f5a1d78db 100644
--- a/src/components/application_manager/include/application_manager/smart_object_keys.h
+++ b/src/components/application_manager/include/application_manager/smart_object_keys.h
@@ -92,6 +92,7 @@ extern const char* main_field_1;
extern const char* main_field_2;
extern const char* main_field_3;
extern const char* main_field_4;
+extern const char* template_title;
extern const char* metadata_tags;
extern const char* eta;
extern const char* time_to_destination;
@@ -132,6 +133,7 @@ extern const char* progress_indicator;
extern const char* func_id;
extern const char* cancel_id;
extern const char* alert_type;
+extern const char* alert_icon;
extern const char* play_tone;
extern const char* soft_buttons;
extern const char* soft_button_id;
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_show_app_menu_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_show_app_menu_request.h
new file mode 100644
index 0000000000..c47d73b858
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_show_app_menu_request.h
@@ -0,0 +1,74 @@
+/*
+ * 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_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SHOW_APP_MENU_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SHOW_APP_MENU_REQUEST_H_
+
+#include "application_manager/commands/request_to_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UIShowAppMenuRequest command class
+ **/
+class UIShowAppMenuRequest : public app_mngr::commands::RequestToHMI {
+ public:
+ /**
+ * @brief UIShowAppMenuRequest class constructor
+ **/
+ UIShowAppMenuRequest(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);
+
+ /**
+ * @brief UIShowAppMenuRequest class destructor
+ **/
+ ~UIShowAppMenuRequest() OVERRIDE;
+
+ /**
+ * @brief Execute command
+ **/
+ void Run() OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UIShowAppMenuRequest);
+};
+
+} // namespace commands
+} // namespace sdl_rpc_plugin
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SHOW_APP_MENU_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_show_app_menu_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_show_app_menu_response.h
new file mode 100644
index 0000000000..c03a043e12
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/hmi/ui_show_app_menu_response.h
@@ -0,0 +1,74 @@
+/*
+ * 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_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SHOW_APP_MENU_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SHOW_APP_MENU_RESPONSE_H_
+
+#include "application_manager/commands/response_from_hmi.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief UIShowAppMenuResponse command class
+ **/
+class UIShowAppMenuResponse : public app_mngr::commands::ResponseFromHMI {
+ public:
+ /**
+ * @brief UIShowAppMenuResponse class constructor
+ **/
+ UIShowAppMenuResponse(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);
+
+ /**
+ * @brief UIShowAppMenuResponse class destructor
+ **/
+ ~UIShowAppMenuResponse() OVERRIDE;
+
+ /**
+ * @brief Execute command
+ **/
+ void Run() OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UIShowAppMenuResponse);
+};
+
+} // namespace commands
+} // namespace sdl_rpc_plugin
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_HMI_UI_SHOW_APP_MENU_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/show_app_menu_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/show_app_menu_request.h
new file mode 100644
index 0000000000..c9691a808f
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/show_app_menu_request.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_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SHOW_APP_MENU_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SHOW_APP_MENU_REQUEST_H_
+
+#include "application_manager/commands/command_request_impl.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief ShowAppMenuRequest command class
+ **/
+class ShowAppMenuRequest : public app_mngr::commands::CommandRequestImpl {
+ public:
+ /**
+ * @brief ShowAppMenuRequest class constructor
+ **/
+ ShowAppMenuRequest(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);
+
+ /**
+ * @brief ShowAppMenuRequest class destructor
+ **/
+ ~ShowAppMenuRequest() OVERRIDE;
+
+ /**
+ * @brief Execute command
+ **/
+ void Run() OVERRIDE;
+
+ /**
+ * @brief Interface method that is called whenever new event received
+ *
+ * @param event The received event
+ **/
+ void on_event(const app_mngr::event_engine::Event& event) OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ShowAppMenuRequest);
+};
+
+} // namespace commands
+} // namespace sdl_rpc_plugin
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SHOW_APP_MENU_REQUEST_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/show_app_menu_response.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/show_app_menu_response.h
new file mode 100644
index 0000000000..1e357e8a11
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/show_app_menu_response.h
@@ -0,0 +1,74 @@
+/*
+ * 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_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SHOW_APP_MENU_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SHOW_APP_MENU_RESPONSE_H_
+
+#include "application_manager/commands/command_response_impl.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+/**
+ * @brief ShowAppMenuResponse command class
+ **/
+class ShowAppMenuResponse : public app_mngr::commands::CommandResponseImpl {
+ public:
+ /**
+ * @brief ShowAppMenuResponse class constructor
+ **/
+ ShowAppMenuResponse(const app_mngr::commands::MessageSharedPtr& messasge,
+ app_mngr::ApplicationManager& application_manager,
+ app_mngr::rpc_service::RPCService& rpc_service,
+ app_mngr::HMICapabilities& hmi_capabilities,
+ policy::PolicyHandlerInterface& policy_handler);
+
+ /**
+ * @brief ShowAppMenuResponse class destructor
+ **/
+ ~ShowAppMenuResponse() OVERRIDE;
+
+ /**
+ * @brief Execute command
+ **/
+ void Run() OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ShowAppMenuResponse);
+};
+
+} // namespace commands
+} // namespace sdl_rpc_plugin
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_SDL_RPC_PLUGIN_INCLUDE_SDL_RPC_PLUGIN_COMMANDS_MOBILE_SHOW_APP_MENU_RESPONSE_H_
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_show_app_menu_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_show_app_menu_request.cc
new file mode 100644
index 0000000000..c2c8566e82
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_show_app_menu_request.cc
@@ -0,0 +1,61 @@
+/*
+ * 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.
+ */
+
+#include "sdl_rpc_plugin/commands/hmi/ui_show_app_menu_request.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+UIShowAppMenuRequest::UIShowAppMenuRequest(
+ 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)
+ : RequestToHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+UIShowAppMenuRequest::~UIShowAppMenuRequest() {}
+
+void UIShowAppMenuRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendRequest();
+}
+
+} // namespace commands
+} // namespace sdl_rpc_plugin
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_show_app_menu_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_show_app_menu_response.cc
new file mode 100644
index 0000000000..14bbc79e03
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/ui_show_app_menu_response.cc
@@ -0,0 +1,63 @@
+/*
+ * 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.
+ */
+
+#include "sdl_rpc_plugin/commands/hmi/ui_show_app_menu_response.h"
+#include "application_manager/event_engine/event.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+UIShowAppMenuResponse::UIShowAppMenuResponse(
+ 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)
+ : ResponseFromHMI(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handle) {}
+
+UIShowAppMenuResponse::~UIShowAppMenuResponse() {}
+
+void UIShowAppMenuResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ app_mngr::event_engine::Event event(hmi_apis::FunctionID::UI_ShowAppMenu);
+ event.set_smart_object(*message_);
+ event.raise(application_manager_.event_dispatcher());
+}
+
+} // namespace commands
+} // namespace sdl_rpc_plugin
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_request.cc
index 0fa42c0f21..dc225df3be 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/alert_request.cc
@@ -355,6 +355,23 @@ void AlertRequest::SendAlertRequest(int32_t app_id) {
MessageHelper::SubscribeApplicationToSoftButton(
(*message_)[strings::msg_params], app, function_id());
}
+
+ if ((*message_)[strings::msg_params].keyExists(strings::alert_icon)) {
+ auto verification_result = MessageHelper::VerifyImage(
+ (*message_)[strings::msg_params][strings::alert_icon],
+ app,
+ application_manager_);
+
+ if (mobile_apis::Result::INVALID_DATA == verification_result) {
+ LOG4CXX_ERROR(logger_, "Image verification failed.");
+ SendResponse(false, verification_result);
+ return;
+ }
+
+ msg_params[strings::alert_icon] =
+ (*message_)[strings::msg_params][strings::alert_icon];
+ }
+
// app_id
msg_params[strings::app_id] = app_id;
msg_params[strings::duration] = default_timeout_;
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_app_menu_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_app_menu_request.cc
new file mode 100644
index 0000000000..2a8dc6cb70
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_app_menu_request.cc
@@ -0,0 +1,142 @@
+/*
+ * 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.
+ */
+
+#include "sdl_rpc_plugin/commands/mobile/show_app_menu_request.h"
+
+#include "application_manager/message_helper.h"
+#include "utils/helpers.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+ShowAppMenuRequest::ShowAppMenuRequest(
+ 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)
+ : CommandRequestImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+ShowAppMenuRequest::~ShowAppMenuRequest() {}
+
+void ShowAppMenuRequest::Run() {
+ using namespace app_mngr;
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ ApplicationSharedPtr app = application_manager_.application(connection_key());
+
+ if (!app) {
+ LOG4CXX_ERROR(
+ logger_,
+ "Application with id " << connection_key() << " is not registered.");
+ SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
+ return;
+ }
+
+ if (mobile_apis::HMILevel::HMI_FULL != app->hmi_level() ||
+ helpers::Compare<mobile_apis::SystemContext::eType,
+ helpers::NEQ,
+ helpers::ALL>(
+ app->system_context(),
+ mobile_apis::SystemContext::SYSCTXT_MAIN,
+ mobile_apis::SystemContext::SYSCTXT_MENU)) {
+ LOG4CXX_ERROR(
+ logger_,
+ "Application with id " << connection_key() << " is not activated.");
+ SendResponse(false, mobile_apis::Result::REJECTED);
+ return;
+ }
+
+ auto msg_params = smart_objects::SmartObject(smart_objects::SmartType_Map);
+ msg_params[strings::app_id] = app->app_id();
+
+ const auto& received_msg_params = (*message_)[strings::msg_params];
+ if (received_msg_params.keyExists(strings::menu_id)) {
+ const int32_t menu_id = received_msg_params[strings::menu_id].asInt();
+ if (!app->FindSubMenu(menu_id)) {
+ LOG4CXX_ERROR(logger_, "Menu with id " << menu_id << " is not found.");
+ SendResponse(false, mobile_apis::Result::INVALID_ID);
+ return;
+ }
+ msg_params[strings::menu_id] = menu_id;
+ }
+
+ StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
+ SendHMIRequest(hmi_apis::FunctionID::UI_ShowAppMenu, &msg_params, true);
+}
+
+void ShowAppMenuRequest::on_event(const app_mngr::event_engine::Event& event) {
+ using namespace app_mngr;
+ LOG4CXX_AUTO_TRACE(logger_);
+ const smart_objects::SmartObject& message = event.smart_object();
+
+ switch (event.id()) {
+ case hmi_apis::FunctionID::UI_ShowAppMenu: {
+ EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
+ const auto result_code = static_cast<hmi_apis::Common_Result::eType>(
+ message[strings::params][hmi_response::code].asInt());
+ std::string response_info;
+ GetInfo(message, response_info);
+ const bool result = PrepareResultForMobileResponse(
+ result_code, HmiInterfaces::HMI_INTERFACE_UI);
+
+ ApplicationSharedPtr app =
+ application_manager_.application(connection_key());
+
+ if (!app) {
+ LOG4CXX_ERROR(logger_,
+ "Application with id " << connection_key()
+ << " is not registered.");
+ return;
+ }
+
+ SendResponse(result,
+ MessageHelper::HMIToMobileResult(result_code),
+ response_info.empty() ? NULL : response_info.c_str(),
+ &message[strings::msg_params]);
+ break;
+ }
+ default: {
+ LOG4CXX_ERROR(logger_, "Received unknown event: " << event.id());
+ return;
+ }
+ }
+}
+
+} // namespace commands
+} // namespace sdl_rpc_plugin
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_app_menu_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_app_menu_response.cc
new file mode 100644
index 0000000000..2b952ea9ac
--- /dev/null
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_app_menu_response.cc
@@ -0,0 +1,63 @@
+/*
+ * 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.
+ */
+
+#include "sdl_rpc_plugin/commands/mobile/show_app_menu_response.h"
+
+#include "application_manager/rpc_service.h"
+
+namespace sdl_rpc_plugin {
+namespace app_mngr = application_manager;
+
+namespace commands {
+
+ShowAppMenuResponse::ShowAppMenuResponse(
+ 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)
+ : CommandResponseImpl(message,
+ application_manager,
+ rpc_service,
+ hmi_capabilities,
+ policy_handler) {}
+
+ShowAppMenuResponse::~ShowAppMenuResponse() {}
+
+void ShowAppMenuResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ rpc_service_.SendMessageToMobile(message_);
+}
+
+} // namespace commands
+} // namespace sdl_rpc_plugin
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_request.cc
index 2bf1a81261..bf26cc62af 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_request.cc
@@ -218,6 +218,14 @@ void ShowRequest::Run() {
HandleMetadata(strings::main_field_4, main_field_4_index, msg_params);
}
+ if ((*message_)[strings::msg_params].keyExists(strings::template_title)) {
+ msg_params[hmi_request::show_strings][index][hmi_request::field_name] =
+ static_cast<int32_t>(hmi_apis::Common_TextFieldName::templateTitle);
+ msg_params[hmi_request::show_strings][index][hmi_request::field_text] =
+ (*message_)[strings::msg_params][strings::template_title];
+ ++index;
+ }
+
if ((*message_)[strings::msg_params].keyExists(strings::media_clock)) {
msg_params[hmi_request::show_strings][index][hmi_request::field_name] =
static_cast<int32_t>(hmi_apis::Common_TextFieldName::mediaClock);
@@ -355,6 +363,14 @@ bool ShowRequest::CheckStringsOfShowRequest() {
return false;
}
}
+ if ((*message_)[strings::msg_params].keyExists(strings::template_title)) {
+ str =
+ (*message_)[strings::msg_params][strings::template_title].asCharArray();
+ if (strlen(str) && !CheckSyntax(str)) {
+ LOG4CXX_ERROR(logger_, "Invalid templateTitle syntax check failed");
+ return false;
+ }
+ }
if ((*message_)[strings::msg_params].keyExists(strings::status_bar)) {
str = (*message_)[strings::msg_params][strings::status_bar].asCharArray();
if (strlen(str) && !CheckSyntax(str)) {
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/hmi_command_factory.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/hmi_command_factory.cc
index bc5778823e..d76a053808 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/hmi_command_factory.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/hmi_command_factory.cc
@@ -238,6 +238,8 @@
#include "sdl_rpc_plugin/commands/hmi/ui_send_haptic_data_response.h"
#include "sdl_rpc_plugin/commands/hmi/ui_set_display_layout_request.h"
#include "sdl_rpc_plugin/commands/hmi/ui_set_display_layout_response.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_show_app_menu_request.h"
+#include "sdl_rpc_plugin/commands/hmi/ui_show_app_menu_response.h"
#include "sdl_rpc_plugin/commands/hmi/bc_get_file_path_request.h"
#include "sdl_rpc_plugin/commands/hmi/bc_get_file_path_response.h"
@@ -416,6 +418,11 @@ CommandCreator& HMICommandFactory::get_creator_factory(
? factory.GetCreator<commands::UIDeleteSubmenuRequest>()
: factory.GetCreator<commands::UIDeleteSubmenuResponse>();
}
+ case hmi_apis::FunctionID::UI_ShowAppMenu: {
+ return hmi_apis::messageType::request == message_type
+ ? factory.GetCreator<commands::UIShowAppMenuRequest>()
+ : factory.GetCreator<commands::UIShowAppMenuResponse>();
+ }
case hmi_apis::FunctionID::UI_SetMediaClockTimer: {
return hmi_apis::messageType::request == message_type
? factory.GetCreator<commands::UISetMediaClockTimerRequest>()
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/mobile_command_factory.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/mobile_command_factory.cc
index f69363f95f..7f5318751e 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/mobile_command_factory.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/mobile_command_factory.cc
@@ -114,6 +114,8 @@
#include "sdl_rpc_plugin/commands/mobile/set_global_properties_response.h"
#include "sdl_rpc_plugin/commands/mobile/set_media_clock_timer_request.h"
#include "sdl_rpc_plugin/commands/mobile/set_media_clock_timer_response.h"
+#include "sdl_rpc_plugin/commands/mobile/show_app_menu_request.h"
+#include "sdl_rpc_plugin/commands/mobile/show_app_menu_response.h"
#include "sdl_rpc_plugin/commands/mobile/show_constant_tbt_request.h"
#include "sdl_rpc_plugin/commands/mobile/show_constant_tbt_response.h"
#include "sdl_rpc_plugin/commands/mobile/show_request.h"
@@ -189,6 +191,11 @@ CommandCreator& MobileCommandFactory::get_command_creator(
? factory.GetCreator<commands::DeleteSubMenuRequest>()
: factory.GetCreator<commands::DeleteSubMenuResponse>();
}
+ case mobile_apis::FunctionID::ShowAppMenuID: {
+ return mobile_api::messageType::request == message_type
+ ? factory.GetCreator<commands::ShowAppMenuRequest>()
+ : factory.GetCreator<commands::ShowAppMenuResponse>();
+ }
case mobile_apis::FunctionID::DeleteInteractionChoiceSetID: {
return mobile_api::messageType::request == message_type
? factory.GetCreator<
diff --git a/src/components/application_manager/src/hmi_interfaces_impl.cc b/src/components/application_manager/src/hmi_interfaces_impl.cc
index 23d9ad9906..1400ead8cf 100644
--- a/src/components/application_manager/src/hmi_interfaces_impl.cc
+++ b/src/components/application_manager/src/hmi_interfaces_impl.cc
@@ -137,6 +137,7 @@ generate_function_to_interface_convert_map() {
convert_map[UI_DeleteCommand] = HmiInterfaces::HMI_INTERFACE_UI;
convert_map[UI_AddSubMenu] = HmiInterfaces::HMI_INTERFACE_UI;
convert_map[UI_DeleteSubMenu] = HmiInterfaces::HMI_INTERFACE_UI;
+ convert_map[UI_ShowAppMenu] = HmiInterfaces::HMI_INTERFACE_UI;
convert_map[UI_PerformInteraction] = HmiInterfaces::HMI_INTERFACE_UI;
convert_map[UI_SetMediaClockTimer] = HmiInterfaces::HMI_INTERFACE_UI;
convert_map[UI_SetGlobalProperties] = HmiInterfaces::HMI_INTERFACE_UI;
diff --git a/src/components/application_manager/src/smart_object_keys.cc b/src/components/application_manager/src/smart_object_keys.cc
index eeaaf7d72c..96f6fd02de 100644
--- a/src/components/application_manager/src/smart_object_keys.cc
+++ b/src/components/application_manager/src/smart_object_keys.cc
@@ -59,6 +59,7 @@ const char* main_field_1 = "mainField1";
const char* main_field_2 = "mainField2";
const char* main_field_3 = "mainField3";
const char* main_field_4 = "mainField4";
+const char* template_title = "templateTitle";
const char* metadata_tags = "metadataTags";
const char* eta = "eta";
const char* time_to_destination = "timeToDestination";
@@ -99,6 +100,7 @@ const char* progress_indicator = "progressIndicator";
const char* func_id = "functionID";
const char* cancel_id = "cancelID";
const char* alert_type = "alertType";
+const char* alert_icon = "alertIcon";
const char* play_tone = "playTone";
const char* soft_buttons = "softButtons";
const char* soft_button_id = "softButtonID";
diff --git a/src/components/interfaces/HMI_API.xml b/src/components/interfaces/HMI_API.xml
index f6e085f09c..18dd9cf1bd 100644
--- a/src/components/interfaces/HMI_API.xml
+++ b/src/components/interfaces/HMI_API.xml
@@ -535,6 +535,9 @@
<element name="mediaTrack">
<description>The track field of NGN and GEN1.1 MFD displays. This field is only available for media applications; applies to "Show"</description>
</element>
+ <element name="templateTitle">
+ <description>The title of the new template that will be displayed; applies to "Show"</description>
+ </element>
<element name="alertText1">
<description>The first line of the alert text field; applies to "Alert"</description>
</element>
@@ -606,7 +609,7 @@
</element>
<element name="timeToDestination"/>
<!-- TO DO to be removed -->
- <element name="turnText"/>
+ <element name="turnText"/>
</enum>
<enum name="MetadataType">
@@ -688,6 +691,9 @@
<element name="locationImage">
<description>The optional image of a destination / location</description>
</element>
+ <element name="alertIcon">
+ <description>The image field for Alert</description>
+ </element>
</enum>
<enum name="TextAlignment">
@@ -4650,6 +4656,12 @@
An ID for this specific alert to allow cancellation through the `CancelInteraction` RPC.
</description>
</param>
+ <param name="alertIcon" type="Common.Image" mandatory="false" >
+ <description>
+ Image to be displayed for the corresponding alert. See Image.
+ If omitted, no (or the default if applicable) icon should be displayed.
+ </description>
+ </param>
</function>
<function name="Alert" messagetype="response">
<param name="tryAgainTime" type="Integer" mandatory="false" minvalue="0" maxvalue="2000000000">
@@ -4657,12 +4669,13 @@
</param>
</function>
<function name="Show" messagetype="request">
- <param name="showStrings" type="Common.TextFieldStruct" mandatory="true" array="true" minsize="0" maxsize="7">
- <description>Array of lines of show text fields. See TextFieldStruct. Uses mainField1, mainField2, mainField3, mainField4. If some field is not set, the corresponding text should stay unchanged. If field's text is empty "", the field must be cleared.
+ <param name="showStrings" type="Common.TextFieldStruct" mandatory="true" array="true" minsize="0" maxsize="8">
+ <description>Array of lines of show text fields. See TextFieldStruct. If some field is not set, the corresponding text should stay unchanged. If field's text is empty "", the field must be cleared.
mainField1: The text that should be displayed in a single or upper display line.
mainField2: The text that should be displayed on the second display line.
mainField3: The text that should be displayed on the second "page" first display line.
mainField4: The text that should be displayed on the second "page" second display line.
+ templateTitle: The title of the new template that will be displayed.
statusBar: statusBar.
mediaClock: Text value for MediaClock field.
mediaTrack: The text that should be displayed in the track field. This field is only valid for media applications on NGN type ACMs.
@@ -4752,6 +4765,20 @@
</function>
<function name="DeleteSubMenu" messagetype="response">
</function>
+ <function name="ShowAppMenu" messagetype="request">
+ <description>Request from SDL to show an app's menu or a corresponding sub-menu.</description>
+ <param name="menuID" type="Integer" minvalue="1" maxvalue="2000000000" mandatory="false">
+ <description>
+ If ommited the HMI opens the app's menu.
+ If set to a sub-menu ID the HMI opens the corresponding sub-menu previously added using `AddSubMenu`.
+ </description>
+ </param>
+ <param name="appID" type="Integer" mandatory="true">
+ <description>ID of application that concerns this RPC.</description>
+ </param>
+ </function>
+ <function name="ShowAppMenu" messagetype="response">
+ </function>
<function name="PerformInteraction" messagetype="request">
<description>Request from SDL for triggering an interaction (e.g. "Permit GPS?" - Yes, no, Always Allow).</description>
<param name="initialText" type="Common.TextFieldStruct" mandatory="false">
diff --git a/src/components/interfaces/MOBILE_API.xml b/src/components/interfaces/MOBILE_API.xml
index 82a5a2e571..0c05e0cb6b 100644
--- a/src/components/interfaces/MOBILE_API.xml
+++ b/src/components/interfaces/MOBILE_API.xml
@@ -752,7 +752,11 @@
<element name="mediaTrack">
<description>The track field of NGN and GEN1.1 MFD displays. This field is only available for media applications; applies to "Show"</description>
</element>
-
+
+ <element name="templateTitle" since="6.0">
+ <description>The title of the new template that will be displayed; applies to "Show"</description>
+ </element>
+
<element name="alertText1">
<description>The first line of the alert text field; applies to "Alert"</description>
</element>
@@ -891,7 +895,11 @@
<element name="locationImage" since="4.0">
<description>The optional image of a destination / location</description>
</element>
-
+
+ <element name="alertIcon" since="6.0">
+ <description>The image field for Alert</description>>
+ </element>
+
</enum>
<enum name="CharacterSet" since="1.0">
@@ -2684,6 +2692,7 @@
<element name="UnpublishAppServiceID" value="56" hexvalue="38" since="6.0" />
<element name="CancelInteractionID" value="57" hexvalue="39" since="6.0" />
<element name="CloseApplicationID" value="58" hexvalue="3A" since="6.0" />
+ <element name="ShowAppMenuID" value="59" hexvalue="3B" since="6.0" />
<!--
Base Notifications
@@ -4737,6 +4746,37 @@
</function>
+ <function name="ShowAppMenu" functionID="ShowAppMenuID" messagetype="request" since="6.0">
+ <description>Shows the built in menu view</description>
+ <param name="menuID" type="Integer" minvalue="1" maxvalue="2000000000" mandatory="false">
+ <description>
+ If omitted the HMI opens the app's menu.
+ If set to a sub-menu ID the HMI opens the corresponding sub-menu previously added using `AddSubMenu`.
+ </description>
+ </param>
+ </function>
+
+ <function name="ShowAppMenu" functionID="ShowAppMenuID" messagetype="response" since="6.0">
+ <param name="success" type="Boolean" platform="documentation" mandatory="true">
+ <description> true if successful; false, if failed </description>
+ </param>
+ <param name="resultCode" type="Result" platform="documentation" mandatory="true">
+ <description>See Result</description>
+ <element name="SUCCESS"/>
+ <element name="INVALID_DATA"/>
+ <element name="OUT_OF_MEMORY"/>
+ <element name="TOO_MANY_PENDING_REQUESTS"/>
+ <element name="APPLICATION_NOT_REGISTERED"/>
+ <element name="GENERIC_ERROR"/>
+ <element name="REJECTED"/>
+ <element name="INVALID_ID"/>
+ <element name="IN_USE"/>
+ </param>
+ <param name="info" type="String" maxlength="1000" mandatory="false" platform="documentation">
+ <description>Provides additional human readable info regarding the result.</description>
+ </param>
+ </function>
+
<function name="CreateInteractionChoiceSet" functionID="CreateInteractionChoiceSetID" messagetype="request" since="1.0">
<description>creates interaction choice set to be used later by performInteraction</description>
@@ -4969,6 +5009,13 @@
If omitted on supported displays, the displayed alert shall not have any SoftButtons.
</description>
</param>
+
+ <param name="alertIcon" type="Image" mandatory="false" since="6.0">
+ <description>
+ Image struct determining whether static or dynamic icon.
+ If omitted on supported displays, no (or the default if applicable) icon should be displayed.
+ </description>
+ </param>
<param name="cancelID" type="Integer" mandatory="false" since="6.0">
<description>
@@ -5104,9 +5151,18 @@
</param>
<param name="metadataTags" type="MetadataTags" mandatory="false" since="4.5">
- <description>App defined metadata information. See MetadataStruct. Uses mainField1, mainField2, mainField3, mainField4.
+ <description>
+ App defined metadata information. See MetadataStruct. Uses mainField1, mainField2, mainField3, mainField4.
If omitted on supported displays, the currently set metadata tags will not change.
- If any text field contains no tags or the none tag, the metadata tag for that textfield should be removed.</description>
+ If any text field contains no tags or the none tag, the metadata tag for that textfield should be removed.
+ </description>
+ </param>
+
+ <param name="templateTitle" type="String" minlength="0" maxlength="100" mandatory="false" since="6.0">
+ <description>
+ The title of the new template that will be displayed.
+ How this will be displayed is dependent on the OEM design and implementation of the template.
+ </description>
</param>
</function>
diff --git a/src/components/policy/policy_external/include/policy/policy_table/enums.h b/src/components/policy/policy_external/include/policy/policy_table/enums.h
index 287aae8d7d..2cff10d8be 100644
--- a/src/components/policy/policy_external/include/policy/policy_table/enums.h
+++ b/src/components/policy/policy_external/include/policy/policy_table/enums.h
@@ -487,6 +487,11 @@ enum FunctionID {
CloseApplicationID = 58,
/**
+ * @brief ShowAppMenuID.
+ */
+ ShowAppMenuID = 59,
+
+ /**
* @brief OnHMIStatusID.
*/
OnHMIStatusID = 32768,
diff --git a/src/components/policy/policy_external/src/policy_table/enums.cc b/src/components/policy/policy_external/src/policy_table/enums.cc
index c5a9b29908..5628dd5729 100644
--- a/src/components/policy/policy_external/src/policy_table/enums.cc
+++ b/src/components/policy/policy_external/src/policy_table/enums.cc
@@ -1174,6 +1174,11 @@ bool EnumFromJsonString(const std::string& literal, FunctionID* result) {
return true;
}
+ if ("ShowAppMenu" == literal) {
+ *result = ShowAppMenuID;
+ return true;
+ }
+
if ("OnHMIStatus" == literal) {
*result = OnHMIStatusID;
return true;
diff --git a/src/components/policy/policy_regular/include/policy/policy_table/enums.h b/src/components/policy/policy_regular/include/policy/policy_table/enums.h
index 925b249e2e..840f429bf7 100644
--- a/src/components/policy/policy_regular/include/policy/policy_table/enums.h
+++ b/src/components/policy/policy_regular/include/policy/policy_table/enums.h
@@ -472,6 +472,11 @@ enum FunctionID {
CloseApplicationID = 58,
/**
+ * @brief ShowAppMenuID.
+ */
+ ShowAppMenuID = 59,
+
+ /**
* @brief OnHMIStatusID.
*/
OnHMIStatusID = 32768,
diff --git a/src/components/policy/policy_regular/src/policy_table/enums.cc b/src/components/policy/policy_regular/src/policy_table/enums.cc
index e62b9021c0..d753c22b49 100644
--- a/src/components/policy/policy_regular/src/policy_table/enums.cc
+++ b/src/components/policy/policy_regular/src/policy_table/enums.cc
@@ -865,6 +865,8 @@ bool IsValidEnum(FunctionID val) {
return true;
case CloseApplicationID:
return true;
+ case ShowAppMenuID:
+ return true;
case OnHMIStatusID:
return true;
case OnAppInterfaceUnregisteredID:
@@ -1034,6 +1036,8 @@ const char* EnumToJsonString(FunctionID val) {
return "CancelInteraction";
case CloseApplicationID:
return "CloseApplication";
+ case ShowAppMenuID:
+ return "ShowAppMenu";
case OnHMIStatusID:
return "OnHMIStatus";
case OnAppInterfaceUnregisteredID:
@@ -1373,6 +1377,11 @@ bool EnumFromJsonString(const std::string& literal, FunctionID* result) {
return true;
}
+ if ("ShowAppMenu" == literal) {
+ *result = ShowAppMenuID;
+ return true;
+ }
+
if ("OnHMIStatus" == literal) {
*result = OnHMIStatusID;
return true;