diff options
Diffstat (limited to 'src/components/application_manager/include/application_manager/commands/mobile/register_app_interface_request.h')
-rw-r--r-- | src/components/application_manager/include/application_manager/commands/mobile/register_app_interface_request.h | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/register_app_interface_request.h b/src/components/application_manager/include/application_manager/commands/mobile/register_app_interface_request.h index cc3d5b685c..5713e2e814 100644 --- a/src/components/application_manager/include/application_manager/commands/mobile/register_app_interface_request.h +++ b/src/components/application_manager/include/application_manager/commands/mobile/register_app_interface_request.h @@ -78,14 +78,29 @@ class RegisterAppInterfaceRequest : public CommandRequestImpl { virtual void Run(); /** - * @brief Sends RegisterAppInterface response to mobile - * - *@param application_impl application - * + * @brief Prepares and sends RegisterAppInterface response to mobile + * considering application type **/ void SendRegisterAppInterfaceResponseToMobile(); private: + /** + * @brief The AppicationType enum defines whether application is newly + * registered or existing and being switched over another transport + */ + enum class ApplicationType { + kNewApplication, + kSwitchedApplicationHashOk, + kSwitchedApplicationWrongHashId + }; + + /** + * @brief Prepares and sends RegisterAppInterface response to mobile + * considering application type + * @param app_type Type of application + **/ + void SendRegisterAppInterfaceResponseToMobile(ApplicationType app_type); + smart_objects::SmartObjectSPtr GetLockScreenIconUrlNotification( const uint32_t connection_key, ApplicationSharedPtr app); @@ -184,6 +199,15 @@ class RegisterAppInterfaceRequest : public CommandRequestImpl { */ void SendSubscribeCustomButtonNotification(); + /** + * @brief IsApplicationSwitched checks whether application is switched from + * another transport. If application id is found, but not in reconnection + * list, returns 'already registered' code. Otherwise - proceed with + * switching. + * @return True if application is detected as switched, otherwise false. + */ + bool IsApplicationSwitched(); + private: std::string response_info_; mobile_apis::Result::eType result_checking_app_hmi_type_; |