summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtem Nosach <ANosach@luxoft.com>2016-04-14 12:05:39 +0300
committerArtem Nosach <ANosach@luxoft.com>2016-04-14 12:05:39 +0300
commitd440eb53d27b9f4da225a21d2ef34afade7c0310 (patch)
tree30beec718739c93fbe48fb91e9fd36fd4028e0d8
parent784cbb6e839c9094385279d76e3b6e8c4550526b (diff)
parent194cd86d57f2d9ed9e3fc76f2da6cee8495b1b7e (diff)
downloadsdl_core-d440eb53d27b9f4da225a21d2ef34afade7c0310.tar.gz
Merge pull request #453 from OHerasym/feature/add_OnWayPointsChange_GetWayPoints_t
Feature/add_implementation_WayPoints
-rw-r--r--src/components/application_manager/CMakeLists.txt7
-rw-r--r--src/components/application_manager/include/application_manager/application_manager_impl.h38
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/navi_get_way_points_request.h71
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/navi_get_way_points_response.h72
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/navi_subscribe_way_points_request.h71
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/navi_subscribe_way_points_response.h72
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/navi_unsubscribe_way_points_request.h71
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/navi_unsubscribe_way_points_response.h71
-rw-r--r--src/components/application_manager/include/application_manager/commands/hmi/on_navi_way_point_change_notification.h72
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/get_way_points_request.h75
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/get_way_points_response.h70
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/on_way_point_change_notification.h68
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/subscribe_way_points_request.h75
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/subscribe_way_points_response.h70
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/unsubscribe_way_points_request.h72
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/unsubscribe_way_points_response.h70
-rw-r--r--src/components/application_manager/include/application_manager/message_helper.h6
-rw-r--r--src/components/application_manager/include/application_manager/resumption/resume_ctrl.h8
-rw-r--r--src/components/application_manager/include/application_manager/resumption/resumption_sql_queries.h3
-rw-r--r--src/components/application_manager/include/application_manager/smart_object_keys.h1
-rw-r--r--src/components/application_manager/src/application_manager_impl.cc48
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_get_way_points_request.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_get_way_points_response.cc58
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_subscribe_way_points_request.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_subscribe_way_points_response.cc58
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_unsubscribe_way_points_request.cc53
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_unsubscribe_way_points_response.cc59
-rw-r--r--src/components/application_manager/src/commands/hmi/on_navi_way_point_change_notification.cc59
-rw-r--r--src/components/application_manager/src/commands/mobile/get_way_points_request.cc56
-rw-r--r--src/components/application_manager/src/commands/mobile/get_way_points_response.cc24
-rw-r--r--src/components/application_manager/src/commands/mobile/on_way_point_change_notification.cc62
-rw-r--r--src/components/application_manager/src/commands/mobile/subscribe_way_points_request.cc75
-rw-r--r--src/components/application_manager/src/commands/mobile/subscribe_way_points_response.cc24
-rw-r--r--src/components/application_manager/src/commands/mobile/unsubscribe_way_points_request.cc67
-rw-r--r--src/components/application_manager/src/commands/mobile/unsubscribe_way_points_response.cc22
-rw-r--r--src/components/application_manager/src/hmi_command_factory.cc35
-rw-r--r--src/components/application_manager/src/message_helper/message_helper.cc12
-rw-r--r--src/components/application_manager/src/mobile_command_factory.cc38
-rw-r--r--src/components/application_manager/src/resumption/resume_ctrl.cc15
-rw-r--r--src/components/application_manager/src/resumption/resumption_data_db.cc68
-rw-r--r--src/components/application_manager/src/resumption/resumption_data_json.cc8
-rw-r--r--src/components/application_manager/src/resumption/resumption_sql_queries.cc20
-rw-r--r--src/components/application_manager/src/smart_object_keys.cc1
-rw-r--r--src/components/hmi_message_handler/src/dbus_message_adapter.cc1
-rw-r--r--src/components/hmi_message_handler/src/messagebroker_adapter.cc1
-rw-r--r--src/components/interfaces/HMI_API.xml74
-rw-r--r--src/components/interfaces/MOBILE_API.xml132
47 files changed, 2204 insertions, 35 deletions
diff --git a/src/components/application_manager/CMakeLists.txt b/src/components/application_manager/CMakeLists.txt
index 963899e809..abd3ba3490 100644
--- a/src/components/application_manager/CMakeLists.txt
+++ b/src/components/application_manager/CMakeLists.txt
@@ -139,6 +139,7 @@ file (GLOB MOBILE_COMMANDS_SOURCES
${AM_SOURCE_DIR}/src/commands/hmi/on_sdl_persistence_complete_notification.cc
${AM_SOURCE_DIR}/src/commands/hmi/on_exit_all_applications_notification.cc
${AM_SOURCE_DIR}/src/commands/hmi/on_exit_application_notification.cc
+ ${AM_SOURCE_DIR}/src/commands/hmi/on_navi_way_point_change_notification.cc
${AM_SOURCE_DIR}/src/commands/hmi/on_start_device_discovery.cc
${AM_SOURCE_DIR}/src/commands/hmi/close_popup_request.cc
${AM_SOURCE_DIR}/src/commands/hmi/close_popup_response.cc
@@ -237,6 +238,10 @@ file (GLOB MOBILE_COMMANDS_SOURCES
${AM_SOURCE_DIR}/src/commands/hmi/navi_show_constant_tbt_response.cc
${AM_SOURCE_DIR}/src/commands/hmi/navi_send_location_request.cc
${AM_SOURCE_DIR}/src/commands/hmi/navi_send_location_response.cc
+ ${AM_SOURCE_DIR}/src/commands/hmi/navi_subscribe_way_points_request.cc
+ ${AM_SOURCE_DIR}/src/commands/hmi/navi_subscribe_way_points_response.cc
+ ${AM_SOURCE_DIR}/src/commands/hmi/navi_unsubscribe_way_points_request.cc
+ ${AM_SOURCE_DIR}/src/commands/hmi/navi_unsubscribe_way_points_response.cc
${AM_SOURCE_DIR}/src/commands/hmi/on_ready_notification.cc
${AM_SOURCE_DIR}/src/commands/hmi/on_system_context_notification.cc
${AM_SOURCE_DIR}/src/commands/hmi/on_device_chosen_notification.cc
@@ -275,6 +280,8 @@ file (GLOB MOBILE_COMMANDS_SOURCES
${AM_SOURCE_DIR}/src/commands/hmi/navi_audio_start_stream_response.cc
${AM_SOURCE_DIR}/src/commands/hmi/navi_audio_stop_stream_request.cc
${AM_SOURCE_DIR}/src/commands/hmi/navi_audio_stop_stream_response.cc
+ ${AM_SOURCE_DIR}/src/commands/hmi/navi_get_way_points_request.cc
+ ${AM_SOURCE_DIR}/src/commands/hmi/navi_get_way_points_response.cc
${AM_SOURCE_DIR}/src/commands/hmi/on_system_request_notification.cc
${AM_SOURCE_DIR}/src/commands/hmi/on_put_file_notification.cc
${AM_SOURCE_DIR}/src/commands/hmi/on_resume_audio_source_notification.cc
diff --git a/src/components/application_manager/include/application_manager/application_manager_impl.h b/src/components/application_manager/include/application_manager/application_manager_impl.h
index 4f176fcc4d..2134fd3b18 100644
--- a/src/components/application_manager/include/application_manager/application_manager_impl.h
+++ b/src/components/application_manager/include/application_manager/application_manager_impl.h
@@ -281,6 +281,38 @@ class ApplicationManagerImpl
bool IsAppTypeExistsInFullOrLimited(ApplicationConstSharedPtr app) const;
/**
+ * @brief Checks if Application is subscribed for way points
+ * @param Application AppID
+ * @return true if Application is subscribed for way points
+ * otherwise false
+ */
+ bool IsAppSubscribedForWayPoints(const uint32_t app_id) const;
+
+ /**
+ * @brief Subscribe Application for way points
+ * @param Application AppID
+ */
+ void SubscribeAppForWayPoints(const uint32_t app_id);
+
+ /**
+ * @brief Unsubscribe Application for way points
+ * @param Application AppID
+ */
+ void UnsubscribeAppFromWayPoints(const uint32_t app_id);
+
+ /**
+ * @brief Is Any Application is subscribed for way points
+ * @return true if some app is subscribed otherwise false
+ */
+ bool IsAnyAppSubscribedForWayPoints() const;
+
+ /**
+ * @brief Get subscribed for way points
+ * @return reference to set of subscribed apps for way points
+ */
+ const std::set<int32_t> GetAppsSubscribedForWayPoints() const;
+
+ /**
* @brief Notifies all components interested in Vehicle Data update
* i.e. new value of odometer etc and returns list of applications
* subscribed for event.
@@ -1419,6 +1451,7 @@ typedef utils::SharedPtr<timer::Timer> TimerSPtr;
// Lock for applications list
mutable sync_primitives::Lock applications_list_lock_;
mutable sync_primitives::Lock apps_to_register_list_lock_;
+ mutable sync_primitives::Lock subscribed_way_points_apps_lock_;
/**
* @brief Map of correlation id and associated application id.
@@ -1426,6 +1459,11 @@ typedef utils::SharedPtr<timer::Timer> TimerSPtr;
std::map<const int32_t, const uint32_t> appID_list_;
/**
+ * @brief Set AppIDs of subscribed apps for way points
+ */
+ std::set<int32_t> subscribed_way_points_apps_list_;
+
+ /**
* @brief Map contains applications which
* will send TTS global properties to HMI after timeout
*/
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/navi_get_way_points_request.h b/src/components/application_manager/include/application_manager/commands/hmi/navi_get_way_points_request.h
new file mode 100644
index 0000000000..1209e2b4cb
--- /dev/null
+++ b/src/components/application_manager/include/application_manager/commands/hmi/navi_get_way_points_request.h
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2016, 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_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_GET_WAY_POINTS_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_GET_WAY_POINTS_REQUEST_H_
+
+#include "application_manager/commands/hmi/request_to_hmi.h"
+
+namespace application_manager {
+
+namespace commands {
+
+/**
+ * @brief NaviGetWayPointsRequest command class
+ **/
+class NaviGetWayPointsRequest
+ : public RequestToHMI {
+public:
+ /**
+ * @brief NaviGetWayPointsRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ explicit NaviGetWayPointsRequest(const MessageSharedPtr& message);
+ /**
+ * @brief NaviGetWayPointsRequest class destructor
+ **/
+ virtual ~NaviGetWayPointsRequest();
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run() OVERRIDE;
+
+private:
+ DISALLOW_COPY_AND_ASSIGN(NaviGetWayPointsRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_GET_WAY_POINTS_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/navi_get_way_points_response.h b/src/components/application_manager/include/application_manager/commands/hmi/navi_get_way_points_response.h
new file mode 100644
index 0000000000..3e6a011300
--- /dev/null
+++ b/src/components/application_manager/include/application_manager/commands/hmi/navi_get_way_points_response.h
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2016, 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_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_GET_WAY_POINTS_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_GET_WAY_POINTS_RESPONSE_H_
+
+#include "application_manager/commands/hmi/response_from_hmi.h"
+
+namespace application_manager {
+
+namespace commands {
+
+/**
+ * @brief NaviGetWaypoints command class
+ **/
+class NaviGetWayPointsResponse
+ : public ResponseFromHMI {
+ public:
+ /**
+ * @brief NaviGetWaypoints class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ explicit NaviGetWayPointsResponse(const MessageSharedPtr& message);
+
+ /**
+ * @brief NaviGetWaypoints class destructor
+ **/
+ virtual ~NaviGetWayPointsResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run() OVERRIDE;
+ private:
+ DISALLOW_COPY_AND_ASSIGN(NaviGetWayPointsResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_GET_WAY_POINTS_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/navi_subscribe_way_points_request.h b/src/components/application_manager/include/application_manager/commands/hmi/navi_subscribe_way_points_request.h
new file mode 100644
index 0000000000..cdaff0bdc6
--- /dev/null
+++ b/src/components/application_manager/include/application_manager/commands/hmi/navi_subscribe_way_points_request.h
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2016, 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_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_SUBSCRIBE_WAY_POINTS_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_SUBSCRIBE_WAY_POINTS_REQUEST_H_
+
+#include "application_manager/commands/hmi/request_to_hmi.h"
+
+namespace application_manager {
+
+namespace commands {
+
+/**
+ * @brief NaviSubscribeWayPointsRequest command class
+ **/
+class NaviSubscribeWayPointsRequest
+ : public RequestToHMI {
+public:
+ /**
+ * @brief NaviSubscribeWayPointsRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ explicit NaviSubscribeWayPointsRequest(const MessageSharedPtr& message);
+ /**
+ * @brief NaviSubscribeWayPointsRequest class destructor
+ **/
+ virtual ~NaviSubscribeWayPointsRequest();
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run() OVERRIDE;
+
+private:
+ DISALLOW_COPY_AND_ASSIGN(NaviSubscribeWayPointsRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_SUBSCRIBE_WAY_POINTS_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/navi_subscribe_way_points_response.h b/src/components/application_manager/include/application_manager/commands/hmi/navi_subscribe_way_points_response.h
new file mode 100644
index 0000000000..d6637c709c
--- /dev/null
+++ b/src/components/application_manager/include/application_manager/commands/hmi/navi_subscribe_way_points_response.h
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2016, 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_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_SUBSCRIBE_WAY_POINTS_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_SUBSCRIBE_WAY_POINTS_RESPONSE_H_
+
+#include "application_manager/commands/hmi/response_from_hmi.h"
+
+namespace application_manager {
+
+namespace commands {
+
+/**
+ * @brief NaviSubscribeWaypoints command class
+ **/
+class NaviSubscribeWayPointsResponse
+ : public ResponseFromHMI {
+ public:
+ /**
+ * @brief NaviSubscribeWaypoints class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ explicit NaviSubscribeWayPointsResponse(const MessageSharedPtr& message);
+
+ /**
+ * @brief NaviSubscribeWaypoints class destructor
+ **/
+ virtual ~NaviSubscribeWayPointsResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run() OVERRIDE;
+ private:
+ DISALLOW_COPY_AND_ASSIGN(NaviSubscribeWayPointsResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_SUBSCRIBE_WAY_POINTS_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/navi_unsubscribe_way_points_request.h b/src/components/application_manager/include/application_manager/commands/hmi/navi_unsubscribe_way_points_request.h
new file mode 100644
index 0000000000..3191fb375b
--- /dev/null
+++ b/src/components/application_manager/include/application_manager/commands/hmi/navi_unsubscribe_way_points_request.h
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2016, 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_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_UNSUBSCRIBE_WAY_POINTS_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_UNSUBSCRIBE_WAY_POINTS_REQUEST_H_
+
+#include "application_manager/commands/hmi/request_to_hmi.h"
+
+namespace application_manager {
+
+namespace commands {
+
+/**
+ * @brief NaviSubscribeWayPointsRequest command class
+ **/
+class NaviUnSubscribeWayPointsRequest
+ : public RequestToHMI {
+public:
+ /**
+ * @brief NaviUnSubscribeWayPointsRequest class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ explicit NaviUnSubscribeWayPointsRequest(const MessageSharedPtr& message);
+ /**
+ * @brief NaviUnSubscribeWayPointsRequest class destructor
+ **/
+ virtual ~NaviUnSubscribeWayPointsRequest();
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run() OVERRIDE;
+
+private:
+ DISALLOW_COPY_AND_ASSIGN(NaviUnSubscribeWayPointsRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_UNSUBSCRIBE_WAY_POINTS_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/navi_unsubscribe_way_points_response.h b/src/components/application_manager/include/application_manager/commands/hmi/navi_unsubscribe_way_points_response.h
new file mode 100644
index 0000000000..9ae12f7def
--- /dev/null
+++ b/src/components/application_manager/include/application_manager/commands/hmi/navi_unsubscribe_way_points_response.h
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2016, 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_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_UNSUBSCRIBE_WAY_POINTS_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_UNSUBSCRIBE_WAY_POINTS_RESPONSE_H_
+
+#include "application_manager/commands/hmi/response_from_hmi.h"
+
+namespace application_manager {
+
+namespace commands {
+
+/**
+ * @brief NaviUnSubscribeWaypoints command class
+ **/
+class NaviUnsubscribeWayPointsResponse
+ : public ResponseFromHMI {
+ public:
+ /**
+ * @brief NaviUnSubscribeWaypoints class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ explicit NaviUnsubscribeWayPointsResponse(const MessageSharedPtr& message);
+
+ /**
+ * @brief NaviUnSubscribeWaypoints class destructor
+ **/
+ virtual ~NaviUnsubscribeWayPointsResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run() OVERRIDE;
+ private:
+ DISALLOW_COPY_AND_ASSIGN(NaviUnsubscribeWayPointsResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_NAVI_UNSUBSCRIBE_WAY_POINTS_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/hmi/on_navi_way_point_change_notification.h b/src/components/application_manager/include/application_manager/commands/hmi/on_navi_way_point_change_notification.h
new file mode 100644
index 0000000000..85c46a5b5a
--- /dev/null
+++ b/src/components/application_manager/include/application_manager/commands/hmi/on_navi_way_point_change_notification.h
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2016, 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_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_NAVI_WAY_POINT_CHANGE_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_NAVI_WAY_POINT_CHANGE_NOTIFICATION_H_
+
+#include "application_manager/commands/hmi/notification_from_hmi.h"
+#include "application_manager/application_manager_impl.h"
+
+namespace application_manager {
+
+namespace commands {
+
+/**
+ * @brief OnNaviWayPointChangeNotification command class
+ **/
+class OnNaviWayPointChangeNotification : public NotificationFromHMI {
+ public:
+ /**
+ * @brief OnNaviWayPointChangeNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ explicit OnNaviWayPointChangeNotification(const MessageSharedPtr& message);
+
+ /**
+ * @brief OnNaviWayPointChangeNotification class destructor
+ **/
+ virtual ~OnNaviWayPointChangeNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run() OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnNaviWayPointChangeNotification);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_HMI_ON_NAVI_WAY_POINT_CHANGE_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/get_way_points_request.h b/src/components/application_manager/include/application_manager/commands/mobile/get_way_points_request.h
new file mode 100644
index 0000000000..559e92c597
--- /dev/null
+++ b/src/components/application_manager/include/application_manager/commands/mobile/get_way_points_request.h
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2016, 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_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_GET_WAY_POINTS_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_GET_WAY_POINTS_REQUEST_H_
+
+#include "application_manager/commands/command_request_impl.h"
+
+namespace application_manager {
+
+namespace commands {
+
+/**
+ * @brief GetWayPointsRequest command class
+ **/
+class GetWayPointsRequest : public CommandRequestImpl {
+public:
+ /**
+ * \brief GetWayPointsRequest class constructor
+ **/
+ explicit GetWayPointsRequest(const MessageSharedPtr& message);
+
+ /**
+ * \brief GetWayPointsRequest class destructor
+ **/
+ virtual ~GetWayPointsRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run() OVERRIDE;
+ /**
+ * @brief Interface method that is called whenever new event received
+ *
+ * @param event The received event
+ */
+ virtual void on_event(const event_engine::Event& event);
+private:
+ DISALLOW_COPY_AND_ASSIGN(GetWayPointsRequest);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_GET_WAY_POINTS_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/get_way_points_response.h b/src/components/application_manager/include/application_manager/commands/mobile/get_way_points_response.h
new file mode 100644
index 0000000000..e0e795059f
--- /dev/null
+++ b/src/components/application_manager/include/application_manager/commands/mobile/get_way_points_response.h
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2016, 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_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_GET_WAY_POINTS_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_GET_WAY_POINTS_RESPONSE_H_
+
+#include "application_manager/commands/command_response_impl.h"
+#include "utils/macro.h"
+
+namespace application_manager {
+
+namespace commands {
+
+/**
+ * @brief GetWayPointsResponse command class
+ **/
+class GetWayPointsResponse : public CommandResponseImpl {
+public:
+ /**
+ * \brief GetWayPointsResponse class constructor
+ **/
+ explicit GetWayPointsResponse(const MessageSharedPtr& message);
+
+ /**
+ * \brief GetWayPointsResponse class destructor
+ **/
+ virtual ~GetWayPointsResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run() OVERRIDE;
+private:
+ DISALLOW_COPY_AND_ASSIGN(GetWayPointsResponse);
+};
+
+} // namespace commands
+
+} // namespace application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_GET_WAY_POINTS_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/on_way_point_change_notification.h b/src/components/application_manager/include/application_manager/commands/mobile/on_way_point_change_notification.h
new file mode 100644
index 0000000000..16131621ea
--- /dev/null
+++ b/src/components/application_manager/include/application_manager/commands/mobile/on_way_point_change_notification.h
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2016, 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_INCLUDE_APPLICATION_MANAGER_COMMANDS_ON_WAY_POINT_CHANGE_NOTIFICATION_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ON_WAY_POINT_CHANGE_NOTIFICATION_H_
+
+#include "application_manager/commands/command_notification_impl.h"
+#include "utils/macro.h"
+
+namespace application_manager {
+
+namespace commands {
+
+class OnWayPointChangeNotification: public CommandNotificationImpl {
+ public:
+ /**
+ * @brief OnWayPointChangeNotification class constructor
+ *
+ * @param message Incoming SmartObject message
+ **/
+ explicit OnWayPointChangeNotification(const MessageSharedPtr& message);
+
+ /**
+ * @brief OnWayPointChangeNotification class destructor
+ **/
+ virtual ~OnWayPointChangeNotification();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run() OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OnWayPointChangeNotification);
+};
+
+} // namespace commands
+} // namespace application_manager
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_ON_WAY_POINT_CHANGE_NOTIFICATION_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/subscribe_way_points_request.h b/src/components/application_manager/include/application_manager/commands/mobile/subscribe_way_points_request.h
new file mode 100644
index 0000000000..5cc77e5bf5
--- /dev/null
+++ b/src/components/application_manager/include/application_manager/commands/mobile/subscribe_way_points_request.h
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2016, 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_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SUBSCRIBE_WAY_POINTS_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SUBSCRIBE_WAY_POINTS_REQUEST_H_
+
+#include "application_manager/commands/command_request_impl.h"
+
+namespace application_manager {
+
+namespace commands {
+
+/**
+ * @brief SubsribeWayPointsRequest command class
+ **/
+class SubscribeWayPointsRequest : public CommandRequestImpl {
+public:
+ /**
+ * \brief SubscribeWayPointsRequest class constructor
+ **/
+ explicit SubscribeWayPointsRequest(const MessageSharedPtr& message);
+
+ /**
+ * \brief SubscribeWayPointsRequest class destructor
+ **/
+ virtual ~SubscribeWayPointsRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run() OVERRIDE;
+ /**
+ * @brief Interface method that is called whenever new event received
+ *
+ * @param event The received event
+ */
+ virtual void on_event(const event_engine::Event& event);
+private:
+ DISALLOW_COPY_AND_ASSIGN(SubscribeWayPointsRequest);
+};
+
+} // commands
+
+} // application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SUBSCRIBE_WAY_POINTS_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/subscribe_way_points_response.h b/src/components/application_manager/include/application_manager/commands/mobile/subscribe_way_points_response.h
new file mode 100644
index 0000000000..25acf7262b
--- /dev/null
+++ b/src/components/application_manager/include/application_manager/commands/mobile/subscribe_way_points_response.h
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2016, 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_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SUBSCRIBE_WAY_POINTS_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SUBSCRIBE_WAY_POINTS_RESPONSE_H_
+
+#include "application_manager/commands/command_response_impl.h"
+#include "utils/macro.h"
+
+namespace application_manager {
+
+namespace commands {
+
+/**
+ * @brief SubscribeWayPointsResponse command class
+ **/
+class SubscribeWayPointsResponse : public CommandResponseImpl {
+public:
+ /**
+ * \brief SubscribeWayPointsResponse class constructor
+ **/
+ explicit SubscribeWayPointsResponse(const MessageSharedPtr& message);
+
+ /**
+ * \brief SubscribeWayPointsResponse class destructor
+ **/
+ virtual ~SubscribeWayPointsResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run() OVERRIDE;
+private:
+ DISALLOW_COPY_AND_ASSIGN(SubscribeWayPointsResponse);
+};
+
+} // commands
+
+} // application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_SUBSCRIBE_WAY_POINTS_RESPONSE_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/unsubscribe_way_points_request.h b/src/components/application_manager/include/application_manager/commands/mobile/unsubscribe_way_points_request.h
new file mode 100644
index 0000000000..c92c55e90d
--- /dev/null
+++ b/src/components/application_manager/include/application_manager/commands/mobile/unsubscribe_way_points_request.h
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2016, 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_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UNSUBSCRIBE_WAY_POINTS_REQUEST_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UNSUBSCRIBE_WAY_POINTS_REQUEST_H_
+
+#include "application_manager/commands/command_request_impl.h"
+
+namespace application_manager {
+
+namespace commands {
+
+class UnSubscribeWayPointsRequest : public CommandRequestImpl {
+public:
+ /**
+ * \brief UnSubscribeWayPointsRequest class constructor
+ **/
+ explicit UnSubscribeWayPointsRequest(const MessageSharedPtr& message);
+
+ /**
+ * \brief UnSubscribeWayPointsRequest class destructor
+ **/
+ virtual ~UnSubscribeWayPointsRequest();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run() OVERRIDE;
+ /**
+ * @brief Interface method that is called whenever new event received
+ *
+ * @param event The received event
+ */
+ virtual void on_event(const event_engine::Event& event);
+private:
+ DISALLOW_COPY_AND_ASSIGN(UnSubscribeWayPointsRequest);
+};
+
+} // commands
+
+} // application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UNSUBSCRIBE_WAY_POINTS_REQUEST_H_
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/unsubscribe_way_points_response.h b/src/components/application_manager/include/application_manager/commands/mobile/unsubscribe_way_points_response.h
new file mode 100644
index 0000000000..c5a32327a1
--- /dev/null
+++ b/src/components/application_manager/include/application_manager/commands/mobile/unsubscribe_way_points_response.h
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2016, 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_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UNSUBSCRIBE_WAY_POINTS_RESPONSE_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UNSUBSCRIBE_WAY_POINTS_RESPONSE_H_
+
+#include "application_manager/commands/command_response_impl.h"
+#include "utils/macro.h"
+
+namespace application_manager {
+
+namespace commands {
+
+/**
+ * @brief UnsubscribeWayPointsResponse command class
+ **/
+class UnsubscribeWayPointsResponse : public CommandResponseImpl {
+public:
+ /**
+ * \brief UnsubscribeWayPointsResponse class constructor
+ **/
+ explicit UnsubscribeWayPointsResponse(const MessageSharedPtr& message);
+
+ /**
+ * \brief UnsubscribeWayPointsResponse class destructor
+ **/
+ virtual ~UnsubscribeWayPointsResponse();
+
+ /**
+ * @brief Execute command
+ **/
+ virtual void Run() OVERRIDE;
+private:
+ DISALLOW_COPY_AND_ASSIGN(UnsubscribeWayPointsResponse);
+};
+
+} // commands
+
+} // application_manager
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_UNSUBSCRIBE_WAY_POINTS_RESPONSE_H_
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 64cd9485cf..0cc7ed3dba 100644
--- a/src/components/application_manager/include/application_manager/message_helper.h
+++ b/src/components/application_manager/include/application_manager/message_helper.h
@@ -480,6 +480,12 @@ class MessageHelper {
*/
static bool SendStopAudioPathThru();
+ /**
+ * @brief Sends UnsubscribeWayPoints request
+ * @return true if UnSubscribedWayPoints is send otherwise false
+ */
+ static bool SendUnsubscribedWayPoints();
+
static smart_objects::SmartObjectSPtr CreateNegativeResponse(
uint32_t connection_key,
int32_t function_id,
diff --git a/src/components/application_manager/include/application_manager/resumption/resume_ctrl.h b/src/components/application_manager/include/application_manager/resumption/resume_ctrl.h
index 5dda974ac0..a2896a43e8 100644
--- a/src/components/application_manager/include/application_manager/resumption/resume_ctrl.h
+++ b/src/components/application_manager/include/application_manager/resumption/resume_ctrl.h
@@ -345,6 +345,14 @@ class ResumeCtrl: public app_mngr::event_engine::EventObserver {
void AddSubscriptions(app_mngr::ApplicationSharedPtr application,
const smart_objects::SmartObject& saved_app);
+ /**
+ * @brief AddWayPointsSubscription allows to restore subscription
+ * for WayPoints
+ * @param application application which will be resumed
+ * @param saved_app application specific section from backup file
+ */
+ void AddWayPointsSubscription(app_mngr::ApplicationSharedPtr application,
+ const smart_objects::SmartObject& saved_app);
bool CheckIgnCycleRestrictions(const smart_objects::SmartObject& saved_app);
diff --git a/src/components/application_manager/include/application_manager/resumption/resumption_sql_queries.h b/src/components/application_manager/include/application_manager/resumption/resumption_sql_queries.h
index c3a17d868c..3f8ca3a416 100644
--- a/src/components/application_manager/include/application_manager/resumption/resumption_sql_queries.h
+++ b/src/components/application_manager/include/application_manager/resumption/resumption_sql_queries.h
@@ -130,6 +130,9 @@ extern const std::string kUpdateApplicationData;
extern const std::string kSelectDBVersion;
extern const std::string kUpdateDBVersion;
extern const std::string kUpdateGrammarID;
+extern const std::string kInsertSubscribedForWayPoints;
+extern const std::string kSelectSubscribedForWayPoints;
+extern const std::string kDeleteSubscribedForWayPoints;
} // namespace resumption
#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_RESUMPTION_RESUMPTION_SQL_QUERY_H_
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 ec725f05aa..60ddd38cd0 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
@@ -53,6 +53,7 @@ extern const char* info;
extern const char* app_id;
extern const char* hmi_app_id;
extern const char* device_id;
+extern const char* subscribed_for_way_points;
extern const char* url;
extern const char* urlScheme;
extern const char* packageName;
diff --git a/src/components/application_manager/src/application_manager_impl.cc b/src/components/application_manager/src/application_manager_impl.cc
index 9b6959bbc2..6a4192bcd6 100644
--- a/src/components/application_manager/src/application_manager_impl.cc
+++ b/src/components/application_manager/src/application_manager_impl.cc
@@ -2500,6 +2500,18 @@ void ApplicationManagerImpl::UnregisterApplication(
<< is_resuming
<< "; is_unexpected_disconnect = "
<< is_unexpected_disconnect);
+ size_t subscribed_for_way_points_app_count = 0;
+
+ // SDL sends UnsubscribeWayPoints only for last application
+ {
+ sync_primitives::AutoLock lock(subscribed_way_points_apps_lock_);
+ subscribed_for_way_points_app_count =
+ subscribed_way_points_apps_list_.size();
+ }
+ if (1 == subscribed_for_way_points_app_count) {
+ LOG4CXX_ERROR(logger_, "Send UnsubscribeWayPoints");
+ MessageHelper::SendUnsubscribedWayPoints();
+ }
NaviServiceStatusMap::iterator it = navi_service_status_.find(app_id);
if (navi_service_status_.end() != it) {
@@ -3457,6 +3469,42 @@ void ApplicationManagerImpl::ClearTTSGlobalPropertiesList() {
tts_global_properties_app_list_.clear();
}
+bool ApplicationManagerImpl::IsAppSubscribedForWayPoints(
+ const uint32_t app_id) const {
+ LOG4CXX_AUTO_TRACE(logger_);
+ sync_primitives::AutoLock lock(subscribed_way_points_apps_lock_);
+ if (subscribed_way_points_apps_list_.find(app_id) ==
+ subscribed_way_points_apps_list_.end()) {
+ return false;
+ }
+ return true;
+}
+
+void ApplicationManagerImpl::SubscribeAppForWayPoints(const uint32_t app_id) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ sync_primitives::AutoLock lock(subscribed_way_points_apps_lock_);
+ subscribed_way_points_apps_list_.insert(app_id);
+}
+
+void ApplicationManagerImpl::UnsubscribeAppFromWayPoints(const uint32_t app_id) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ sync_primitives::AutoLock lock(subscribed_way_points_apps_lock_);
+ subscribed_way_points_apps_list_.erase(app_id);
+}
+
+bool ApplicationManagerImpl::IsAnyAppSubscribedForWayPoints() const {
+ LOG4CXX_AUTO_TRACE(logger_);
+ sync_primitives::AutoLock lock(subscribed_way_points_apps_lock_);
+ return !subscribed_way_points_apps_list_.empty();
+}
+
+const std::set<int32_t> ApplicationManagerImpl::GetAppsSubscribedForWayPoints()
+ const {
+ LOG4CXX_AUTO_TRACE(logger_);
+ sync_primitives::AutoLock lock(subscribed_way_points_apps_lock_);
+ return subscribed_way_points_apps_list_;
+}
+
ApplicationManagerImpl::ApplicationListAccessor::~ApplicationListAccessor() {}
} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/navi_get_way_points_request.cc b/src/components/application_manager/src/commands/hmi/navi_get_way_points_request.cc
new file mode 100644
index 0000000000..2776b120e0
--- /dev/null
+++ b/src/components/application_manager/src/commands/hmi/navi_get_way_points_request.cc
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2016, 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 "application_manager/commands/hmi/navi_get_way_points_request.h"
+
+namespace application_manager {
+
+namespace commands {
+
+NaviGetWayPointsRequest::NaviGetWayPointsRequest(
+ const MessageSharedPtr& message)
+ : RequestToHMI(message) {}
+
+NaviGetWayPointsRequest::~NaviGetWayPointsRequest() {}
+
+void NaviGetWayPointsRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/navi_get_way_points_response.cc b/src/components/application_manager/src/commands/hmi/navi_get_way_points_response.cc
new file mode 100644
index 0000000000..2e1427f865
--- /dev/null
+++ b/src/components/application_manager/src/commands/hmi/navi_get_way_points_response.cc
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2016, 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 "application_manager/commands/hmi/navi_get_way_points_response.h"
+#include "application_manager/event_engine/event.h"
+#include "interfaces/HMI_API.h"
+
+namespace application_manager {
+
+namespace commands {
+
+NaviGetWayPointsResponse::NaviGetWayPointsResponse(
+ const MessageSharedPtr &message)
+ : ResponseFromHMI(message) {}
+
+NaviGetWayPointsResponse::~NaviGetWayPointsResponse() {}
+
+void NaviGetWayPointsResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ event_engine::Event event(
+ hmi_apis::FunctionID::Navigation_GetWayPoints);
+ event.set_smart_object(*message_);
+ event.raise();
+}
+
+} // namespace commands
+
+} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/navi_subscribe_way_points_request.cc b/src/components/application_manager/src/commands/hmi/navi_subscribe_way_points_request.cc
new file mode 100644
index 0000000000..9b98aaec43
--- /dev/null
+++ b/src/components/application_manager/src/commands/hmi/navi_subscribe_way_points_request.cc
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2016, 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 "application_manager/commands/hmi/navi_subscribe_way_points_request.h"
+
+namespace application_manager {
+
+namespace commands {
+
+NaviSubscribeWayPointsRequest::NaviSubscribeWayPointsRequest(
+ const MessageSharedPtr& message)
+ : RequestToHMI(message) {}
+
+NaviSubscribeWayPointsRequest::~NaviSubscribeWayPointsRequest() {}
+
+void NaviSubscribeWayPointsRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/navi_subscribe_way_points_response.cc b/src/components/application_manager/src/commands/hmi/navi_subscribe_way_points_response.cc
new file mode 100644
index 0000000000..50e7f3a04b
--- /dev/null
+++ b/src/components/application_manager/src/commands/hmi/navi_subscribe_way_points_response.cc
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2016, 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 "application_manager/commands/hmi/navi_subscribe_way_points_response.h"
+#include "application_manager/event_engine/event.h"
+#include "interfaces/HMI_API.h"
+
+namespace application_manager {
+
+namespace commands {
+
+NaviSubscribeWayPointsResponse::NaviSubscribeWayPointsResponse(
+ const MessageSharedPtr &message)
+ : ResponseFromHMI(message) {}
+
+NaviSubscribeWayPointsResponse::~NaviSubscribeWayPointsResponse() {}
+
+void NaviSubscribeWayPointsResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ event_engine::Event event(
+ hmi_apis::FunctionID::Navigation_SubscribeWayPoints);
+ event.set_smart_object(*message_);
+ event.raise();
+}
+
+} // namespace commands
+
+} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/navi_unsubscribe_way_points_request.cc b/src/components/application_manager/src/commands/hmi/navi_unsubscribe_way_points_request.cc
new file mode 100644
index 0000000000..d6c3e008b1
--- /dev/null
+++ b/src/components/application_manager/src/commands/hmi/navi_unsubscribe_way_points_request.cc
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2016, 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 "application_manager/commands/hmi/navi_unsubscribe_way_points_request.h"
+
+namespace application_manager {
+
+namespace commands {
+
+NaviUnSubscribeWayPointsRequest::NaviUnSubscribeWayPointsRequest(
+ const MessageSharedPtr& message)
+ : RequestToHMI(message) {}
+
+NaviUnSubscribeWayPointsRequest::~NaviUnSubscribeWayPointsRequest() {}
+
+void NaviUnSubscribeWayPointsRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ SendRequest();
+}
+
+} // namespace commands
+
+} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/navi_unsubscribe_way_points_response.cc b/src/components/application_manager/src/commands/hmi/navi_unsubscribe_way_points_response.cc
new file mode 100644
index 0000000000..a39b8a3a68
--- /dev/null
+++ b/src/components/application_manager/src/commands/hmi/navi_unsubscribe_way_points_response.cc
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2016, 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 "application_manager/commands/hmi/navi_unsubscribe_way_points_response.h"
+#include "application_manager/event_engine/event.h"
+#include "interfaces/MOBILE_API.h"
+#include "interfaces/HMI_API.h"
+
+namespace application_manager {
+
+namespace commands {
+
+NaviUnsubscribeWayPointsResponse::NaviUnsubscribeWayPointsResponse(
+ const MessageSharedPtr &message)
+ : ResponseFromHMI(message) {}
+
+NaviUnsubscribeWayPointsResponse::~NaviUnsubscribeWayPointsResponse() {}
+
+void NaviUnsubscribeWayPointsResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ event_engine::Event event(
+ hmi_apis::FunctionID::Navigation_UnsubscribeWayPoints);
+ event.set_smart_object(*message_);
+ event.raise();
+}
+
+} // namespace commands
+
+} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/hmi/on_navi_way_point_change_notification.cc b/src/components/application_manager/src/commands/hmi/on_navi_way_point_change_notification.cc
new file mode 100644
index 0000000000..cfcf6b605c
--- /dev/null
+++ b/src/components/application_manager/src/commands/hmi/on_navi_way_point_change_notification.cc
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2015, 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 "application_manager/commands/hmi/on_navi_way_point_change_notification.h"
+
+namespace application_manager {
+
+namespace commands {
+
+OnNaviWayPointChangeNotification::OnNaviWayPointChangeNotification(
+ const MessageSharedPtr& message)
+ : NotificationFromHMI(message) {
+}
+
+OnNaviWayPointChangeNotification::~OnNaviWayPointChangeNotification() {
+}
+
+void OnNaviWayPointChangeNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ // prepare SmartObject for mobile factory
+ (*message_)[strings::params][strings::function_id] =
+ static_cast<int32_t>(mobile_apis::FunctionID::OnWayPointChangeID);
+
+ SendNotificationToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/get_way_points_request.cc b/src/components/application_manager/src/commands/mobile/get_way_points_request.cc
new file mode 100644
index 0000000000..3c927959ca
--- /dev/null
+++ b/src/components/application_manager/src/commands/mobile/get_way_points_request.cc
@@ -0,0 +1,56 @@
+#include "application_manager/application_manager_impl.h"
+#include "application_manager/commands/mobile/get_way_points_request.h"
+
+namespace application_manager {
+
+namespace commands {
+
+GetWayPointsRequest::GetWayPointsRequest(const MessageSharedPtr& message)
+ :CommandRequestImpl(message){
+}
+
+GetWayPointsRequest::~GetWayPointsRequest() {}
+
+void GetWayPointsRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ ApplicationSharedPtr app =
+ application_manager::ApplicationManagerImpl::instance()->application(
+ connection_key());
+
+ if (!app) {
+ LOG4CXX_ERROR(logger_, "An application with connection key "
+ << connection_key() << " is not registered.");
+ SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
+ return;
+ }
+
+ SendHMIRequest(hmi_apis::FunctionID::Navigation_GetWayPoints, NULL, true);
+}
+
+void GetWayPointsRequest::on_event(const event_engine::Event& event) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ ApplicationSharedPtr app =
+ application_manager::ApplicationManagerImpl::instance()->application(
+ connection_key());
+ const smart_objects::SmartObject &message = event.smart_object();
+ switch(event.id()) {
+ case hmi_apis::FunctionID::Navigation_GetWayPoints: {
+ LOG4CXX_INFO(logger_, "Received Navigation_GetWayPoints event");
+ mobile_apis::Result::eType result_code =
+ GetMobileResultCode(static_cast<hmi_apis::Common_Result::eType>(
+ message[strings::params][hmi_response::code].asUInt()));
+ bool result = mobile_apis::Result::SUCCESS == result_code;
+ SendResponse(result, result_code, NULL, &(message[strings::msg_params]));
+ break;
+ }
+ default: {
+ LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ break;
+ }
+ }
+}
+
+} // namespace commands
+
+} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/get_way_points_response.cc b/src/components/application_manager/src/commands/mobile/get_way_points_response.cc
new file mode 100644
index 0000000000..a8cc574ca1
--- /dev/null
+++ b/src/components/application_manager/src/commands/mobile/get_way_points_response.cc
@@ -0,0 +1,24 @@
+#include "application_manager/application_manager_impl.h"
+#include "application_manager/commands/mobile/get_way_points_response.h"
+
+namespace application_manager {
+
+namespace commands {
+
+GetWayPointsResponse::GetWayPointsResponse(
+ const MessageSharedPtr &message)
+ : CommandResponseImpl(message) {
+}
+
+GetWayPointsResponse::~GetWayPointsResponse() {
+}
+
+void GetWayPointsResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/on_way_point_change_notification.cc b/src/components/application_manager/src/commands/mobile/on_way_point_change_notification.cc
new file mode 100644
index 0000000000..1df1ca80ce
--- /dev/null
+++ b/src/components/application_manager/src/commands/mobile/on_way_point_change_notification.cc
@@ -0,0 +1,62 @@
+/*
+
+ Copyright (c) 2013, 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 "application_manager/commands/mobile/on_way_point_change_notification.h"
+#include "application_manager/application_impl.h"
+#include "application_manager/application_manager_impl.h"
+
+namespace application_manager {
+namespace commands {
+
+OnWayPointChangeNotification::OnWayPointChangeNotification(
+ const MessageSharedPtr& message)
+ : CommandNotificationImpl(message) {}
+
+OnWayPointChangeNotification::~OnWayPointChangeNotification() {}
+
+void OnWayPointChangeNotification::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ std::set<int32_t> subscribed_for_way_points =
+ application_manager::ApplicationManagerImpl::instance()
+ ->GetAppsSubscribedForWayPoints();
+
+ for (std::set<int32_t>::const_iterator app_id =
+ subscribed_for_way_points.begin();
+ app_id != subscribed_for_way_points.end(); ++app_id) {
+ (*message_)[strings::params][strings::connection_key] = *app_id;
+ SendNotification();
+ }
+}
+} // namespace commands
+} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/subscribe_way_points_request.cc b/src/components/application_manager/src/commands/mobile/subscribe_way_points_request.cc
new file mode 100644
index 0000000000..913f97ddcf
--- /dev/null
+++ b/src/components/application_manager/src/commands/mobile/subscribe_way_points_request.cc
@@ -0,0 +1,75 @@
+#include "application_manager/application_manager_impl.h"
+#include "application_manager/commands/mobile/subscribe_way_points_request.h"
+
+namespace application_manager {
+
+namespace commands {
+
+SubscribeWayPointsRequest::SubscribeWayPointsRequest(
+ const MessageSharedPtr &message)
+ : CommandRequestImpl(message) {}
+
+SubscribeWayPointsRequest::~SubscribeWayPointsRequest() {}
+
+void SubscribeWayPointsRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ ApplicationSharedPtr app =
+ application_manager::ApplicationManagerImpl::instance()->application(
+ connection_key());
+
+ if (!app) {
+ LOG4CXX_ERROR(logger_, "An application with connection key "
+ << connection_key() << " is not registered.");
+ SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
+ return;
+ }
+
+ if (application_manager::ApplicationManagerImpl::instance()
+ ->IsAppSubscribedForWayPoints(app->app_id())) {
+ SendResponse(false, mobile_apis::Result::IGNORED);
+ return;
+ }
+
+ if (application_manager::ApplicationManagerImpl::instance()
+ ->IsAnyAppSubscribedForWayPoints()) {
+ application_manager::ApplicationManagerImpl::instance()
+ ->SubscribeAppForWayPoints(app->app_id());
+ SendResponse(true, mobile_apis::Result::SUCCESS);
+ return;
+ }
+
+ SendHMIRequest(hmi_apis::FunctionID::Navigation_SubscribeWayPoints, NULL,
+ true);
+}
+
+void SubscribeWayPointsRequest::on_event(const event_engine::Event &event) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ ApplicationSharedPtr app =
+ application_manager::ApplicationManagerImpl::instance()->application(
+ connection_key());
+ const smart_objects::SmartObject &message = event.smart_object();
+ switch (event.id()) {
+ case hmi_apis::FunctionID::Navigation_SubscribeWayPoints: {
+ LOG4CXX_INFO(logger_, "Received Navigation_SubscribeWayPoints event");
+ mobile_apis::Result::eType result_code =
+ GetMobileResultCode(static_cast<hmi_apis::Common_Result::eType>(
+ message[strings::params][hmi_response::code].asUInt()));
+ bool result = mobile_apis::Result::SUCCESS == result_code;
+ if (result) {
+ application_manager::ApplicationManagerImpl::instance()
+ ->SubscribeAppForWayPoints(app->app_id());
+ }
+ SendResponse(result, result_code, NULL, &(message[strings::msg_params]));
+ break;
+ }
+ default: {
+ LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ break;
+ }
+ }
+}
+
+} // namespace commands
+
+} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/subscribe_way_points_response.cc b/src/components/application_manager/src/commands/mobile/subscribe_way_points_response.cc
new file mode 100644
index 0000000000..bb0fc77c82
--- /dev/null
+++ b/src/components/application_manager/src/commands/mobile/subscribe_way_points_response.cc
@@ -0,0 +1,24 @@
+#include "application_manager/application_manager_impl.h"
+#include "application_manager/commands/mobile/subscribe_way_points_response.h"
+
+namespace application_manager {
+
+namespace commands {
+
+SubscribeWayPointsResponse::SubscribeWayPointsResponse(
+ const MessageSharedPtr &message)
+ : CommandResponseImpl(message) {
+}
+
+SubscribeWayPointsResponse::~SubscribeWayPointsResponse() {
+}
+
+void SubscribeWayPointsResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/unsubscribe_way_points_request.cc b/src/components/application_manager/src/commands/mobile/unsubscribe_way_points_request.cc
new file mode 100644
index 0000000000..c5c6f688b6
--- /dev/null
+++ b/src/components/application_manager/src/commands/mobile/unsubscribe_way_points_request.cc
@@ -0,0 +1,67 @@
+#include "application_manager/application_manager_impl.h"
+#include "application_manager/commands/mobile/unsubscribe_way_points_request.h"
+
+namespace application_manager {
+
+namespace commands {
+
+UnSubscribeWayPointsRequest::UnSubscribeWayPointsRequest(
+ const MessageSharedPtr &message)
+ : CommandRequestImpl(message) {}
+
+UnSubscribeWayPointsRequest::~UnSubscribeWayPointsRequest() {}
+
+void UnSubscribeWayPointsRequest::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ ApplicationSharedPtr app =
+ application_manager::ApplicationManagerImpl::instance()->application(
+ connection_key());
+
+ if (!app) {
+ LOG4CXX_ERROR(logger_, "An application with connection key "
+ << connection_key() << " is not registered.");
+ SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
+ return;
+ }
+
+ if (!application_manager::ApplicationManagerImpl::instance()
+ ->IsAppSubscribedForWayPoints(app->app_id())) {
+ SendResponse(false, mobile_apis::Result::IGNORED);
+ return;
+ }
+
+ SendHMIRequest(hmi_apis::FunctionID::Navigation_UnsubscribeWayPoints, NULL,
+ true);
+}
+
+void UnSubscribeWayPointsRequest::on_event(const event_engine::Event &event) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ ApplicationSharedPtr app =
+ application_manager::ApplicationManagerImpl::instance()->application(
+ connection_key());
+ const smart_objects::SmartObject &message = event.smart_object();
+ switch (event.id()) {
+ case hmi_apis::FunctionID::Navigation_UnsubscribeWayPoints: {
+ LOG4CXX_INFO(logger_, "Received Navigation_UnSubscribeWayPoints event");
+ mobile_apis::Result::eType result_code =
+ GetMobileResultCode(static_cast<hmi_apis::Common_Result::eType>(
+ message[strings::params][hmi_response::code].asUInt()));
+ bool result = mobile_apis::Result::SUCCESS == result_code;
+ if (result) {
+ application_manager::ApplicationManagerImpl::instance()
+ ->UnsubscribeAppFromWayPoints(app->app_id());
+ }
+ SendResponse(result, result_code, NULL, &(message[strings::msg_params]));
+ break;
+ }
+ default: {
+ LOG4CXX_ERROR(logger_, "Received unknown event" << event.id());
+ break;
+ }
+ }
+}
+
+} // namespace commands
+
+} // namespace application_manager
diff --git a/src/components/application_manager/src/commands/mobile/unsubscribe_way_points_response.cc b/src/components/application_manager/src/commands/mobile/unsubscribe_way_points_response.cc
new file mode 100644
index 0000000000..0d8250f0b6
--- /dev/null
+++ b/src/components/application_manager/src/commands/mobile/unsubscribe_way_points_response.cc
@@ -0,0 +1,22 @@
+#include "application_manager/application_manager_impl.h"
+#include "application_manager/commands/mobile/unsubscribe_way_points_response.h"
+
+namespace application_manager {
+
+namespace commands {
+
+UnsubscribeWayPointsResponse::UnsubscribeWayPointsResponse(
+ const MessageSharedPtr &message)
+ : CommandResponseImpl(message) {}
+
+UnsubscribeWayPointsResponse::~UnsubscribeWayPointsResponse() {}
+
+void UnsubscribeWayPointsResponse::Run() {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ ApplicationManagerImpl::instance()->SendMessageToMobile(message_);
+}
+
+} // namespace commands
+
+} // namespace application_manager
diff --git a/src/components/application_manager/src/hmi_command_factory.cc b/src/components/application_manager/src/hmi_command_factory.cc
index 2ec9de5970..e691538804 100644
--- a/src/components/application_manager/src/hmi_command_factory.cc
+++ b/src/components/application_manager/src/hmi_command_factory.cc
@@ -209,6 +209,12 @@
#include "application_manager/commands/hmi/navi_alert_maneuver_response.h"
#include "application_manager/commands/hmi/navi_update_turn_list_request.h"
#include "application_manager/commands/hmi/navi_update_turn_list_response.h"
+#include "application_manager/commands/hmi/navi_subscribe_way_points_request.h"
+#include "application_manager/commands/hmi/navi_subscribe_way_points_response.h"
+#include "application_manager/commands/hmi/navi_unsubscribe_way_points_request.h"
+#include "application_manager/commands/hmi/navi_unsubscribe_way_points_response.h"
+#include "application_manager/commands/hmi/navi_get_way_points_request.h"
+#include "application_manager/commands/hmi/navi_get_way_points_response.h"
#include "application_manager/commands/hmi/on_ready_notification.h"
#include "application_manager/commands/hmi/on_device_chosen_notification.h"
#include "application_manager/commands/hmi/on_file_removed_notification.h"
@@ -227,6 +233,7 @@
#include "application_manager/commands/hmi/on_vr_language_change_notification.h"
#include "application_manager/commands/hmi/on_tts_language_change_notification.h"
#include "application_manager/commands/hmi/on_navi_tbt_client_state_notification.h"
+#include "application_manager/commands/hmi/on_navi_way_point_change_notification.h"
#include "application_manager/commands/hmi/on_button_event_notification.h"
#include "application_manager/commands/hmi/on_button_press_notification.h"
#include "application_manager/commands/hmi/on_button_subscription_notification.h"
@@ -1041,6 +1048,14 @@ CommandSharedPtr HMICommandFactory::CreateCommand(
}
break;
}
+ case hmi_apis::FunctionID::Navigation_GetWayPoints: {
+ if (is_response) {
+ command.reset(new commands::NaviGetWayPointsResponse(message));
+ } else {
+ command.reset(new commands::NaviGetWayPointsRequest(message));
+ }
+ break;
+ }
case hmi_apis::FunctionID::Navigation_UpdateTurnList: {
if (is_response) {
command.reset(new commands::NaviUpdateTurnListResponse(message));
@@ -1057,6 +1072,22 @@ CommandSharedPtr HMICommandFactory::CreateCommand(
}
break;
}
+ case hmi_apis::FunctionID::Navigation_SubscribeWayPoints: {
+ if (is_response) {
+ command.reset(new commands::NaviSubscribeWayPointsResponse(message));
+ } else {
+ command.reset(new commands::NaviSubscribeWayPointsRequest(message));
+ }
+ break;
+ }
+ case hmi_apis::FunctionID::Navigation_UnsubscribeWayPoints: {
+ if (is_response) {
+ command.reset(new commands::NaviUnsubscribeWayPointsResponse(message));
+ } else {
+ command.reset(new commands::NaviUnSubscribeWayPointsRequest(message));
+ }
+ break;
+ }
case hmi_apis::FunctionID::Buttons_GetCapabilities: {
if (is_response) {
command.reset(new commands::ButtonGetCapabilitiesResponse(message));
@@ -2060,6 +2091,10 @@ CommandSharedPtr HMICommandFactory::CreateCommand(
}
break;
}
+ case hmi_apis::FunctionID::Navigation_OnWayPointChange: {
+ command.reset(new commands::OnNaviWayPointChangeNotification(message));
+ break;
+ }
}
return command;
diff --git a/src/components/application_manager/src/message_helper/message_helper.cc b/src/components/application_manager/src/message_helper/message_helper.cc
index 2eff8a0c96..78d47869e2 100644
--- a/src/components/application_manager/src/message_helper/message_helper.cc
+++ b/src/components/application_manager/src/message_helper/message_helper.cc
@@ -1759,6 +1759,18 @@ bool MessageHelper::SendStopAudioPathThru() {
return ApplicationManagerImpl::instance()->ManageHMICommand(result);
}
+bool MessageHelper::SendUnsubscribedWayPoints() {
+ LOG4CXX_INFO(logger_, "MessageHelper::SendUnsubscribedWayPoints");
+
+ smart_objects::SmartObjectSPtr result = CreateRequestObject();
+
+ smart_objects::SmartObject& request = *result;
+ request[strings::params][strings::function_id] =
+ hmi_apis::FunctionID::Navigation_UnsubscribeWayPoints;
+
+ return ApplicationManagerImpl::instance()->ManageHMICommand(result);
+}
+
void MessageHelper::SendPolicySnapshotNotification(
const unsigned int connection_key,
const std::vector<uint8_t>& policy_data,
diff --git a/src/components/application_manager/src/mobile_command_factory.cc b/src/components/application_manager/src/mobile_command_factory.cc
index dc665bc28b..0f1fcefe48 100644
--- a/src/components/application_manager/src/mobile_command_factory.cc
+++ b/src/components/application_manager/src/mobile_command_factory.cc
@@ -58,6 +58,8 @@
#include "application_manager/commands/mobile/get_dtcs_response.h"
#include "application_manager/commands/mobile/get_vehicle_data_request.h"
#include "application_manager/commands/mobile/get_vehicle_data_response.h"
+#include "application_manager/commands/mobile/get_way_points_request.h"
+#include "application_manager/commands/mobile/get_way_points_response.h"
#include "application_manager/commands/mobile/list_files_request.h"
#include "application_manager/commands/mobile/list_files_response.h"
#include "application_manager/commands/mobile/on_app_interface_unregistered_notification.h"
@@ -73,6 +75,7 @@
#include "application_manager/commands/mobile/on_tbt_client_state_notification.h"
#include "application_manager/commands/mobile/on_vehicle_data_notification.h"
#include "application_manager/commands/mobile/on_hash_change_notification.h"
+#include "application_manager/commands/mobile/on_way_point_change_notification.h"
#include "application_manager/commands/mobile/perform_audio_pass_thru_request.h"
#include "application_manager/commands/mobile/perform_audio_pass_thru_response.h"
#include "application_manager/commands/mobile/perform_interaction_request.h"
@@ -107,6 +110,10 @@
#include "application_manager/commands/mobile/subscribe_button_response.h"
#include "application_manager/commands/mobile/subscribe_vehicle_data_request.h"
#include "application_manager/commands/mobile/subscribe_vehicle_data_response.h"
+#include "application_manager/commands/mobile/subscribe_way_points_request.h"
+#include "application_manager/commands/mobile/subscribe_way_points_response.h"
+#include "application_manager/commands/mobile/unsubscribe_way_points_request.h"
+#include "application_manager/commands/mobile/unsubscribe_way_points_response.h"
#include "application_manager/commands/mobile/unregister_app_interface_request.h"
#include "application_manager/commands/mobile/unregister_app_interface_response.h"
#include "application_manager/commands/mobile/unsubscribe_button_request.h"
@@ -345,6 +352,15 @@ CommandSharedPtr MobileCommandFactory::CreateCommand(
}
break;
}
+ case mobile_apis::FunctionID::GetWayPointsID: {
+ if ((*message)[strings::params][strings::message_type]
+ == static_cast<int>(application_manager::MessageType::kResponse)) {
+ command = utils::MakeShared<commands::GetWayPointsResponse>(message);
+ } else {
+ command = utils::MakeShared<commands::GetWayPointsRequest>(message);
+ }
+ break;
+ }
case mobile_apis::FunctionID::SubscribeVehicleDataID: {
if ((*message)[strings::params][strings::message_type]
== static_cast<int>(application_manager::MessageType::kResponse)) {
@@ -363,6 +379,24 @@ CommandSharedPtr MobileCommandFactory::CreateCommand(
}
break;
}
+ case mobile_apis::FunctionID::SubscribeWayPointsID: {
+ if ((*message)[strings::params][strings::message_type]
+ == static_cast<int>(application_manager::MessageType::kResponse)) {
+ command = utils::MakeShared<commands::SubscribeWayPointsResponse>(message);
+ } else {
+ command = utils::MakeShared<commands::SubscribeWayPointsRequest>(message);
+ }
+ break;
+ }
+ case mobile_apis::FunctionID::UnsubscribeWayPointsID: {
+ if ((*message)[strings::params][strings::message_type]
+ == static_cast<int>(application_manager::MessageType::kResponse)) {
+ command = utils::MakeShared<commands::UnsubscribeWayPointsResponse>(message);
+ } else {
+ command = utils::MakeShared<commands::UnSubscribeWayPointsRequest>(message);
+ }
+ break;
+ }
case mobile_apis::FunctionID::ReadDIDID: {
if ((*message)[strings::params][strings::message_type]
== static_cast<int>(application_manager::MessageType::kResponse)) {
@@ -553,6 +587,10 @@ CommandSharedPtr MobileCommandFactory::CreateCommand(
command = utils::MakeShared<commands::mobile::OnHashChangeNotification>(message);
break;
}
+ case mobile_apis::FunctionID::OnWayPointChangeID: {
+ command = utils::MakeShared<commands::OnWayPointChangeNotification>(message);
+ break;
+ }
default: {
(*message)[strings::params][strings::function_id] =
static_cast<int32_t>(mobile_apis::FunctionID::GenericResponseID);
diff --git a/src/components/application_manager/src/resumption/resume_ctrl.cc b/src/components/application_manager/src/resumption/resume_ctrl.cc
index 0c98c89aba..333a3b7f01 100644
--- a/src/components/application_manager/src/resumption/resume_ctrl.cc
+++ b/src/components/application_manager/src/resumption/resume_ctrl.cc
@@ -455,6 +455,7 @@ bool ResumeCtrl::RestoreApplicationData(ApplicationSharedPtr application) {
AddChoicesets(application, saved_app);
SetGlobalProperties(application, saved_app);
AddSubscriptions(application, saved_app);
+ AddWayPointsSubscription(application, saved_app);
result = true;
} else {
LOG4CXX_WARN(logger_,
@@ -565,6 +566,20 @@ void ResumeCtrl::SetGlobalProperties(
}
}
+void ResumeCtrl::AddWayPointsSubscription(app_mngr::ApplicationSharedPtr application,
+ const smart_objects::SmartObject& saved_app) {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ if (saved_app.keyExists(strings::subscribed_for_way_points)) {
+ const smart_objects::SmartObject& subscribed_for_way_points_so =
+ saved_app[strings::subscribed_for_way_points];
+ if (true == subscribed_for_way_points_so.asBool()) {
+ application_manager::ApplicationManagerImpl::instance()->
+ SubscribeAppForWayPoints(application->app_id());
+ }
+ }
+}
+
void ResumeCtrl::AddSubscriptions(ApplicationSharedPtr application,
const smart_objects::SmartObject& saved_app) {
LOG4CXX_AUTO_TRACE(logger_);
diff --git a/src/components/application_manager/src/resumption/resumption_data_db.cc b/src/components/application_manager/src/resumption/resumption_data_db.cc
index 21c9eed3b4..6765bf8eff 100644
--- a/src/components/application_manager/src/resumption/resumption_data_db.cc
+++ b/src/components/application_manager/src/resumption/resumption_data_db.cc
@@ -32,6 +32,7 @@
#include <string>
#include <unistd.h>
+#include "application_manager/application_manager_impl.h"
#include "application_manager/resumption/resumption_data_db.h"
#include "application_manager/resumption/resumption_sql_queries.h"
#include "application_manager/smart_object_keys.h"
@@ -1404,21 +1405,23 @@ bool ResumptionDataDB::SelectDataFromAppTable(
LOG4CXX_WARN(logger_, "Problem with execution kSelectAppTable query");
return false;
}
- /* Position of data in "query" :
- field "appID" from table "application" = 0
- field "connection_key" from table "application" = 1
- field "grammarID" from table "application" = 2
- field "hashID" from table "application" = 3
- field "hmiAppID" from table "application" = 4
- field "hmiLevel" from table "application" = 5
- field "ign_off_count" from table "application" = 6
- field "suspend_count" from table "application" = 7
- field "timeStamp" from table "application" = 7
- field "deviceID" from table "application" = 8
- field "isMediaApplication" from table "application" = 9
- */
+
+ // Position of data in "query" :
+ // field "appID" from table "application" = 0
+ // field "connection_key" from table "application" = 1
+ // field "grammarID" from table "application" = 2
+ // field "hashID" from table "application" = 3
+ // field "hmiAppID" from table "application" = 4
+ // field "hmiLevel" from table "application" = 5
+ // field "ign_off_count" from table "application" = 6
+ // field "timeStamp" from table "application" = 7
+ // field "deviceID" from table "application" = 8
+ // field "isMediaApplication" from table "application" = 9
+ // field "IsSubscribedForWayPoints" from table "application" = 10
+ uint32_t connection_key = query.GetUInteger(1);
+
saved_app[strings::app_id] = query.GetString(0);
- saved_app[strings::connection_key] = query.GetUInteger(1);
+ saved_app[strings::connection_key] = connection_key;
uint32_t grammarID = query.GetUInteger(2);
if (grammarID) {
saved_app[strings::grammar_id] = grammarID;
@@ -1427,10 +1430,10 @@ bool ResumptionDataDB::SelectDataFromAppTable(
saved_app[strings::hmi_app_id] = query.GetUInteger(4);
saved_app[strings::hmi_level] = query.GetInteger(5);
saved_app[strings::ign_off_count] = query.GetInteger(6);
- saved_app[strings::suspend_count] = query.GetInteger(7);
- saved_app[strings::time_stamp] = query.GetUInteger(8);
- saved_app[strings::device_id] = query.GetString(9);
- saved_app[strings::is_media_application] = query.GetBoolean(10);
+ saved_app[strings::time_stamp] = query.GetUInteger(7);
+ saved_app[strings::device_id] = query.GetString(8);
+ saved_app[strings::is_media_application] = query.GetBoolean(9);
+ saved_app[strings::subscribed_for_way_points] = query.GetBoolean(10);
LOG4CXX_INFO(logger_,
"Data from application table was restored successfully");
@@ -2610,6 +2613,9 @@ bool ResumptionDataDB::InsertApplicationData(
const int64_t hmi_app_id = application.m_hmi_app_id;
const mobile_apis::HMILevel::eType hmi_level = application.m_hmi_level;
bool is_media_application = application.m_is_media_application;
+ bool is_subscribed_for_way_points =
+ app_mngr::ApplicationManagerImpl::instance()->IsAppSubscribedForWayPoints(
+ connection_key);
if (!query.Prepare(kInsertApplication)) {
LOG4CXX_WARN(logger_,
@@ -2625,28 +2631,28 @@ bool ResumptionDataDB::InsertApplicationData(
field "hmiAppID" from table "application" = 3
field "hmiLevel" from table "application" = 4
field "ign_off_count" from table "application" = 5
- field "suspend_count" from table "application" = 6
- field "timeStamp" from table "application" = 7
- field "idglobalProperties" from table "application" = 8
- field "isMediaApplication" from table "application" = 9
- field "appID" from table "application" = 10
- field "deviceID" from table "application" = 11*/
+ field "timeStamp" from table "application" = 6
+ field "idglobalProperties" from table "application" = 7
+ field "isMediaApplication" from table "application" = 8
+ field "appID" from table "application" = 9
+ field "deviceID" from table "application" = 10
+ field "isSubscribedForWayPoints" from table "application" = 11*/
query.Bind(0, connection_key);
query.Bind(1, grammar_id);
query.Bind(2, hash);
query.Bind(3, hmi_app_id);
query.Bind(4, static_cast<int32_t>(hmi_level));
query.Bind(5, 0);
- query.Bind(6, 0);
- query.Bind(7, time_stamp);
+ query.Bind(6, time_stamp);
if (global_properties_key) {
- query.Bind(8, global_properties_key);
+ query.Bind(7, global_properties_key);
} else {
- query.Bind(8);
+ query.Bind(7);
}
- query.Bind(9, is_media_application);
- query.Bind(10, policy_app_id);
- query.Bind(11, device_id);
+ query.Bind(8, is_media_application);
+ query.Bind(9, policy_app_id);
+ query.Bind(10, device_id);
+ query.Bind(11, is_subscribed_for_way_points);
if (!query.Exec()) {
LOG4CXX_WARN(logger_, "Problem with execution query");
diff --git a/src/components/application_manager/src/resumption/resumption_data_json.cc b/src/components/application_manager/src/resumption/resumption_data_json.cc
index 62297eb2de..becc9c19ce 100644
--- a/src/components/application_manager/src/resumption/resumption_data_json.cc
+++ b/src/components/application_manager/src/resumption/resumption_data_json.cc
@@ -30,6 +30,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+#include "application_manager/application_manager_impl.h"
#include "application_manager/resumption/resumption_data_json.h"
#include "smart_objects/smart_object.h"
#include "json/json.h"
@@ -62,6 +63,9 @@ void ResumptionDataJson::SaveApplication(
const uint32_t time_stamp = (uint32_t)time(NULL);
const std::string device_mac = application->mac_address();
const mobile_apis::HMILevel::eType hmi_level = application->hmi_level();
+ const bool is_subscribed_for_way_points =
+ app_mngr::ApplicationManagerImpl::instance()->
+ IsAppSubscribedForWayPoints(application->app_id());
sync_primitives::AutoLock autolock(resumption_lock_);
Json::Value tmp;
@@ -96,6 +100,8 @@ void ResumptionDataJson::SaveApplication(
GetApplicationFiles(application), tmp);
json_app[strings::application_files] = tmp;
json_app[strings::time_stamp] = time_stamp;
+ json_app[strings::subscribed_for_way_points] = is_subscribed_for_way_points;
+
LOG4CXX_DEBUG(logger_, "SaveApplication : " << json_app.toStyledString());
}
@@ -255,6 +261,7 @@ bool ResumptionDataJson::GetSavedApplication(
const std::string& policy_app_id,
const std::string& device_id,
smart_objects::SmartObject& saved_app) const {
+ using namespace app_mngr;
LOG4CXX_AUTO_TRACE(logger_);
sync_primitives::AutoLock autolock(resumption_lock_);
const int idx = GetObjectIndex(policy_app_id, device_id);
@@ -263,6 +270,7 @@ bool ResumptionDataJson::GetSavedApplication(
}
const Json::Value& json_saved_app = GetSavedApplications()[idx];
Formatters::CFormatterJsonBase::jsonValueToObj(json_saved_app, saved_app);
+
return true;
}
diff --git a/src/components/application_manager/src/resumption/resumption_sql_queries.cc b/src/components/application_manager/src/resumption/resumption_sql_queries.cc
index 67970fd0c8..5f318e6955 100644
--- a/src/components/application_manager/src/resumption/resumption_sql_queries.cc
+++ b/src/components/application_manager/src/resumption/resumption_sql_queries.cc
@@ -39,6 +39,9 @@ const std::string kCreateSchema =
" `idresumption` INTEGER PRIMARY KEY, "
" `last_ign_off_time` INTEGER "
" ); "
+ "CREATE TABLE IF NOT EXISTS `subscribedForWayPoints`( "
+ " `appID` INTEGER "
+ " ); "
"CREATE TABLE IF NOT EXISTS `image`( "
" `idimage` INTEGER PRIMARY KEY NOT NULL, "
" `imageType` INTEGER, "
@@ -220,6 +223,7 @@ const std::string kCreateSchema =
" `deviceID` TEXT, "
" `idglobalProperties` INTEGER, "
" `isMediaApplication` BOOL, "
+ " `isSubscribedForWayPoints` BOOL, "
" CONSTRAINT `fk_globalProperties` "
" FOREIGN KEY(`idglobalProperties`) "
" REFERENCES `globalProperties`(`idglobalProperties`) "
@@ -316,6 +320,7 @@ const std::string kDropSchema =
"DROP INDEX IF EXISTS "
"`message.fk_message_consumer_friendly_messages1_idx`; "
"DROP TABLE IF EXISTS `resumption`; "
+ "DROP TABLE IF EXISTS `subscribedForWayPoints`; "
"DROP TABLE IF EXISTS `image`; "
"DROP TABLE IF EXISTS `applicationChoiceSet`; "
"DROP TABLE IF EXISTS `file`; "
@@ -786,9 +791,9 @@ const std::string kInsertApplication =
"(`connection_key`, `grammarID`, `hashID`, "
"`hmiAppID`, `hmiLevel`, `ign_off_count`, "
"`timeStamp`, `idglobalProperties`, "
- "`isMediaApplication`, `appID`, `deviceID`) "
+ "`isMediaApplication`, `appID`, `deviceID`, `isSubscribedForWayPoints`) "
"VALUES "
- "(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);";
+ "(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);";
const std::string kSelectCountFiles =
"SELECT COUNT (`idfile`) "
@@ -941,7 +946,7 @@ const std::string kSelectTTSChunk =
const std::string kSelectAppTable =
"SELECT `appID`, `connection_key`, `grammarID`, `hashID`, `hmiAppID`, "
"`hmiLevel`, `ign_off_count`, "
- "`timeStamp`, `deviceID`, `isMediaApplication` "
+ "`timeStamp`, `deviceID`, `isMediaApplication`, `isSubscribedForWayPoints` "
"FROM `application` "
"WHERE `appID` = ? AND `deviceID` = ?;";
@@ -964,4 +969,13 @@ const std::string kUpdateGrammarID =
"SET `grammarID` = ? "
"WHERE `appID` = ? AND `deviceID` = ?;";
+const std::string kInsertSubscribedForWayPoints =
+ "INSERT INTO `subscribedForWayPoints` (`appID`) VALUES (?);";
+
+const std::string kSelectSubscribedForWayPoints =
+ "SELECT `appID` FROM `subscribedForWayPoints`;";
+
+const std::string kDeleteSubscribedForWayPoints =
+ "DELETE FROM `subscribedForWayPoints`;";
+
} // namespace resumption
diff --git a/src/components/application_manager/src/smart_object_keys.cc b/src/components/application_manager/src/smart_object_keys.cc
index 2ab41a50b8..d52f503536 100644
--- a/src/components/application_manager/src/smart_object_keys.cc
+++ b/src/components/application_manager/src/smart_object_keys.cc
@@ -20,6 +20,7 @@ const char* info = "info";
const char* app_id = "appID";
const char* hmi_app_id = "hmiAppID";
const char* device_id = "deviceID";
+const char* subscribed_for_way_points = "subscribed_for_way_points";
const char* url = "url";
const char* urlScheme = "urlScheme";
const char* packageName = "packageName";
diff --git a/src/components/hmi_message_handler/src/dbus_message_adapter.cc b/src/components/hmi_message_handler/src/dbus_message_adapter.cc
index 607cc64c51..7087eb6e13 100644
--- a/src/components/hmi_message_handler/src/dbus_message_adapter.cc
+++ b/src/components/hmi_message_handler/src/dbus_message_adapter.cc
@@ -145,6 +145,7 @@ void DBusMessageAdapter::SubscribeTo() {
DBusMessageController::SubscribeTo("VehicleInfo", "OnSteeringWheelAngle");
DBusMessageController::SubscribeTo("VehicleInfo", "OnMyKey");
DBusMessageController::SubscribeTo("Navigation", "OnTBTClientState");
+ DBusMessageController::SubscribeTo("Navigation", "OnWayPointChange");
DBusMessageController::SubscribeTo("SDL", "OnAllowSDLFunctionality");
DBusMessageController::SubscribeTo("SDL", "OnReceivedPolicyUpdate");
DBusMessageController::SubscribeTo("SDL", "OnPolicyUpdate");
diff --git a/src/components/hmi_message_handler/src/messagebroker_adapter.cc b/src/components/hmi_message_handler/src/messagebroker_adapter.cc
index 260682101c..bcdc4186a9 100644
--- a/src/components/hmi_message_handler/src/messagebroker_adapter.cc
+++ b/src/components/hmi_message_handler/src/messagebroker_adapter.cc
@@ -117,6 +117,7 @@ void MessageBrokerAdapter::SubscribeTo() {
MessageBrokerController::subscribeTo("TTS.OnLanguageChange");
MessageBrokerController::subscribeTo("VehicleInfo.OnVehicleData");
MessageBrokerController::subscribeTo("Navigation.OnTBTClientState");
+ MessageBrokerController::subscribeTo("Navigation.OnWayPointChange");
MessageBrokerController::subscribeTo("TTS.Started");
MessageBrokerController::subscribeTo("TTS.Stopped");
MessageBrokerController::subscribeTo("VR.Started");
diff --git a/src/components/interfaces/HMI_API.xml b/src/components/interfaces/HMI_API.xml
index 09897f0f3f..e428c46352 100644
--- a/src/components/interfaces/HMI_API.xml
+++ b/src/components/interfaces/HMI_API.xml
@@ -236,6 +236,21 @@
<element name="SYSTEM" />
</enum>
+ <enum name="WayPointType">
+ <description>Describes what kind of waypoint is requested/provided.</description>
+ <element name="ALL" />
+ <element name="DESTINATION" />
+ </enum>
+
+ <struct name="Coordinate">
+ <param name="latitudeDegrees" minvalue="-90" maxvalue="90" type="Double" mandatory="true">
+ <description>Latitude of the location.</description>
+ </param>
+ <param name="longitudeDegrees" minvalue="-180" maxvalue="180" type="Double" mandatory="true">
+ <description>Longitude of the location.</description>
+ </param>
+ </struct>
+
<enum name="LayoutMode">
<description>For touchscreen interactions, the mode of how the choices are presented.</description>
<element name="ICON_ONLY" />
@@ -2014,6 +2029,30 @@
</param>
</struct>
+ <struct name="LocationDetails">
+ <param name="coordinate" type="Coordinate" mandatory="false">
+ <description>Latitude/Longitude of the location.</description>
+ </param>
+ <param name="locationName" type="String" maxlength="500" mandatory="false">
+ <description>Name of location.</description>
+ </param>
+ <param name="addressLines" type="String" maxlength="500" minsize="0" maxsize="4" array="true" mandatory="false">
+ <description>Location address for display purposes only</description>
+ </param>
+ <param name="locationDescription" type="String" maxlength="500" mandatory="false">
+ <description>Description intended location / establishment (if applicable)</description>
+ </param>
+ <param name="phoneNumber" type="String" maxlength="500" mandatory="false">
+ <description>Phone number of location / establishment.</description>
+ </param>
+ <param name="locationImage" type="Image" mandatory="false">
+ <description>Image / icon of intended location.</description>
+ </param>
+ <param name="searchAddress" type="OASISAddress" mandatory="false">
+ <description>Address to be used by navigation engines for search</description>
+ </param>
+ </struct>
+
</interface>
<interface name="Buttons" version="1.0" date="2013-04-12">
@@ -3195,6 +3234,7 @@
</interface>
<interface name="Navigation" version="1.0" date="2013-05-22">
+
<function name="IsReady" messagetype="request">
<description>Method is invoked at system startup. Response must provide the information about presence of UI Navigation module and its readiness to cooperate with SDL.</description>
</function>
@@ -3357,6 +3397,40 @@
<description>If "true" - video data started. If "false" - video data stopped.</description>
</param>
</function>
+ <function name="GetWayPoints" functionID="GetWayPointsID" messagetype="request">
+ <description>Request for getting waypoint/destination data.</description>
+ <param name="wayPointType" type="Common.WayPointType" defvalue="ALL" mandatory="false">
+ <description>To request for either the destination only or for all waypoints including destination</description>
+ </param>
+ </function>
+ <function name="GetWayPoints" functionID="GetWayPointsID" messagetype="response">
+ <param name="appID" type="Integer" mandatory="true">
+ <description>ID of the application.</description>
+ </param>
+ <param name="wayPoints" type="Common.LocationDetails" mandatory="false" array="true" minsize="1" maxsize="10">
+ <description>See LocationDetails</description>
+ </param>
+ </function>
+ <function name="OnWayPointChange" functionID="OnWayPointChangeID" messagetype="notification">
+ <description>Notification which provides the entire LocationDetails when there is a change to any waypoints or destination.</description>
+ <param name="wayPoints" type="Common.LocationDetails" mandatory="true" array="true" minsize="1" maxsize="10">
+ <description>See LocationDetails</description>
+ </param>
+ </function>
+
+ <function name="SubscribeWayPoints" functionID="SubscribeWayPointsID" messagetype="request">
+ <description>To subscribe in getting changes for Waypoints/destinations</description>
+ </function>
+
+ <function name="SubscribeWayPoints" functionID="SubscribeWayPointsID" messagetype="response">
+ </function>
+
+ <function name="UnsubscribeWayPoints" functionID="UnsubscribeWayPointsID" messagetype="request">
+ <description>Request to unsubscribe from WayPoints and Destination</description>
+ </function>
+
+ <function name="UnsubscribeWayPoints" functionID="UnsubscribeWayPointsID" messagetype="response">
+ </function>
</interface>
diff --git a/src/components/interfaces/MOBILE_API.xml b/src/components/interfaces/MOBILE_API.xml
index 6c804460ec..4f5fbe37b3 100644
--- a/src/components/interfaces/MOBILE_API.xml
+++ b/src/components/interfaces/MOBILE_API.xml
@@ -2194,7 +2194,10 @@
<element name="DiagnosticMessageID" value="37" hexvalue="25" />
<element name="SystemRequestID" value="38" hexvalue="26" />
<element name="SendLocationID" value="39" hexvalue="27" />
- <element name="DialNumberID" value="40" hexvalue="28" />
+ <element name="DialNumberID" value="40" hexvalue="28" />
+ <element name="GetWayPointsID" value="41" hexvalue="29" />
+ <element name="SubscribeWayPointsID" value="42" hexvalue="2A"/>
+ <element name="UnsubscribeWayPointsID" value="43" hexvalue="2B"/>
<!--
Base Notifications
@@ -2216,6 +2219,7 @@
<element name="OnTouchEventID" value="32780" hexvalue="800C" />
<element name="OnSystemRequestID" value="32781" hexvalue="800D" />
<element name="OnHashChangeID" value="32782" hexvalue="800E" />
+ <element name="OnWayPointChangeID" value="32783" hexvalue="800F" />
<!--
Ford Specific Request / Response RPCs
@@ -2272,6 +2276,21 @@
</param>
</struct>
+ <enum name="WayPointType">
+ <description>Describes what kind of waypoint is requested/provided.</description>
+ <element name="ALL" />
+ <element name="DESTINATION" />
+ </enum>
+
+ <struct name="Coordinate">
+ <param name="latitudeDegrees" minvalue="-90" maxvalue="90" type="Double" mandatory="true">
+ <description>Latitude of the location.</description>
+ </param>
+ <param name="longitudeDegrees" minvalue="-180" maxvalue="180" type="Double" mandatory="true">
+ <description>Longitude of the location.</description>
+ </param>
+ </struct>
+
<struct name="OASISAddress">
<param name="countryName" minlength="0" maxlength="200" type="String" mandatory="false">
<description>Name of the country (localized)</description>
@@ -2301,6 +2320,30 @@
<description>Portion of thoroughfare e.g. house number</description>
</param>
</struct>
+
+ <struct name="LocationDetails">
+ <param name="coordinate" type="Coordinate" mandatory="false">
+ <description>Latitude/Longitude of the location.</description>
+ </param>
+ <param name="locationName" type="String" maxlength="500" mandatory="false">
+ <description>Name of location.</description>
+ </param>
+ <param name="addressLines" type="String" maxlength="500" minsize="0" maxsize="4" array="true" mandatory="false">
+ <description>Location address for display purposes only</description>
+ </param>
+ <param name="locationDescription" type="String" maxlength="500" mandatory="false">
+ <description>Description intended location / establishment (if applicable)</description>
+ </param>
+ <param name="phoneNumber" type="String" maxlength="500" mandatory="false">
+ <description>Phone number of location / establishment.</description>
+ </param>
+ <param name="locationImage" type="Image" mandatory="false">
+ <description>Image / icon of intended location.</description>
+ </param>
+ <param name="searchAddress" type="OASISAddress" mandatory="false">
+ <description>Address to be used by navigation engines for search</description>
+ </param>
+ </struct>
<!-- Requests/Responses -->
<function name="RegisterAppInterface" functionID="RegisterAppInterfaceID" messagetype="request">
@@ -5164,6 +5207,93 @@
</param>
</function>
+ <function name="SubscribeWayPoints" functionID="SubscribeWayPointsID" messagetype="request">
+ <description>To subscribe in getting changes for Waypoints/destinations</description>
+ </function>
+
+ <function name="SubscribeWayPoints" functionID="SubscribeWayPointsID" messagetype="response">
+ <param name="success" type="Boolean" platform="documentation">
+ <description> true, if successful; false, if failed </description>
+ </param>
+ <param name="resultCode" type="Result" platform="documentation">
+ <description>See Result</description>
+ <element name="SUCCESS"/>
+ <element name="INVALID_DATA"/>
+ <element name="TIMED_OUT"/>
+ <element name="GENERIC_ERROR"/>
+ <element name="REJECTED"/>
+ <element name="UNSUPPORTED_RESOURCE"/>
+ <element name="IGNORED"/>
+ <element name="IN_USE"/>
+ <element name="DISALLOWED"/>
+ </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="GetWayPoints" functionID="GetWayPointsID" messagetype="request">
+ <description>Request for getting waypoint/destination data.</description>
+ <param name="wayPointType" type="WayPointType" defvalue="ALL" mandatory="false">
+ <description>To request for either the destination only or for all waypoints including destination</description>
+ </param>
+ </function>
+
+ <function name="GetWayPoints" functionID="GetWayPointsID" messagetype="response">
+ <param name="success" type="Boolean" platform="documentation">
+ <description> true, if successful; false, if failed </description>
+ </param>
+ <param name="resultCode" type="Result" platform="documentation">
+ <description>See Result</description>
+ <element name="SUCCESS"/>
+ <element name="INVALID_DATA"/>
+ <element name="TIMED_OUT"/>
+ <element name="GENERIC_ERROR"/>
+ <element name="REJECTED"/>
+ <element name="UNSUPPORTED_RESOURCE"/>
+ <element name="IGNORED"/>
+ <element name="IN_USE"/>
+ <element name="DISALLOWED"/>
+ </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="UnsubscribeWayPoints" functionID="UnsubscribeWayPointsID" messagetype="request">
+ <description>Request to unsubscribe from WayPoints and Destination</description>
+ </function>
+
+ <function name="UnsubscribeWayPoints" functionID="UnsubscribeWayPointsID" messagetype="response">
+ <param name="success" type="Boolean" platform="documentation">
+ <description> true, if successful; false, if failed </description>
+ </param>
+ <param name="resultCode" type="Result" platform="documentation">
+ <description>See Result</description>
+ <element name="SUCCESS"/>
+ <element name="INVALID_DATA"/>
+ <element name="GENERIC_ERROR"/>
+ <element name="REJECTED"/>
+ <element name="UNSUPPORTED_RESOURCE"/>
+ <element name="IGNORED"/>
+ <element name="DISALLOWED"/>
+ </param>
+ <param name="info" type="String" maxlength="1000" mandatory="false" platform="documentation">
+ <description>Provides additional human readable info regarding the result.</description>
+ </param>
+ <param name="wayPoints" type="LocationDetails" mandatory="false" array="true" minsize="1" maxsize="10">
+ <description>See LocationDetails</description>
+ </param>
+ </function>
+
+ <function name="OnWayPointChange" functionID="OnWayPointChangeID" messagetype="notification">
+ <description>Notification which provides the entire LocationDetails when there is a change to any waypoints or destination.</description>
+ <param name="wayPoints" type="LocationDetails" mandatory="true" array="true" minsize="1" maxsize="10">
+ <description>See LocationDetails</description>
+ </param>
+ </function>
+
+
<!-- Deprecating - covered by OnSystemRequest
<function name="OnSyncPData" functionID="OnSyncPDataID" messagetype="notification" >
<description>