summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJacob Keeler <jacob.keeler@livioradio.com>2017-04-21 10:18:50 -0400
committerJacob Keeler <jacob.keeler@livioradio.com>2017-04-27 16:38:30 -0400
commit5ee81479a0dbead8c85e35ab967ba57b82a0b1d1 (patch)
tree7c81826fc4411d904878d504eb0cd77dde5043e4 /src
parent47df5db07a9de4f81f6ed82fc04fca55ad2e018c (diff)
downloadsdl_core-5ee81479a0dbead8c85e35ab967ba57b82a0b1d1.tar.gz
Add patch version to Mobile and HMI APIsfeature/API_patch_version
Diffstat (limited to 'src')
-rw-r--r--src/components/application_manager/include/application_manager/smart_object_keys.h1
-rw-r--r--src/components/application_manager/src/commands/mobile/register_app_interface_request.cc2
-rw-r--r--src/components/application_manager/src/smart_object_keys.cc1
-rw-r--r--src/components/formatters/test/meta_formatter_test.cc2
-rw-r--r--src/components/formatters/test/src/create_smartSchema.cc3
-rw-r--r--src/components/formatters/test/src/meta_formatter_test_helper.cc1
-rw-r--r--src/components/interfaces/HMI_API.xml18
-rw-r--r--src/components/interfaces/MOBILE_API.xml5
-rw-r--r--src/components/smart_objects/test/SmartObjectConvertionTime_test.cc2
-rw-r--r--src/components/utils/test/test_generator/generated_msg_version_test.cc40
10 files changed, 59 insertions, 16 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 c19b12fff6..e751f164d3 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
@@ -69,6 +69,7 @@ extern const char* success;
extern const char* sync_msg_version;
extern const char* major_version;
extern const char* minor_version;
+extern const char* patch_version;
extern const char* app_name;
extern const char* ngn_media_screen_app_name;
extern const char* vr_synonyms;
diff --git a/src/components/application_manager/src/commands/mobile/register_app_interface_request.cc b/src/components/application_manager/src/commands/mobile/register_app_interface_request.cc
index 1ac264ca4a..035a1666f6 100644
--- a/src/components/application_manager/src/commands/mobile/register_app_interface_request.cc
+++ b/src/components/application_manager/src/commands/mobile/register_app_interface_request.cc
@@ -496,6 +496,8 @@ void RegisterAppInterfaceRequest::SendRegisterAppInterfaceResponseToMobile() {
major_version; // From generated file interfaces/generated_msg_version.h
response_params[strings::sync_msg_version][strings::minor_version] =
minor_version; // From generated file interfaces/generated_msg_version.h
+ response_params[strings::sync_msg_version][strings::patch_version] =
+ patch_version; // From generated file interfaces/generated_msg_version.h
const smart_objects::SmartObject& msg_params =
(*message_)[strings::msg_params];
diff --git a/src/components/application_manager/src/smart_object_keys.cc b/src/components/application_manager/src/smart_object_keys.cc
index 279e967eda..a470bba4dc 100644
--- a/src/components/application_manager/src/smart_object_keys.cc
+++ b/src/components/application_manager/src/smart_object_keys.cc
@@ -36,6 +36,7 @@ const char* success = "success";
const char* sync_msg_version = "syncMsgVersion";
const char* major_version = "majorVersion";
const char* minor_version = "minorVersion";
+const char* patch_version = "patchVersion";
const char* app_name = "appName";
const char* ngn_media_screen_app_name = "ngnMediaScreenAppName";
const char* vr_synonyms = "vrSynonyms";
diff --git a/src/components/formatters/test/meta_formatter_test.cc b/src/components/formatters/test/meta_formatter_test.cc
index 27f5e70e8f..293f881c4a 100644
--- a/src/components/formatters/test/meta_formatter_test.cc
+++ b/src/components/formatters/test/meta_formatter_test.cc
@@ -138,6 +138,8 @@ TEST_F(CMetaFormatterTestHelper,
0, result_object[S_MSG_PARAMS]["syncMsgVersion"]["majorVersion"].asInt());
EXPECT_EQ(
0, result_object[S_MSG_PARAMS]["syncMsgVersion"]["minorVersion"].asInt());
+ EXPECT_EQ(
+ 0, result_object[S_MSG_PARAMS]["syncMsgVersion"]["patchVersion"].asInt());
// Uncomment code to print object in console
// std::string str;
diff --git a/src/components/formatters/test/src/create_smartSchema.cc b/src/components/formatters/test/src/create_smartSchema.cc
index 75663d4488..4ae692429c 100644
--- a/src/components/formatters/test/src/create_smartSchema.cc
+++ b/src/components/formatters/test/src/create_smartSchema.cc
@@ -338,6 +338,7 @@ CSmartSchema initSchemaForMetaFormatter() {
ISchemaItemPtr majorVersion_SchemaItem = TNumberSchemaItem<int>::create();
ISchemaItemPtr minorVersion_SchemaItem = TNumberSchemaItem<int>::create();
+ ISchemaItemPtr patchVersion_SchemaItem = TNumberSchemaItem<int>::create();
ISchemaItemPtr syncMsg_SchemaItem =
CStringSchemaItem::create(TSchemaItemParameter<size_t>(0),
@@ -355,6 +356,8 @@ CSmartSchema initSchemaForMetaFormatter() {
CObjectSchemaItem::SMember(majorVersion_SchemaItem, false);
schemaSyncMsgVersionMap["minorVersion"] =
CObjectSchemaItem::SMember(minorVersion_SchemaItem, false);
+ schemaSyncMsgVersionMap["patchVersion"] =
+ CObjectSchemaItem::SMember(patchVersion_SchemaItem, false);
;
// Map of parameters
diff --git a/src/components/formatters/test/src/meta_formatter_test_helper.cc b/src/components/formatters/test/src/meta_formatter_test_helper.cc
index a963c08a52..a29c1bceb3 100644
--- a/src/components/formatters/test/src/meta_formatter_test_helper.cc
+++ b/src/components/formatters/test/src/meta_formatter_test_helper.cc
@@ -193,6 +193,7 @@ void CMetaFormatterTestHelper::FillObjectWithDefaultValues(SmartObject& obj) {
obj[S_MSG_PARAMS]["syncMsgVersion"]["majorVersion"] = 0;
obj[S_MSG_PARAMS]["syncMsgVersion"]["minorVersion"] = 0;
+ obj[S_MSG_PARAMS]["syncMsgVersion"]["patchVersion"] = 0;
obj[S_MSG_PARAMS]["appName"] = "";
obj[S_MSG_PARAMS]["ngnMediaScreenAppName"] = "";
obj[S_MSG_PARAMS]["isMediaApplication"] = false;
diff --git a/src/components/interfaces/HMI_API.xml b/src/components/interfaces/HMI_API.xml
index 5b508b1861..c64bb5829b 100644
--- a/src/components/interfaces/HMI_API.xml
+++ b/src/components/interfaces/HMI_API.xml
@@ -34,7 +34,7 @@
<interfaces name="SmartDeviceLink HMI API">
-<interface name="Common" version="1.5" date="2017-03-29">
+<interface name="Common" version="1.6.0" date="2017-04-27">
<enum name="Result">
<element name="SUCCESS" value="0"/>
@@ -2066,7 +2066,7 @@
</interface>
-<interface name="Buttons" version="1.1" date="2016-08-18">
+<interface name="Buttons" version="1.2.0" date="2017-04-27">
<function name="GetCapabilities" messagetype="request">
<description>Method is invoked at system start-up. SDL requests the information about all supported hardware buttons and their capabilities</description>
</function>
@@ -2133,7 +2133,7 @@
</function>
</interface>
-<interface name="BasicCommunication" version="1.1" date="2016-12-01">
+<interface name="BasicCommunication" version="1.2.0" date="2017-04-27">
<function name="OnReady" messagetype="notification">
<description>HMI must notify SDL about its readiness to start communication. In fact, this has to be the first message between SDL and HMI.</description>
</function>
@@ -2464,7 +2464,7 @@
</function>
</interface>
-<interface name="VR" version="1.0" date="2013-04-17">
+<interface name="VR" version="1.1.0" date="2017-04-27">
<function name="IsReady" messagetype="request">
<description>Method is invoked at system startup. Response provides information about presence of VR module and its readiness to cooperate with SDL.</description>
</function>
@@ -2613,7 +2613,7 @@
</function>
</interface>
-<interface name="TTS" version="1.0" date="2013-04-18">
+<interface name="TTS" version="1.1.0" date="2017-04-27">
<description>RPCs for communication between TTS and SDL.</description>
<function name="GetCapabilities" messagetype="request">
<description>Method is invoked at system start-up. SDL requests the information about all supported hardware and their capabilities</description>
@@ -2739,7 +2739,7 @@
</function>
</interface>
-<interface name="UI" version="1.0" date="2013-04-16">
+<interface name="UI" version="1.1.0" date="2017-04-27">
<function name="Alert" messagetype="request">
<description>Request from SDL to show an alert message on the display.</description>
<param name="alertStrings" type="Common.TextFieldStruct" mandatory="true" array="true" minsize="0" maxsize="3">
@@ -3232,7 +3232,7 @@
</function>
</interface>
-<interface name="Navigation" version="1.3" date="2017-03-29">
+<interface name="Navigation" version="1.4.0" date="2017-04-27">
<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>
@@ -3437,7 +3437,7 @@
</interface>
-<interface name="VehicleInfo" version="1.0" date="2013-04-21">
+<interface name="VehicleInfo" version="1.1.0" date="2017-04-27">
<function name="IsReady" messagetype="request">
<description>Method is invoked at system startup. Response should provide information about presence of any of vehicle information modules (ECU, GPS, etc) and their readiness to cooperate with SDL.</description>
</function>
@@ -4069,7 +4069,7 @@
</interface>
<!-- Policies -->
-<interface name="SDL" version="1.0" date="2014-03-12">
+<interface name="SDL" version="1.1.0" date="2017-04-27">
<function name="ActivateApp" messagetype="request">
<param name="appID" type="Integer" mandatory="true">
</param>
diff --git a/src/components/interfaces/MOBILE_API.xml b/src/components/interfaces/MOBILE_API.xml
index d85ad1e7a3..953f270741 100644
--- a/src/components/interfaces/MOBILE_API.xml
+++ b/src/components/interfaces/MOBILE_API.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" standalone="no"?>
<?xml-stylesheet type="text/xml" href="protocol2html.xsl"?>
-<interface name="Ford Sync RAPI" version="4.3" date="2017-03-29">
+<interface name="Ford Sync RAPI" version="4.4.0" date="2017-04-27">
<enum name="Result" internal_scope="base">
<element name="SUCCESS">
@@ -876,6 +876,9 @@
<param name="minorVersion" type="Integer" minvalue="0" maxvalue="1000">
<description>The minor version indicates a change to a previous version that should still allow to be run on an older version (with limited functionality)</description>
</param>
+ <param name="patchVersion" type="Integer" minvalue="0" maxvalue="1000" mandatory="false">
+ <description>The patch version indicates a fix to existing functionality in a previous version that should still be able to be run on an older version </description>
+ </param>
</struct>
<enum name="GlobalProperty">
diff --git a/src/components/smart_objects/test/SmartObjectConvertionTime_test.cc b/src/components/smart_objects/test/SmartObjectConvertionTime_test.cc
index 8f153f32ea..b11560914e 100644
--- a/src/components/smart_objects/test/SmartObjectConvertionTime_test.cc
+++ b/src/components/smart_objects/test/SmartObjectConvertionTime_test.cc
@@ -428,6 +428,8 @@ TEST_F(SmartObjectConvertionTimeTest, test_some_object_convertion) {
srcObj[S_MSG_PARAMS]["ngnMediaScreenAppName"] = "SCREEN NAME";
srcObj[S_MSG_PARAMS]["syncMsgVersion"]["majorVersion"] = 2;
srcObj[S_MSG_PARAMS]["syncMsgVersion"]["minorVersion"] = 10;
+ srcObj[S_MSG_PARAMS]["syncMsgVersion"]["patchVersion"] = 5;
+
srcObj[S_MSG_PARAMS]["ttsName"][0]["text"] = "ABC";
srcObj[S_MSG_PARAMS]["ttsName"][0]["type"] = "TEXT";
srcObj[S_MSG_PARAMS]["vrSynonyms"][0] = "Synonym1";
diff --git a/src/components/utils/test/test_generator/generated_msg_version_test.cc b/src/components/utils/test/test_generator/generated_msg_version_test.cc
index 5cd7c9e8ea..fa9ecf2536 100644
--- a/src/components/utils/test/test_generator/generated_msg_version_test.cc
+++ b/src/components/utils/test/test_generator/generated_msg_version_test.cc
@@ -43,7 +43,7 @@ namespace test {
namespace components {
namespace utils_test {
-void get_version_from_file(int& first_version, int& second_version) {
+void get_version_from_file(int& first_version, int& second_version, int& third_version) {
// Supposed that major and minor version include one number
const std::string& absolute_current_path =
file_system::CurrentWorkingDirectory();
@@ -55,10 +55,36 @@ void get_version_from_file(int& first_version, int& second_version) {
while (getline(xml_file, str)) {
std::size_t isfound = str.find("interface name");
if (isfound != std::string::npos) {
- std::size_t snd = str.find(".");
- ASSERT_TRUE(snd != std::string::npos);
- first_version = str[snd - 1] - 48;
- second_version = str[snd + 1] - 48;
+ std::size_t versionStart = str.find("\"", str.find("version="));
+ ASSERT_TRUE(versionStart != std::string::npos);
+
+ std::size_t splitPos = str.find(".", versionStart + 1);
+ ASSERT_TRUE(splitPos != std::string::npos);
+
+ std::size_t splitPos2 = str.find(".", splitPos + 1);
+ ASSERT_TRUE(splitPos2 != std::string::npos);
+
+ std::size_t versionEnd = str.find("\"", splitPos2 + 1);
+ ASSERT_TRUE(versionEnd != std::string::npos);
+
+ first_version = 0;
+ for (std::size_t iter = versionStart + 1; iter < splitPos; iter++) {
+ first_version *= 10;
+ first_version += (str[iter] - 48);
+ }
+
+ second_version = 0;
+ for (std::size_t iter = splitPos + 1; iter < splitPos2; iter++) {
+ second_version *= 10;
+ second_version += (str[iter] - 48);
+ }
+
+ third_version = 0;
+ for (std::size_t iter = splitPos2 + 1; iter < versionEnd; iter++) {
+ third_version *= 10;
+ third_version += (str[iter] - 48);
+ }
+
break;
}
}
@@ -67,9 +93,11 @@ void get_version_from_file(int& first_version, int& second_version) {
TEST(GeneratorTool, GetCorrectVersion) {
int first_version = 0;
int second_version = 0;
- get_version_from_file(first_version, second_version);
+ int third_version = 0;
+ get_version_from_file(first_version, second_version, third_version);
EXPECT_EQ(first_version, application_manager::major_version);
EXPECT_EQ(second_version, application_manager::minor_version);
+ EXPECT_EQ(third_version, application_manager::patch_version);
}
} // namespace utils_test