summaryrefslogtreecommitdiff
path: root/src/components/include/test/application_manager/mock_application_manager_settings.h
diff options
context:
space:
mode:
authorYevhenii Dementieiev <57259850+ydementieiev@users.noreply.github.com>2020-07-17 18:48:45 +0300
committerGitHub <noreply@github.com>2020-07-17 11:48:45 -0400
commit5e2dff6d31554d5bd4534ec7f7702dc2f877340e (patch)
tree15f000c7e8b816845333bc62ba9513c088f36ff1 /src/components/include/test/application_manager/mock_application_manager_settings.h
parent81fb32e394ead932632bf2ee175f561027afbe2b (diff)
downloadsdl_core-5e2dff6d31554d5bd4534ec7f7702dc2f877340e.tar.gz
[SDL 0249] Feature/persisting hmi capabilities (#3397)
* Replace raw pointers with shared pointers * Save UI.GetCapabilities, UI.GetLanguage, UI.GetSupportedLanguages responses into the file specified by ini file If ini file contains an empty path to the cache file, this feature will be disabled and SDL will work as before. SDL will save each response only first time, after that file will not be overwritten. On master reset SDL will remove the cache file. SDL will read default hmi capability values from the cache file on each system boot up * Fix doxygen * Define HMI interfaces aliases * Implement caching for VR, TTS, Buttons, VehicheInfo and RC capabilities * Fix default capabilities structure according to the HMI API * Send requests to get capabilities from HMI in case any capability is missing in cache * Refactor RC capabilities storing and retrieving. Fix related UTs. * Created implementation and unit tests for HMI capabilities persistence after SW update * Created implementation for save and received MetaInfo * Increase unit tests coverage on persistence HMI capabilities * Do not rewrite MetaInfo in case invalid BC.GetSystemInfo response from HMI * Read pcm_stream_capabilities from HMI and save to the cache * Refactor hmi capabilities test * Fix wrong convert PrerecordedSpeech and added unit test for check * Suspend response to RAI requests until HMI has responded to all the HMI capabilities * Request appropriate capabilities if they are not present in the cache and the default capabilities as well * fixup! Send requests to get capabilities from HMI in case any capability is missing in cache * Remove hm_capabilities.json test file It should be removed because during UT building the real hmi_capabilities.json file is copying to the test directory * Re-factor HMICapabilitiesImpl and add the new one method Make changes in the next places: - GetRequestsRequiredForCapabilities method rename to IsRequestsRequiredForCapabilities and return value change to bool. This commit provides the next implementation: the method checks if specified request should be sent to the HMI; - in the save_hmi_capability_field_to_json method remove redundant section in the json node to save; - JsonCapabilitiesGetter: GetInterfaceJsonMember method rename to IsInterfaceJsonMemberExists. Return value change to bool; - Add the new one function GetInterfaceGetter: returns the JsonCapabilitiesGetter according to specified interface name; - Parsing the capabilities cache file wrapped to the try/catch construction; - Add AddRequiredRequestsForCapabilities method; - Remove MatchesCCPUVersion method as redundant; - Rework PrepareXXXJsonValueForSaving methods; - Add new Unit tests for HMICapabilitiesImpl; - Update existing Unit tests according to the appropriate changes; * Update CCPU Version max value parameter (regular and external policies) * Minor updates: - Remove input parameter for the GetSystemInfo method, move the OnSoftwareVersionReceived method out of GetSystemInfo method; - UIGetCapabilitiesResponse: retrieve reference for a specific section from a message instead of using the whole path to needed section; - OnTTSLanguageChangeNotification: add saving cached capabilities for VR; - OnVRLanguageChangeNotification: update log info; - VRGetCapabilitiesResponse: retrieve reference for a specific section from a message instead of using the whole path to needed section; - VRGetSupportedLanguagesResponse: update log info; - CacheManager (regular and external policies): add doxygen description for the SetPreloadedPtFlag method; move back meta info out of "for" loop; * Minor changes for the Unit tests * Fix SDL Core crash during getting RC capability There the case when RC capability didn't initialized yet and rc_capability() method is calling and returns invalid pointer to the RC capability. This commit provides the next changes: - Add check for returned pointer to rc_capability; - Add the new one capabilitiesStatus parameter "kInvalidStatus" for return value for the GetModuleDataCapabilities method; - Update capabilitiesStatus parameter names according to the coding style; * fixup! Re-factor HMICapabilitiesImpl and add the new one method * fixup! Re-factor HMICapabilitiesImpl and add the new one method * fixup! Re-factor HMICapabilitiesImpl and add the new one method * Remove "system_display_capabilities" smart key * Add to the RequestToHMI the RequestCapabilities method The "RequestCapabilities" methos is common for the all *IsReady requests. Because of that it was moved to the base class with common logic. * Re-factor all *IsReady request. The logic for getting capabilities from HMI is common for the all *IsReady request. This logic is implemented in the base RequestToHMI class. So, this logic should be removed from each request and the method of the base class should be used. * fixup! Re-factor all *IsReady request. Co-authored-by: LitvinenkoIra <ilytvynenko@luxoft.com> Co-authored-by: Igor Gapchuk <igapchuck@luxoft.com> Co-authored-by: Yevhenii Dementieiev (GitHub) <ydementieiev@luxoft.com> Co-authored-by: sniukalov <sniukaov@luxoft.com>
Diffstat (limited to 'src/components/include/test/application_manager/mock_application_manager_settings.h')
-rw-r--r--src/components/include/test/application_manager/mock_application_manager_settings.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/components/include/test/application_manager/mock_application_manager_settings.h b/src/components/include/test/application_manager/mock_application_manager_settings.h
index 1a68d663fe..9a70a374a7 100644
--- a/src/components/include/test/application_manager/mock_application_manager_settings.h
+++ b/src/components/include/test/application_manager/mock_application_manager_settings.h
@@ -82,6 +82,7 @@ class MockApplicationManagerSettings
MOCK_CONST_METHOD0(help_prompt, const std::vector<std::string>&());
MOCK_CONST_METHOD0(time_out_promt, const std::vector<std::string>&());
MOCK_CONST_METHOD0(hmi_capabilities_file_name, const std::string&());
+ MOCK_CONST_METHOD0(hmi_capabilities_cache_file_name, const std::string&());
MOCK_CONST_METHOD0(video_server_type, const std::string&());
MOCK_CONST_METHOD0(audio_server_type, const std::string&());
MOCK_CONST_METHOD0(server_address, const std::string&());