From 60c84b38b5d8146a0df1ece0e9fbd9a66a986da0 Mon Sep 17 00:00:00 2001 From: Jacob Keeler Date: Tue, 1 Nov 2016 15:12:20 -0400 Subject: Inclusion of PLAY_PAUSE as a subscribable button --- src/appMain/hmi_capabilities.json | 6 ++++++ .../src/commands/mobile/subscribe_button_request.cc | 3 ++- src/components/application_manager/src/hmi_capabilities_impl.cc | 2 ++ src/components/application_manager/test/hmi_capabilities.json | 6 ++++++ src/components/interfaces/HMI_API.xml | 1 + src/components/interfaces/Json_HMI_message_specification.txt | 7 +++++++ src/components/interfaces/MOBILE_API.xml | 1 + src/components/interfaces/QT_HMI_API.xml | 1 + src/components/utils/test/test_generator/MOBILE_API.xml | 1 + tools/intergen/test/test_hmi_interface.xml | 1 + 10 files changed, 28 insertions(+), 1 deletion(-) diff --git a/src/appMain/hmi_capabilities.json b/src/appMain/hmi_capabilities.json index 41cf1d3bee..11ac7ccccf 100755 --- a/src/appMain/hmi_capabilities.json +++ b/src/appMain/hmi_capabilities.json @@ -421,6 +421,12 @@ "longPressAvailable" :true, "upDownAvailable" :true }, + { + "name":"PLAY_PAUSE", + "shortPressAvailable":true, + "longPressAvailable" :true, + "upDownAvailable" :true + }, { "name":"SEEKLEFT", "shortPressAvailable":true, diff --git a/src/components/application_manager/src/commands/mobile/subscribe_button_request.cc b/src/components/application_manager/src/commands/mobile/subscribe_button_request.cc index eb6bbf545e..83121a91bd 100644 --- a/src/components/application_manager/src/commands/mobile/subscribe_button_request.cc +++ b/src/components/application_manager/src/commands/mobile/subscribe_button_request.cc @@ -95,7 +95,8 @@ void SubscribeButtonRequest::Run() { bool SubscribeButtonRequest::IsSubscriptionAllowed( ApplicationSharedPtr app, mobile_apis::ButtonName::eType btn_id) { if (!app->is_media_application() && - ((mobile_apis::ButtonName::SEEKLEFT == btn_id) || + ((mobile_apis::ButtonName::PLAY_PAUSE == btn_id) || + (mobile_apis::ButtonName::SEEKLEFT == btn_id) || (mobile_apis::ButtonName::SEEKRIGHT == btn_id) || (mobile_apis::ButtonName::TUNEUP == btn_id) || (mobile_apis::ButtonName::TUNEDOWN == btn_id))) { diff --git a/src/components/application_manager/src/hmi_capabilities_impl.cc b/src/components/application_manager/src/hmi_capabilities_impl.cc index c6fa321401..d7ffa10178 100644 --- a/src/components/application_manager/src/hmi_capabilities_impl.cc +++ b/src/components/application_manager/src/hmi_capabilities_impl.cc @@ -73,6 +73,8 @@ void InitCapabilities() { button_enum_name.insert( std::make_pair(std::string("OK"), hmi_apis::Common_ButtonName::OK)); + button_enum_name.insert(std::make_pair( + std::string("PLAY_PAUSE"), hmi_apis::Common_ButtonName::PLAY_PAUSE)); button_enum_name.insert(std::make_pair( std::string("SEEKLEFT"), hmi_apis::Common_ButtonName::SEEKLEFT)); button_enum_name.insert(std::make_pair( diff --git a/src/components/application_manager/test/hmi_capabilities.json b/src/components/application_manager/test/hmi_capabilities.json index c174dfcba4..89524971fe 100644 --- a/src/components/application_manager/test/hmi_capabilities.json +++ b/src/components/application_manager/test/hmi_capabilities.json @@ -421,6 +421,12 @@ "longPressAvailable" :true, "upDownAvailable" :true }, + { + "name":"PLAY_PAUSE", + "shortPressAvailable":true, + "longPressAvailable" :true, + "upDownAvailable" :true + }, { "name":"SEEKLEFT", "shortPressAvailable":true, diff --git a/src/components/interfaces/HMI_API.xml b/src/components/interfaces/HMI_API.xml index 022053f96a..be0b0ad874 100644 --- a/src/components/interfaces/HMI_API.xml +++ b/src/components/interfaces/HMI_API.xml @@ -76,6 +76,7 @@ Defines the hard (physical) and soft (touchscreen) buttons available from SYNC + diff --git a/src/components/interfaces/Json_HMI_message_specification.txt b/src/components/interfaces/Json_HMI_message_specification.txt index 9f5b20a3c4..f464f42351 100644 --- a/src/components/interfaces/Json_HMI_message_specification.txt +++ b/src/components/interfaces/Json_HMI_message_specification.txt @@ -265,6 +265,13 @@ Notifications: "upDownAvailable" : true }, + { + "longPressAvailable" : true, + "name" : "PLAY_PAUSE", + "shortPressAvailable" : true, + "upDownAvailable" : true + }, + { "longPressAvailable" : true, "name" : "SEEKLEFT", diff --git a/src/components/interfaces/MOBILE_API.xml b/src/components/interfaces/MOBILE_API.xml index d0326ce647..1fd13d489c 100644 --- a/src/components/interfaces/MOBILE_API.xml +++ b/src/components/interfaces/MOBILE_API.xml @@ -489,6 +489,7 @@ Defines the hard (physical) and soft (touchscreen) buttons available from SYNC + diff --git a/src/components/interfaces/QT_HMI_API.xml b/src/components/interfaces/QT_HMI_API.xml index 85a4d4143f..cc4bd62015 100644 --- a/src/components/interfaces/QT_HMI_API.xml +++ b/src/components/interfaces/QT_HMI_API.xml @@ -70,6 +70,7 @@ Defines the hard (physical) and soft (touchscreen) buttons available from SYNC + diff --git a/src/components/utils/test/test_generator/MOBILE_API.xml b/src/components/utils/test/test_generator/MOBILE_API.xml index f5d1c691b7..9642db692e 100644 --- a/src/components/utils/test/test_generator/MOBILE_API.xml +++ b/src/components/utils/test/test_generator/MOBILE_API.xml @@ -493,6 +493,7 @@ Defines the hard (physical) and soft (touchscreen) buttons available from SYNC + diff --git a/tools/intergen/test/test_hmi_interface.xml b/tools/intergen/test/test_hmi_interface.xml index e091909833..e85060abbb 100644 --- a/tools/intergen/test/test_hmi_interface.xml +++ b/tools/intergen/test/test_hmi_interface.xml @@ -66,6 +66,7 @@ Defines the hard (physical) and soft (touchscreen) buttons available from SYNC + -- cgit v1.2.1