summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShobhit Adlakha <ShobhitAd@users.noreply.github.com>2019-07-30 16:38:35 -0400
committerGitHub <noreply@github.com>2019-07-30 16:38:35 -0400
commit7babc4b6218d71fbaa15bd15ccbee2ab15e2b69e (patch)
tree1a7877bd402bdb882e12b69775944242478dbc73
parent9a556df9e95a802dd25e97f4e778f6bc4715b48c (diff)
parent1786c0ddd0160faf9de9245c38dcfc581540406c (diff)
downloadsdl_core-7babc4b6218d71fbaa15bd15ccbee2ab15e2b69e.tar.gz
Merge pull request #2964 from smartdevicelink/feature/template_titles
Template Titles
-rw-r--r--src/components/application_manager/include/application_manager/smart_object_keys.h1
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_request.cc16
-rw-r--r--src/components/application_manager/src/smart_object_keys.cc1
-rw-r--r--src/components/interfaces/HMI_API.xml10
-rw-r--r--src/components/interfaces/MOBILE_API.xml19
5 files changed, 41 insertions, 6 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 02b3f1a051..2953e35645 100644
--- a/src/components/application_manager/include/application_manager/smart_object_keys.h
+++ b/src/components/application_manager/include/application_manager/smart_object_keys.h
@@ -92,6 +92,7 @@ extern const char* main_field_1;
extern const char* main_field_2;
extern const char* main_field_3;
extern const char* main_field_4;
+extern const char* template_title;
extern const char* metadata_tags;
extern const char* eta;
extern const char* time_to_destination;
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_request.cc
index 2bf1a81261..bf26cc62af 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_request.cc
@@ -218,6 +218,14 @@ void ShowRequest::Run() {
HandleMetadata(strings::main_field_4, main_field_4_index, msg_params);
}
+ if ((*message_)[strings::msg_params].keyExists(strings::template_title)) {
+ msg_params[hmi_request::show_strings][index][hmi_request::field_name] =
+ static_cast<int32_t>(hmi_apis::Common_TextFieldName::templateTitle);
+ msg_params[hmi_request::show_strings][index][hmi_request::field_text] =
+ (*message_)[strings::msg_params][strings::template_title];
+ ++index;
+ }
+
if ((*message_)[strings::msg_params].keyExists(strings::media_clock)) {
msg_params[hmi_request::show_strings][index][hmi_request::field_name] =
static_cast<int32_t>(hmi_apis::Common_TextFieldName::mediaClock);
@@ -355,6 +363,14 @@ bool ShowRequest::CheckStringsOfShowRequest() {
return false;
}
}
+ if ((*message_)[strings::msg_params].keyExists(strings::template_title)) {
+ str =
+ (*message_)[strings::msg_params][strings::template_title].asCharArray();
+ if (strlen(str) && !CheckSyntax(str)) {
+ LOG4CXX_ERROR(logger_, "Invalid templateTitle syntax check failed");
+ return false;
+ }
+ }
if ((*message_)[strings::msg_params].keyExists(strings::status_bar)) {
str = (*message_)[strings::msg_params][strings::status_bar].asCharArray();
if (strlen(str) && !CheckSyntax(str)) {
diff --git a/src/components/application_manager/src/smart_object_keys.cc b/src/components/application_manager/src/smart_object_keys.cc
index 602f1306d7..eaa7535385 100644
--- a/src/components/application_manager/src/smart_object_keys.cc
+++ b/src/components/application_manager/src/smart_object_keys.cc
@@ -59,6 +59,7 @@ const char* main_field_1 = "mainField1";
const char* main_field_2 = "mainField2";
const char* main_field_3 = "mainField3";
const char* main_field_4 = "mainField4";
+const char* template_title = "templateTitle";
const char* metadata_tags = "metadataTags";
const char* eta = "eta";
const char* time_to_destination = "timeToDestination";
diff --git a/src/components/interfaces/HMI_API.xml b/src/components/interfaces/HMI_API.xml
index decd50c0a1..d21718e66d 100644
--- a/src/components/interfaces/HMI_API.xml
+++ b/src/components/interfaces/HMI_API.xml
@@ -535,6 +535,9 @@
<element name="mediaTrack">
<description>The track field of NGN and GEN1.1 MFD displays. This field is only available for media applications; applies to "Show"</description>
</element>
+ <element name="templateTitle">
+ <description>The title of the new template that will be displayed; applies to "Show"</description>
+ </element>
<element name="alertText1">
<description>The first line of the alert text field; applies to "Alert"</description>
</element>
@@ -606,7 +609,7 @@
</element>
<element name="timeToDestination"/>
<!-- TO DO to be removed -->
- <element name="turnText"/>
+ <element name="turnText"/>
</enum>
<enum name="MetadataType">
@@ -4656,12 +4659,13 @@
</param>
</function>
<function name="Show" messagetype="request">
- <param name="showStrings" type="Common.TextFieldStruct" mandatory="true" array="true" minsize="0" maxsize="7">
- <description>Array of lines of show text fields. See TextFieldStruct. Uses mainField1, mainField2, mainField3, mainField4. If some field is not set, the corresponding text should stay unchanged. If field's text is empty "", the field must be cleared.
+ <param name="showStrings" type="Common.TextFieldStruct" mandatory="true" array="true" minsize="0" maxsize="8">
+ <description>Array of lines of show text fields. See TextFieldStruct. If some field is not set, the corresponding text should stay unchanged. If field's text is empty "", the field must be cleared.
mainField1: The text that should be displayed in a single or upper display line.
mainField2: The text that should be displayed on the second display line.
mainField3: The text that should be displayed on the second "page" first display line.
mainField4: The text that should be displayed on the second "page" second display line.
+ templateTitle: The title of the new template that will be displayed.
statusBar: statusBar.
mediaClock: Text value for MediaClock field.
mediaTrack: The text that should be displayed in the track field. This field is only valid for media applications on NGN type ACMs.
diff --git a/src/components/interfaces/MOBILE_API.xml b/src/components/interfaces/MOBILE_API.xml
index 78aadbeb73..0166f10f52 100644
--- a/src/components/interfaces/MOBILE_API.xml
+++ b/src/components/interfaces/MOBILE_API.xml
@@ -752,7 +752,11 @@
<element name="mediaTrack">
<description>The track field of NGN and GEN1.1 MFD displays. This field is only available for media applications; applies to "Show"</description>
</element>
-
+
+ <element name="templateTitle" since="6.0">
+ <description>The title of the new template that will be displayed; applies to "Show"</description>
+ </element>
+
<element name="alertText1">
<description>The first line of the alert text field; applies to "Alert"</description>
</element>
@@ -5102,9 +5106,18 @@
</param>
<param name="metadataTags" type="MetadataTags" mandatory="false" since="4.5">
- <description>App defined metadata information. See MetadataStruct. Uses mainField1, mainField2, mainField3, mainField4.
+ <description>
+ App defined metadata information. See MetadataStruct. Uses mainField1, mainField2, mainField3, mainField4.
If omitted on supported displays, the currently set metadata tags will not change.
- If any text field contains no tags or the none tag, the metadata tag for that textfield should be removed.</description>
+ If any text field contains no tags or the none tag, the metadata tag for that textfield should be removed.
+ </description>
+ </param>
+
+ <param name="templateTitle" type="String" minlength="0" maxlength="100" mandatory="false" since="6.0">
+ <description>
+ The title of the new template that will be displayed.
+ How this will be displayed is dependent on the OEM design and implementation of the template.
+ </description>
</param>
</function>