summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJackLivio <jack@livio.io>2019-06-10 10:14:27 -0400
committerJackLivio <jack@livio.io>2019-06-10 10:14:27 -0400
commitac6cc0543688140411c093f0d28ac59c5d95640f (patch)
tree84df50f3eb19e7c39afd490eb6cb9124037887ab
parente62920f1446053cf7a354582a3f651a32faee642 (diff)
parent7a7c31b1ac64d6acd1796f5024472905b32ecf73 (diff)
downloadsdl_core-ac6cc0543688140411c093f0d28ac59c5d95640f.tar.gz
Merge branch 'develop' of github.com:smartdevicelink/sdl_core into feature/update_and_unpublish_app_service
-rw-r--r--src/components/application_manager/include/application_manager/smart_object_keys.h1
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/commands/hmi/as_get_app_service_data_request_from_hmi.h2
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/commands/hmi/on_as_app_service_data_notification.h2
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_data_request_from_hmi.cc13
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/on_as_app_service_data_notification.cc13
-rw-r--r--src/components/application_manager/src/smart_object_keys.cc1
-rw-r--r--src/components/interfaces/HMI_API.xml8
-rw-r--r--src/components/interfaces/MOBILE_API.xml7
8 files changed, 47 insertions, 0 deletions
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 65ec4f15c3..fc124f7558 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
@@ -322,6 +322,7 @@ extern const char* service_active;
extern const char* app_service_id;
extern const char* service_data;
extern const char* media_service_data;
+extern const char* media_image;
extern const char* weather_service_data;
extern const char* location;
extern const char* current_forecast;
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/commands/hmi/as_get_app_service_data_request_from_hmi.h b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/commands/hmi/as_get_app_service_data_request_from_hmi.h
index 531d1816e9..d9eb7528e4 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/commands/hmi/as_get_app_service_data_request_from_hmi.h
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/commands/hmi/as_get_app_service_data_request_from_hmi.h
@@ -92,6 +92,8 @@ class ASGetAppServiceDataRequestFromHMI
application_manager::ApplicationSharedPtr app);
void GetNavigationImagePaths(smart_objects::SmartObject& data,
application_manager::ApplicationSharedPtr app);
+ void GetMediaImagePaths(smart_objects::SmartObject& data,
+ application_manager::ApplicationSharedPtr app);
bool ValidateResponse(smart_objects::SmartObject& message_params);
DISALLOW_COPY_AND_ASSIGN(ASGetAppServiceDataRequestFromHMI);
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/commands/hmi/on_as_app_service_data_notification.h b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/commands/hmi/on_as_app_service_data_notification.h
index cff7c8e5b8..2dcd5ec251 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/commands/hmi/on_as_app_service_data_notification.h
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/commands/hmi/on_as_app_service_data_notification.h
@@ -70,6 +70,8 @@ class OnASAppServiceDataNotification
virtual void Run();
private:
+ void GetMediaImagePaths(smart_objects::SmartObject& data,
+ application_manager::ApplicationSharedPtr app);
void GetWeatherImagePaths(smart_objects::SmartObject& data,
application_manager::ApplicationSharedPtr app);
void GetNavigationImagePaths(smart_objects::SmartObject& data,
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_data_request_from_hmi.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_data_request_from_hmi.cc
index 2da8834b96..e03c0ad15a 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_data_request_from_hmi.cc
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_data_request_from_hmi.cc
@@ -161,6 +161,14 @@ void ASGetAppServiceDataRequestFromHMI::GetNavigationImagePaths(
}
}
+void ASGetAppServiceDataRequestFromHMI::GetMediaImagePaths(
+ smart_objects::SmartObject& data, ApplicationSharedPtr app) {
+ if (data.keyExists(strings::media_image)) {
+ MessageHelper::VerifyImage(
+ data[strings::media_image], app, application_manager_);
+ }
+}
+
bool ASGetAppServiceDataRequestFromHMI::ValidateResponse(
smart_objects::SmartObject& message_params) {
if (!message_params.keyExists(strings::service_data)) {
@@ -215,6 +223,11 @@ bool ASGetAppServiceDataRequestFromHMI::ValidateResponse(
GetNavigationImagePaths(service_data[strings::navigation_service_data],
app);
}
+
+ if (service_type_value == mobile_apis::AppServiceType::MEDIA &&
+ service_data.keyExists(strings::media_service_data)) {
+ GetMediaImagePaths(service_data[strings::media_service_data], app);
+ }
}
return true;
}
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/on_as_app_service_data_notification.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/on_as_app_service_data_notification.cc
index e90de23837..db1716ecb8 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/on_as_app_service_data_notification.cc
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/on_as_app_service_data_notification.cc
@@ -55,6 +55,14 @@ OnASAppServiceDataNotification::OnASAppServiceDataNotification(
OnASAppServiceDataNotification::~OnASAppServiceDataNotification() {}
+void OnASAppServiceDataNotification::GetMediaImagePaths(
+ smart_objects::SmartObject& data, ApplicationSharedPtr app) {
+ if (data.keyExists(strings::media_image)) {
+ MessageHelper::VerifyImage(
+ data[strings::media_image], app, application_manager_);
+ }
+}
+
void OnASAppServiceDataNotification::GetWeatherImagePaths(
smart_objects::SmartObject& data, ApplicationSharedPtr app) {
if (data[strings::location].keyExists(strings::location_image)) {
@@ -186,6 +194,11 @@ bool OnASAppServiceDataNotification::ValidateParams(
GetNavigationImagePaths(service_data[strings::navigation_service_data],
app);
}
+
+ if (service_type_value == mobile_apis::AppServiceType::MEDIA &&
+ service_data.keyExists(strings::media_service_data)) {
+ GetMediaImagePaths(service_data[strings::media_service_data], app);
+ }
}
return true;
}
diff --git a/src/components/application_manager/src/smart_object_keys.cc b/src/components/application_manager/src/smart_object_keys.cc
index 48e293a782..872103929f 100644
--- a/src/components/application_manager/src/smart_object_keys.cc
+++ b/src/components/application_manager/src/smart_object_keys.cc
@@ -289,6 +289,7 @@ const char* service_active = "serviceActive";
const char* app_service_id = "appServiceId";
const char* service_data = "serviceData";
const char* media_service_data = "mediaServiceData";
+const char* media_image = "mediaImage";
const char* weather_service_data = "weatherServiceData";
const char* location = "location";
const char* current_forecast = "currentForecast";
diff --git a/src/components/interfaces/HMI_API.xml b/src/components/interfaces/HMI_API.xml
index f6bf016c1d..5730039fdb 100644
--- a/src/components/interfaces/HMI_API.xml
+++ b/src/components/interfaces/HMI_API.xml
@@ -3484,6 +3484,14 @@
Audiobook: The total number of sections in the playback queue (e.g. the number of chapters in the book)
</description>
</param>
+
+ <param name="mediaImage" type="Common.Image" mandatory="false">
+ <description>
+ Music: The album art of the current track
+ Podcast: The podcast or chapter artwork of the current podcast episode
+ Audiobook: The book or chapter artwork of the current audiobook
+ </description>
+ </param>
</struct>
<struct name="WeatherServiceManifest">
diff --git a/src/components/interfaces/MOBILE_API.xml b/src/components/interfaces/MOBILE_API.xml
index 637c15f62f..28f8c41d35 100644
--- a/src/components/interfaces/MOBILE_API.xml
+++ b/src/components/interfaces/MOBILE_API.xml
@@ -3831,6 +3831,13 @@
Audiobook: The total number of sections in the playback queue (e.g. the number of chapters in the book)
</description>
</param>
+ <param name="mediaImage" type="Image" mandatory="false" since="5.2">
+ <description>
+ Music: The album art of the current track
+ Podcast: The podcast or chapter artwork of the current podcast episode
+ Audiobook: The book or chapter artwork of the current audiobook
+ </description>
+ </param>
</struct>
<struct name="WeatherServiceManifest" since="5.1">