summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Keeler <jacob.keeler@livioradio.com>2019-02-27 14:05:47 -0500
committerGitHub <noreply@github.com>2019-02-27 14:05:47 -0500
commitc6ef3733102cfb91d691b1b04487a0a1a2d3b1c3 (patch)
tree05994a814133a2a16adb592b241f2f0209ef74ee
parent601ab1906f58442a4353957f438a68dcf2648b30 (diff)
parentc8e6559e24781da9d20824f77ef5d231dfb60b54 (diff)
downloadsdl_core-feature/app_services_ini_behavior.tar.gz
Merge branch 'feature/base_app_services_implementation' into feature/app_services_ini_behaviorfeature/app_services_ini_behavior
-rw-r--r--src/components/application_manager/include/application_manager/app_service_manager.h23
-rw-r--r--src/components/application_manager/include/application_manager/message_helper.h3
-rw-r--r--src/components/application_manager/include/application_manager/smart_object_keys.h2
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_bc_system_capability_updated_notification.cc20
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_system_capability_request.cc14
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_system_capability_updated_notification.cc20
-rw-r--r--src/components/application_manager/src/app_service_manager.cc85
-rw-r--r--src/components/application_manager/src/message_helper/message_helper.cc24
-rw-r--r--src/components/application_manager/src/smart_object_keys.cc2
-rw-r--r--src/components/application_manager/test/include/application_manager/mock_message_helper.h3
-rw-r--r--src/components/application_manager/test/mock_message_helper.cc6
-rw-r--r--src/components/interfaces/HMI_API.xml107
-rw-r--r--src/components/interfaces/MOBILE_API.xml107
13 files changed, 376 insertions, 40 deletions
diff --git a/src/components/application_manager/include/application_manager/app_service_manager.h b/src/components/application_manager/include/application_manager/app_service_manager.h
index 9920b63bd7..5a345e60fb 100644
--- a/src/components/application_manager/include/application_manager/app_service_manager.h
+++ b/src/components/application_manager/include/application_manager/app_service_manager.h
@@ -98,14 +98,6 @@ class AppServiceManager {
/**
* @brief TODO
* @param service_id
- * @param service_published
- */
- void SetServicePublished(const std::string service_id,
- bool service_published);
-
- /**
- * @brief TODO
- * @param service_id
*/
bool SetDefaultService(const std::string service_id);
@@ -153,12 +145,25 @@ class AppServiceManager {
std::string DefaultServiceByType(std::string service_type);
+ /**
+ * @brief TODO
+ * @param service_id
+ * @param service_published
+ */
+ void SetServicePublished(const std::string service_id,
+ bool service_published);
+
+ /**
+ * @brief TODO
+ * @param out_params
+ */
+ bool UpdateNavigationCapabilities(smart_objects::SmartObject& out_params);
+
private:
ApplicationManager& app_manager_;
resumption::LastState& last_state_;
std::map<std::string, AppService> published_services_;
- void BroadcastAppServiceUpdate(smart_objects::SmartObject& msg_params);
void AppServiceUpdated(
const smart_objects::SmartObject& service_record,
const mobile_apis::ServiceUpdateReason::eType update_reason,
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 fd16d57740..8a8e50bf1c 100644
--- a/src/components/application_manager/include/application_manager/message_helper.h
+++ b/src/components/application_manager/include/application_manager/message_helper.h
@@ -881,6 +881,9 @@ class MessageHelper {
static smart_objects::SmartObject CreateAppServiceCapabilities(
std::vector<smart_objects::SmartObject>& all_services);
+ static void BroadcastCapabilityUpdate(smart_objects::SmartObject& msg_params,
+ ApplicationManager& app_mngr);
+
private:
/**
* @brief Allows to fill SO according to the current permissions.
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 5bafdaf4d0..78f336fb64 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
@@ -394,6 +394,8 @@ extern const char* const keyboard_layout_supported;
extern const char* const keypress_mode_supported;
extern const char* const limited_characters_list_supported;
extern const char* const auto_complete_text_supported;
+extern const char* const send_location_enabled;
+extern const char* const get_way_points_enabled;
extern const char* const entity_type;
extern const char* const entity_id;
extern const char* const status;
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_bc_system_capability_updated_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_bc_system_capability_updated_notification.cc
index d0c33e76d9..73ec1137a8 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_bc_system_capability_updated_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_bc_system_capability_updated_notification.cc
@@ -70,9 +70,21 @@ void OnBCSystemCapabilityUpdatedNotification::Run() {
[strings::system_capability_type].asInt());
switch (system_capability_type) {
case hmi_apis::Common_SystemCapabilityType::NAVIGATION: {
+ smart_objects::SmartObject nav_capability(smart_objects::SmartType_Map);
+ bool has_nav_capability = false;
if (hmi_capabilities_.navigation_capability()) {
+ has_nav_capability = true;
+ nav_capability = *hmi_capabilities_.navigation_capability();
+ }
+ has_nav_capability = application_manager_.GetAppServiceManager()
+ .UpdateNavigationCapabilities(nav_capability) ||
+ has_nav_capability;
+
+ if (has_nav_capability) {
msg_params[strings::system_capability][strings::navigation_capability] =
- *hmi_capabilities_.navigation_capability();
+ nav_capability;
+ } else {
+ return;
}
break;
}
@@ -80,6 +92,8 @@ void OnBCSystemCapabilityUpdatedNotification::Run() {
if (hmi_capabilities_.phone_capability()) {
msg_params[strings::system_capability][strings::phone_capability] =
*hmi_capabilities_.phone_capability();
+ } else {
+ return;
}
break;
}
@@ -90,6 +104,8 @@ void OnBCSystemCapabilityUpdatedNotification::Run() {
if (hmi_capabilities_.rc_capability()) {
msg_params[strings::system_capability][strings::rc_capability] =
*hmi_capabilities_.rc_capability();
+ } else {
+ return;
}
break;
}
@@ -98,6 +114,8 @@ void OnBCSystemCapabilityUpdatedNotification::Run() {
msg_params[strings::system_capability]
[strings::video_streaming_capability] =
*hmi_capabilities_.video_streaming_capability();
+ } else {
+ return;
}
break;
case hmi_apis::Common_SystemCapabilityType::APP_SERVICES: {
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_system_capability_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_system_capability_request.cc
index b551db0008..63a4416139 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_system_capability_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/get_system_capability_request.cc
@@ -83,10 +83,20 @@ void GetSystemCapabilityRequest::Run() {
switch (response_type) {
case mobile_apis::SystemCapabilityType::NAVIGATION: {
+ smart_objects::SmartObject nav_capability(smart_objects::SmartType_Map);
+ bool has_nav_capability = false;
if (hmi_capabilities.navigation_capability()) {
+ has_nav_capability = true;
+ auto nav_capability = *hmi_capabilities.navigation_capability();
+ }
+
+ has_nav_capability = application_manager_.GetAppServiceManager()
+ .UpdateNavigationCapabilities(nav_capability) ||
+ has_nav_capability;
+
+ if (has_nav_capability) {
response_params[strings::system_capability]
- [strings::navigation_capability] =
- *hmi_capabilities.navigation_capability();
+ [strings::navigation_capability] = nav_capability;
} else {
SendResponse(false, mobile_apis::Result::DATA_NOT_AVAILABLE);
return;
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_system_capability_updated_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_system_capability_updated_notification.cc
index 0745bc08dc..b5e3a73ee4 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_system_capability_updated_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_system_capability_updated_notification.cc
@@ -36,9 +36,21 @@ void OnSystemCapabilityUpdatedNotification::Run() {
switch (system_capability_type) {
case mobile_apis::SystemCapabilityType::NAVIGATION: {
+ smart_objects::SmartObject nav_capability(smart_objects::SmartType_Map);
+ bool has_nav_capability = false;
if (hmi_capabilities_.navigation_capability()) {
+ has_nav_capability = true;
+ nav_capability = *hmi_capabilities_.navigation_capability();
+ }
+ has_nav_capability = application_manager_.GetAppServiceManager()
+ .UpdateNavigationCapabilities(nav_capability) ||
+ has_nav_capability;
+
+ if (has_nav_capability) {
msg_params[strings::system_capability][strings::navigation_capability] =
- *hmi_capabilities_.navigation_capability();
+ nav_capability;
+ } else {
+ return;
}
break;
}
@@ -46,6 +58,8 @@ void OnSystemCapabilityUpdatedNotification::Run() {
if (hmi_capabilities_.phone_capability()) {
msg_params[strings::system_capability][strings::phone_capability] =
*hmi_capabilities_.phone_capability();
+ } else {
+ return;
}
break;
}
@@ -56,6 +70,8 @@ void OnSystemCapabilityUpdatedNotification::Run() {
if (hmi_capabilities_.rc_capability()) {
msg_params[strings::system_capability][strings::rc_capability] =
*hmi_capabilities_.rc_capability();
+ } else {
+ return;
}
break;
}
@@ -64,6 +80,8 @@ void OnSystemCapabilityUpdatedNotification::Run() {
msg_params[strings::system_capability]
[strings::video_streaming_capability] =
*hmi_capabilities_.video_streaming_capability();
+ } else {
+ return;
}
break;
case mobile_apis::SystemCapabilityType::APP_SERVICES: {
diff --git a/src/components/application_manager/src/app_service_manager.cc b/src/components/application_manager/src/app_service_manager.cc
index 11740f13a6..ed9120ad19 100644
--- a/src/components/application_manager/src/app_service_manager.cc
+++ b/src/components/application_manager/src/app_service_manager.cc
@@ -36,13 +36,13 @@
#include <iterator>
#include "application_manager/application.h"
-#include "application_manager/app_service_manager.h"
#include "application_manager/application_manager.h"
#include "application_manager/commands/command_impl.h"
#include "application_manager/message_helper.h"
#include "application_manager/smart_object_keys.h"
#include "encryption/hashing.h"
#include "resumption/last_state.h"
+#include "smart_objects/enum_schema_item.h"
#include "utils/logger.h"
#include "smart_objects/enum_schema_item.h"
@@ -108,9 +108,12 @@ smart_objects::SmartObject AppServiceManager::PublishAppService(
std::pair<std::string, AppService>(service_id, app_service));
smart_objects::SmartObject msg_params;
+ msg_params[strings::system_capability][strings::system_capability_type] =
+ mobile_apis::SystemCapabilityType::APP_SERVICES;
AppServiceUpdated(
service_record, mobile_apis::ServiceUpdateReason::PUBLISHED, msg_params);
- BroadcastAppServiceUpdate(msg_params);
+
+ MessageHelper::BroadcastCapabilityUpdate(msg_params, app_manager_);
// Activate the new service if it is the default for its service type, or if
// no service is active of its service type
@@ -135,6 +138,8 @@ bool AppServiceManager::UnpublishAppService(const std::string service_id) {
SetServicePublished(service_id, false);
smart_objects::SmartObject msg_params;
+ msg_params[strings::system_capability][strings::system_capability_type] =
+ mobile_apis::SystemCapabilityType::APP_SERVICES;
auto record = it->second.record;
if (record[strings::service_active].asBool()) {
@@ -152,7 +157,7 @@ bool AppServiceManager::UnpublishAppService(const std::string service_id) {
}
AppServiceUpdated(
it->second.record, mobile_apis::ServiceUpdateReason::REMOVED, msg_params);
- BroadcastAppServiceUpdate(msg_params);
+ MessageHelper::BroadcastCapabilityUpdate(msg_params, app_manager_);
published_services_.erase(it);
return true;
@@ -299,6 +304,8 @@ bool AppServiceManager::ActivateAppService(const std::string service_id) {
}
smart_objects::SmartObject msg_params;
+ msg_params[strings::system_capability][strings::system_capability_type] =
+ mobile_apis::SystemCapabilityType::APP_SERVICES;
const std::string service_type =
service[strings::service_manifest][strings::service_type].asString();
@@ -313,7 +320,18 @@ bool AppServiceManager::ActivateAppService(const std::string service_id) {
AppServiceUpdated(
service, mobile_apis::ServiceUpdateReason::ACTIVATED, msg_params);
- BroadcastAppServiceUpdate(msg_params);
+ MessageHelper::BroadcastCapabilityUpdate(msg_params, app_manager_);
+
+ std::string navi_service_type;
+ ns_smart_device_link::ns_smart_objects::
+ EnumConversionHelper<mobile_apis::AppServiceType::eType>::EnumToString(
+ mobile_apis::AppServiceType::NAVIGATION, &navi_service_type);
+ if (service_type == navi_service_type) {
+ smart_objects::SmartObject msg_params;
+ msg_params[strings::system_capability][strings::system_capability_type] =
+ mobile_apis::SystemCapabilityType::NAVIGATION;
+ MessageHelper::BroadcastCapabilityUpdate(msg_params, app_manager_);
+ }
return true;
}
@@ -347,7 +365,9 @@ bool AppServiceManager::DeactivateAppService(const std::string service_id) {
}
if (send_update) {
- BroadcastAppServiceUpdate(msg_params);
+ msg_params[strings::system_capability][strings::system_capability_type] =
+ mobile_apis::SystemCapabilityType::APP_SERVICES;
+ MessageHelper::BroadcastCapabilityUpdate(msg_params, app_manager_);
}
return true;
}
@@ -457,30 +477,41 @@ std::string AppServiceManager::GetPolicyAppID(AppService service) {
return kEmbeddedService;
}
-void AppServiceManager::BroadcastAppServiceUpdate(
- smart_objects::SmartObject& msg_params) {
+bool AppServiceManager::UpdateNavigationCapabilities(
+ smart_objects::SmartObject& out_params) {
LOG4CXX_AUTO_TRACE(logger_);
- smart_objects::SmartObject message(smart_objects::SmartType_Map);
+ std::string navi_service_type;
+ ns_smart_device_link::ns_smart_objects::
+ EnumConversionHelper<mobile_apis::AppServiceType::eType>::EnumToString(
+ mobile_apis::AppServiceType::NAVIGATION, &navi_service_type);
+ auto service = ActiveServiceByType(navi_service_type);
+ if (service.first.empty()) {
+ return false;
+ }
- msg_params[strings::system_capability][strings::system_capability_type] =
- mobile_apis::SystemCapabilityType::APP_SERVICES;
- message[strings::params][strings::message_type] = MessageType::kNotification;
- message[strings::msg_params] = msg_params;
-
- // Construct and send mobile notification
- message[strings::params][strings::function_id] =
- mobile_apis::FunctionID::OnSystemCapabilityUpdatedID;
- smart_objects::SmartObjectSPtr notification =
- std::make_shared<smart_objects::SmartObject>(message);
- app_manager_.GetRPCService().ManageMobileCommand(
- notification, commands::Command::CommandSource::SOURCE_SDL);
-
- // Construct and send HMI notification
- message[strings::params][strings::function_id] =
- hmi_apis::FunctionID::BasicCommunication_OnSystemCapabilityUpdated;
- smart_objects::SmartObjectSPtr hmi_notification =
- std::make_shared<smart_objects::SmartObject>(message);
- app_manager_.GetRPCService().ManageHMICommand(hmi_notification);
+ if (!out_params.keyExists(strings::send_location_enabled)) {
+ out_params[strings::send_location_enabled] = false;
+ }
+ if (!out_params.keyExists(strings::get_way_points_enabled)) {
+ out_params[strings::get_way_points_enabled] = false;
+ }
+
+ if (!service.second.record[strings::service_manifest].keyExists(
+ strings::handled_rpcs)) {
+ return true;
+ }
+
+ smart_objects::SmartObject& handled_rpcs =
+ service.second.record[strings::service_manifest][strings::handled_rpcs];
+ for (size_t i = 0; i < handled_rpcs.length(); ++i) {
+ if (handled_rpcs[i].asInt() == mobile_apis::FunctionID::SendLocationID) {
+ out_params[strings::send_location_enabled] = true;
+ } else if (handled_rpcs[i].asInt() ==
+ mobile_apis::FunctionID::GetWayPointsID) {
+ out_params[strings::get_way_points_enabled] = true;
+ }
+ }
+ return true;
}
void AppServiceManager::AppServiceUpdated(
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 124ec80312..7db2308c2c 100644
--- a/src/components/application_manager/src/message_helper/message_helper.cc
+++ b/src/components/application_manager/src/message_helper/message_helper.cc
@@ -327,6 +327,30 @@ smart_objects::SmartObjectSPtr MessageHelper::CreateMessageForHMI(
return message;
}
+void MessageHelper::BroadcastCapabilityUpdate(
+ smart_objects::SmartObject& msg_params, ApplicationManager& app_mngr) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ smart_objects::SmartObject message(smart_objects::SmartType_Map);
+
+ message[strings::params][strings::message_type] = MessageType::kNotification;
+ message[strings::msg_params] = msg_params;
+
+ // Construct and send mobile notification
+ message[strings::params][strings::function_id] =
+ mobile_apis::FunctionID::OnSystemCapabilityUpdatedID;
+ smart_objects::SmartObjectSPtr notification =
+ std::make_shared<smart_objects::SmartObject>(message);
+ app_mngr.GetRPCService().ManageMobileCommand(
+ notification, commands::Command::CommandSource::SOURCE_SDL);
+
+ // Construct and send HMI notification
+ message[strings::params][strings::function_id] =
+ hmi_apis::FunctionID::BasicCommunication_OnSystemCapabilityUpdated;
+ smart_objects::SmartObjectSPtr hmi_notification =
+ std::make_shared<smart_objects::SmartObject>(message);
+ app_mngr.GetRPCService().ManageHMICommand(hmi_notification);
+}
+
smart_objects::SmartObject MessageHelper::CreateAppServiceCapabilities(
std::vector<smart_objects::SmartObject>& all_services) {
smart_objects::SmartObject app_service_capabilities(
diff --git a/src/components/application_manager/src/smart_object_keys.cc b/src/components/application_manager/src/smart_object_keys.cc
index b59cfb8778..45829a4d2a 100644
--- a/src/components/application_manager/src/smart_object_keys.cc
+++ b/src/components/application_manager/src/smart_object_keys.cc
@@ -354,6 +354,8 @@ const char* const keypress_mode_supported = "keypressModeSupported";
const char* const limited_characters_list_supported =
"limitedCharactersListSupported";
const char* const auto_complete_text_supported = "autoCompleteTextSupported";
+const char* const send_location_enabled = "sendLocationEnabled";
+const char* const get_way_points_enabled = "getWayPointsEnabled";
const char* const entity_type = "entityType";
const char* const entity_id = "entityID";
const char* const status = "status";
diff --git a/src/components/application_manager/test/include/application_manager/mock_message_helper.h b/src/components/application_manager/test/include/application_manager/mock_message_helper.h
index 8d9cf9d7ef..7889774fae 100644
--- a/src/components/application_manager/test/include/application_manager/mock_message_helper.h
+++ b/src/components/application_manager/test/include/application_manager/mock_message_helper.h
@@ -311,6 +311,9 @@ class MockMessageHelper {
MOCK_METHOD1(CreateAppServiceCapabilities,
smart_objects::SmartObject(
std::vector<smart_objects::SmartObject>& all_services));
+ MOCK_METHOD2(BroadcastCapabilityUpdate,
+ void(smart_objects::SmartObject& msg_params,
+ ApplicationManager& app_mngr));
static MockMessageHelper* message_helper_mock();
};
diff --git a/src/components/application_manager/test/mock_message_helper.cc b/src/components/application_manager/test/mock_message_helper.cc
index 0fe82e0dfb..b3b3327ca9 100644
--- a/src/components/application_manager/test/mock_message_helper.cc
+++ b/src/components/application_manager/test/mock_message_helper.cc
@@ -577,4 +577,10 @@ smart_objects::SmartObject MessageHelper::CreateAppServiceCapabilities(
return MockMessageHelper::message_helper_mock()->CreateAppServiceCapabilities(
all_services);
}
+
+void MessageHelper::BroadcastCapabilityUpdate(
+ smart_objects::SmartObject& msg_params, ApplicationManager& app_mngr) {
+ MockMessageHelper::message_helper_mock()->BroadcastCapabilityUpdate(
+ msg_params, app_mngr);
+}
} // namespace application_manager
diff --git a/src/components/interfaces/HMI_API.xml b/src/components/interfaces/HMI_API.xml
index 7eead66618..5cd755ccef 100644
--- a/src/components/interfaces/HMI_API.xml
+++ b/src/components/interfaces/HMI_API.xml
@@ -3368,6 +3368,7 @@
<enum name="AppServiceType">
<element name="MEDIA"/>
<element name="WEATHER"/>
+ <element name="NAVIGATION"/>
</enum>
<struct name="MediaServiceManifest">
@@ -3556,6 +3557,110 @@
</param>
</struct>
+ <struct name="NavigationServiceManifest">
+ <param name="acceptsWayPoints" type="Boolean" mandatory="false">
+ <description> Informs the subscriber if this service can actually accept way points. </description>
+ </param>
+ </struct>
+
+ <enum name="NavigationAction">
+ <element name="TURN">
+ <description> Using this action plus a supplied direction can give the type of turn. </description>
+ </element>
+ <element name="EXIT"/>
+ <element name="STAY"/>
+ <element name="MERGE"/>
+ <element name="FERRY"/>
+ <element name="CAR_SHUTTLE_TRAIN"/>
+ <element name="WAYPOINT"/>
+ </enum>
+
+ <enum name="NavigationJunction">
+ <element name="REGULAR">
+ <description> A junction that represents a standard intersection with a single road crossing another. </description>
+ </element>
+ <element name="BIFURCATION">
+ <description> A junction where the road splits off into two paths; a fork in the road. </description>
+ </element>
+ <element name="MULTI_CARRIAGEWAY">
+ <description> A junction that has multiple intersections and paths. </description>
+ </element>
+ <element name="ROUNDABOUT">
+ <description> A junction where traffic moves in a single direction around a central, non-traversable point to reach one of the connecting roads. </description>
+ </element>
+ <element name="TRAVERSABLE_ROUNDABOUT">
+ <description> Similar to a roundabout, however the center of the roundabout is fully traversable. Also known as a mini-roundabout. </description>
+ </element>
+ <element name="JUGHANDLE">
+ <description> A junction where lefts diverge to the right, then curve to the left, converting a left turn to a crossing maneuver. </description>
+ </element>
+ <element name="ALL_WAY_YIELD">
+ <description> Multiple way intersection that allows traffic to flow based on priority; most commonly right of way and first in, first out. </description>
+ </element>
+ <element name="TURN_AROUND">
+ <description> A junction designated for traffic turn arounds. </description>
+ </element>
+ </enum>
+
+ <enum name="Direction">
+ <element name="LEFT"/>
+ <element name="RIGHT"/>
+ </enum>
+
+ <struct name="NavigationInstruction">
+ <param name="locationDetails" type="Common.LocationDetails" mandatory="true"/>
+
+ <param name="action" type="Common.NavigationAction" mandatory="true"/>
+
+ <param name="eta" type="Common.DateTime" mandatory="false"/>
+
+ <param name="bearing" type="Integer" minvalue="0" maxvalue="359" mandatory="false">
+ <description> The angle at which this instruction takes place. For example, 0 would mean straight, less than 45 is bearing right, greater than 135 is sharp right, between 45 and 135 is a regular right, and 180 is a U-Turn, etc. </description>
+ </param>
+
+ <param name="junctionType" type="Common.NavigationJunction" mandatory="false"/>
+
+ <param name="drivingSide" type="Common.Direction" mandatory="false">
+ <description> Used to infer which side of the road this instruction takes place. For a U-Turn (Action=Turn, direction=180) this will determine which direction the turn should take place. </description>
+ </param>
+
+ <param name="details" type="String" mandatory="false">
+ <description> This is a string representation of this instruction, used to display instructions to the users. This is not intended to be read aloud to the users, see the param prompt in NavigationServiceData for that. </description>
+ </param>
+
+ <param name="image" type="Common.Image" mandatory="false">
+ <description> An image representation of this instruction. </description>
+ </param>
+ </struct>
+
+ <struct name="NavigationServiceData">
+ <description> This data is related to what a navigation service would provide.</description>
+
+ <param name="timeStamp" type="Common.DateTime" mandatory="true">
+ <description> This is the timestamp of when the data was generated. This is to ensure any time or distance given in the data can accurately be adjusted if necessary. </description>
+ </param>
+
+ <param name="origin" type="Common.LocationDetails" mandatory="false"/>
+ <param name="destination" type="Common.LocationDetails" mandatory="false"/>
+ <param name="destinationETA" type="Common.DateTime" mandatory="false"/>
+
+ <param name="instructions" type="Common.NavigationInstruction" array="true" mandatory="false">
+ <description> This array should be ordered with all remaining instructions. The start of this array should always contain the next instruction.</description>
+ </param>
+
+ <param name="nextInstructionETA" type="Common.DateTime" mandatory="false"/>
+ <param name="nextInstructionDistance" type="Float" mandatory="false">
+ <description>The distance to this instruction from current location. This should only be updated ever .1 unit of distance. For more accuracy the consumer can use the GPS location of itself and the next instruction. </description>
+ </param>
+ <param name="nextInstructionDistanceScale" type="Float" mandatory="false">
+ <description>Distance till next maneuver (starting from) from previous maneuver.</description>
+ </param>
+
+ <param name="prompt" type="String" mandatory="false">
+ <description>This is a prompt message that should be conveyed to the user through either display or voice (TTS). This param will change often as it should represent the following: approaching instruction, post instruction, alerts that affect the current navigation session, etc.</description>
+ </param>
+ </struct>
+
<struct name="AppServiceManifest">
<description> This manifest contains all the information necessary for the service to be published, activated, and consumers able to interact with it </description>
@@ -3593,6 +3698,7 @@
<param name="mediaServiceManifest" type="Common.MediaServiceManifest" mandatory="false"/>
<param name="weatherServiceManifest" type="Common.WeatherServiceManifest" mandatory="false"/>
+ <param name="navigationServiceManifest" type="Common.NavigationServiceManifest" mandatory="false"/>
</struct>
<struct name="AppServiceRecord">
@@ -3623,6 +3729,7 @@
<param name="mediaServiceData" type="Common.MediaServiceData" mandatory="false"/>
<param name="weatherServiceData" type="Common.WeatherServiceData" mandatory="false"/>
+ <param name="navigationServiceData" type="Common.NavigationServiceData" mandatory="false"/>
</struct>
<enum name="ServiceUpdateReason">
diff --git a/src/components/interfaces/MOBILE_API.xml b/src/components/interfaces/MOBILE_API.xml
index 185b9d8773..39796f4e72 100644
--- a/src/components/interfaces/MOBILE_API.xml
+++ b/src/components/interfaces/MOBILE_API.xml
@@ -3702,6 +3702,7 @@
<enum name="AppServiceType" since="5.1">
<element name="MEDIA"/>
<element name="WEATHER"/>
+ <element name="NAVIGATION"/>
</enum>
<struct name="MediaServiceManifest" since="5.1">
@@ -3890,6 +3891,110 @@
</param>
</struct>
+ <struct name="NavigationServiceManifest">
+ <param name="acceptsWayPoints" type="Boolean" mandatory="false">
+ <description> Informs the subscriber if this service can actually accept way points. </description>
+ </param>
+ </struct>
+
+ <enum name="NavigationAction">
+ <element name="TURN">
+ <description> Using this action plus a supplied direction can give the type of turn. </description>
+ </element>
+ <element name="EXIT"/>
+ <element name="STAY"/>
+ <element name="MERGE"/>
+ <element name="FERRY"/>
+ <element name="CAR_SHUTTLE_TRAIN"/>
+ <element name="WAYPOINT"/>
+ </enum>
+
+ <enum name="NavigationJunction">
+ <element name="REGULAR">
+ <description> A junction that represents a standard intersection with a single road crossing another. </description>
+ </element>
+ <element name="BIFURCATION">
+ <description> A junction where the road splits off into two paths; a fork in the road. </description>
+ </element>
+ <element name="MULTI_CARRIAGEWAY">
+ <description> A junction that has multiple intersections and paths. </description>
+ </element>
+ <element name="ROUNDABOUT">
+ <description> A junction where traffic moves in a single direction around a central, non-traversable point to reach one of the connecting roads. </description>
+ </element>
+ <element name="TRAVERSABLE_ROUNDABOUT">
+ <description> Similar to a roundabout, however the center of the roundabout is fully traversable. Also known as a mini-roundabout. </description>
+ </element>
+ <element name="JUGHANDLE">
+ <description> A junction where lefts diverge to the right, then curve to the left, converting a left turn to a crossing maneuver. </description>
+ </element>
+ <element name="ALL_WAY_YIELD">
+ <description> Multiple way intersection that allows traffic to flow based on priority; most commonly right of way and first in, first out. </description>
+ </element>
+ <element name="TURN_AROUND">
+ <description> A junction designated for traffic turn arounds. </description>
+ </element>
+ </enum>
+
+ <enum name="Direction">
+ <element name="LEFT"/>
+ <element name="RIGHT"/>
+ </enum>
+
+ <struct name="NavigationInstruction">
+ <param name="locationDetails" type="LocationDetails" mandatory="true"/>
+
+ <param name="action" type="NavigationAction" mandatory="true"/>
+
+ <param name="eta" type="DateTime" mandatory="false"/>
+
+ <param name="bearing" type="Integer" minvalue="0" maxvalue="359" mandatory="false">
+ <description> The angle at which this instruction takes place. For example, 0 would mean straight, less than 45 is bearing right, greater than 135 is sharp right, between 45 and 135 is a regular right, and 180 is a U-Turn, etc. </description>
+ </param>
+
+ <param name="junctionType" type="NavigationJunction" mandatory="false"/>
+
+ <param name="drivingSide" type="Direction" mandatory="false">
+ <description> Used to infer which side of the road this instruction takes place. For a U-Turn (Action=Turn, direction=180) this will determine which direction the turn should take place. </description>
+ </param>
+
+ <param name="details" type="String" mandatory="false">
+ <description> This is a string representation of this instruction, used to display instructions to the users. This is not intended to be read aloud to the users, see the param prompt in NavigationServiceData for that. </description>
+ </param>
+
+ <param name="image" type="Image" mandatory="false">
+ <description> An image representation of this instruction. </description>
+ </param>
+ </struct>
+
+ <struct name="NavigationServiceData">
+ <description> This data is related to what a navigation service would provide.</description>
+
+ <param name="timeStamp" type="DateTime" mandatory="true">
+ <description> This is the timestamp of when the data was generated. This is to ensure any time or distance given in the data can accurately be adjusted if necessary. </description>
+ </param>
+
+ <param name="origin" type="LocationDetails" mandatory="false"/>
+ <param name="destination" type="LocationDetails" mandatory="false"/>
+ <param name="destinationETA" type="DateTime" mandatory="false"/>
+
+ <param name="instructions" type="NavigationInstruction" array="true" mandatory="false">
+ <description> This array should be ordered with all remaining instructions. The start of this array should always contain the next instruction.</description>
+ </param>
+
+ <param name="nextInstructionETA" type="DateTime" mandatory="false"/>
+ <param name="nextInstructionDistance" type="Float" mandatory="false">
+ <description>The distance to this instruction from current location. This should only be updated ever .1 unit of distance. For more accuracy the consumer can use the GPS location of itself and the next instruction. </description>
+ </param>
+ <param name="nextInstructionDistanceScale" type="Float" mandatory="false">
+ <description>Distance till next maneuver (starting from) from previous maneuver.</description>
+ </param>
+
+ <param name="prompt" type="String" mandatory="false">
+ <description>This is a prompt message that should be conveyed to the user through either display or voice (TTS). This param will change often as it should represent the following: approaching instruction, post instruction, alerts that affect the current navigation session, etc.</description>
+ </param>
+ </struct>
+
<struct name="AppServiceManifest" since="5.1">
<description> This manifest contains all the information necessary for the service to be published, activated, and consumers able to interact with it </description>
@@ -3927,6 +4032,7 @@
<param name="mediaServiceManifest" type="MediaServiceManifest" mandatory="false"/>
<param name="weatherServiceManifest" type="WeatherServiceManifest" mandatory="false"/>
+ <param name="navigationServiceManifest" type="NavigationServiceManifest" mandatory="false"/>
</struct>
<struct name="AppServiceRecord" since="5.1">
@@ -3957,6 +4063,7 @@
<param name="mediaServiceData" type="MediaServiceData" mandatory="false"/>
<param name="weatherServiceData" type="WeatherServiceData" mandatory="false"/>
+ <param name="navigationServiceData" type="NavigationServiceData" mandatory="false"/>
</struct>
<enum name="ServiceUpdateReason" since="5.1">