From 66c7aba6abd5c6f23ba3bff146cb1820fb32d624 Mon Sep 17 00:00:00 2001 From: Dmitriy Klimenko Date: Mon, 8 Jun 2015 14:48:11 -0700 Subject: APPLINK--11284 Return SDL & System Software Version In RAI Conflicts: src/appMain/smartDeviceLink.ini src/components/application_manager/include/application_manager/hmi_capabilities.h src/components/application_manager/src/commands/hmi/get_system_info_response.cc src/components/application_manager/src/hmi_capabilities.cc src/components/config_profile/src/profile.cc --- .../config_profile/include/config_profile/profile.h | 7 +++++++ src/components/config_profile/src/profile.cc | 19 ++++++++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) (limited to 'src/components/config_profile') diff --git a/src/components/config_profile/include/config_profile/profile.h b/src/components/config_profile/include/config_profile/profile.h index c372109c29..6a43cafdd3 100644 --- a/src/components/config_profile/include/config_profile/profile.h +++ b/src/components/config_profile/include/config_profile/profile.h @@ -57,6 +57,12 @@ class Profile : public utils::Singleton { */ virtual ~Profile(); + /** + * @brief Returns sdl version represented + * by git commit or value specified by user + */ + const std::string& sdl_version() const; + /** * @brief Returns true if HMI should be started, otherwise false */ @@ -618,6 +624,7 @@ class Profile : public utils::Singleton { bool StringToNumber(const std::string& input, uint64_t& output) const; private: + std::string sdl_version_; bool launch_hmi_; #ifdef WEB_HMI std::string link_to_web_hmi_; diff --git a/src/components/config_profile/src/profile.cc b/src/components/config_profile/src/profile.cc index 4b6c2b4809..a1f8b43561 100644 --- a/src/components/config_profile/src/profile.cc +++ b/src/components/config_profile/src/profile.cc @@ -73,6 +73,7 @@ const char* kProtocolHandlerSection = "ProtocolHandler"; const char* kSDL4Section = "SDL4"; const char* kResumptionSection = "Resumption"; +const char* kSDLVersionKey = "SDLVersion"; const char* kHmiCapabilitiesKey = "HMICapabilities"; const char* kPathToSnapshotKey = "PathToSnapshot"; const char* kPreloadedPTKey = "PreloadedPT"; @@ -165,6 +166,7 @@ const char* kHashStringSizeKey = "HashStringSize"; #ifdef WEB_HMI const char* kDefaultLinkToWebHMI = "HMI/index.html"; #endif // WEB_HMI +const char* kDefaultSDLVersion = ""; const char* kDefaultPoliciesSnapshotFileName = "sdl_snapshot.json"; const char* kDefaultHmiCapabilitiesFileName = "hmi_capabilities.json"; const char* kDefaultPreloadedPTFileName = "sdl_preloaded_pt.json"; @@ -243,6 +245,7 @@ Profile::Profile() #ifdef WEB_HMI link_to_web_hmi_(kDefaultLinkToWebHMI), #endif // WEB_HMI + sdl_version_(kDefaultSDLVersion), app_config_folder_(), app_storage_folder_(), app_resourse_folder_(), @@ -306,8 +309,12 @@ Profile::Profile() attempts_to_open_policy_db_(kDefaultAttemptsToOpenPolicyDB), open_attempt_timeout_ms_(kDefaultAttemptsToOpenPolicyDB), hash_string_size_(kDefaultHashStringSize) { + ReadStringValue(&sdl_version_, kDefaultSDLVersion, + kMainSection, kSDLVersionKey); } + + Profile::~Profile() { } @@ -322,6 +329,10 @@ const std::string& Profile::config_file_name() const { return config_file_name_; } +const std::string& Profile::sdl_version() const { + return sdl_version_; +} + bool Profile::launch_hmi() const { return launch_hmi_; } @@ -685,6 +696,12 @@ uint16_t Profile::tts_global_properties_timeout() const { void Profile::UpdateValues() { LOG4CXX_AUTO_TRACE(logger_); + // SDL version + ReadStringValue(&sdl_version_, kDefaultSDLVersion, + kMainSection, kSDLVersionKey); + + LOG_UPDATED_VALUE(sdl_version_, kSDLVersionKey, kMainSection); + // Launch HMI parameter std::string launch_value; if (ReadValue(&launch_value, kHmiSection, kLaunchHMIKey) && @@ -1374,7 +1391,7 @@ void Profile::UpdateValues() { LOG_UPDATED_VALUE(iap_hub_connection_wait_timeout_, kIAPHubConnectionWaitTimeoutKey, kIAPSection); - + ReadUIntValue(&default_hub_protocol_index_, kDefaultHubProtocolIndex, kIAPSection, kDefaultHubProtocolIndexKey); LOG_UPDATED_VALUE(default_hub_protocol_index_, kDefaultHubProtocolIndexKey, kIAPSection); -- cgit v1.2.1