diff options
Diffstat (limited to 'src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/register_app_interface_request.h')
-rw-r--r-- | src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/register_app_interface_request.h | 105 |
1 files changed, 91 insertions, 14 deletions
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/register_app_interface_request.h b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/register_app_interface_request.h index d59964bbc7..fae8f5eeb7 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/register_app_interface_request.h +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/commands/mobile/register_app_interface_request.h @@ -71,17 +71,19 @@ class RegisterAppInterfaceRequest /** * @brief RegisterAppInterfaceRequest class destructor **/ - virtual ~RegisterAppInterfaceRequest(); + ~RegisterAppInterfaceRequest(); /** * @brief Init required by command resources **/ - virtual bool Init(); + bool Init() FINAL; /** * @brief Execute command **/ - virtual void Run(); + void Run() FINAL; + + uint32_t default_timeout() const FINAL; private: /** @@ -98,11 +100,13 @@ class RegisterAppInterfaceRequest * @brief Prepares and sends RegisterAppInterface response to mobile * considering application type * @param app_type Type of application + * @param status_notifier pointer to status notifier callback function + * @param add_info - additional information to be sent to mobile app **/ - void SendRegisterAppInterfaceResponseToMobile(ApplicationType app_type); - - smart_objects::SmartObjectSPtr GetLockScreenIconUrlNotification( - const uint32_t connection_key, app_mngr::ApplicationSharedPtr app); + void SendRegisterAppInterfaceResponseToMobile( + ApplicationType app_type, + policy::StatusNotifier status_notifier, + const std::string& add_info); /** * @brief SendChangeRegistration send ChangeRegistration on HMI @@ -127,13 +131,9 @@ class RegisterAppInterfaceRequest * @param app application with changed HMI status * @param resumption If true, resumption-related parameters will be sent to * the HMI - * @param need_restore_vr If resumption is true, whether or not VR commands - *should be resumed **/ void SendOnAppRegisteredNotificationToHMI( - app_mngr::ApplicationConstSharedPtr app, - bool resumption = false, - bool need_restore_vr = false); + app_mngr::ApplicationConstSharedPtr app, bool resumption); /** * @brief Check new ID along with known mobile application ID @@ -236,9 +236,86 @@ class RegisterAppInterfaceRequest connection_handler::DeviceHandle* device_id = nullptr, std::string* mac_address = nullptr) const; - private: + /** + * @brief Processes AppHMITypes in the received message from mobile and in the + * policy table + * @param message A message from mobile that could contain AppHMIType + * collection + * @param app_hmi_types_in_policy AppHMITypes that describes in the policy + * table for the app that sent the message + * @return Result of processing + */ + mobile_apis::Result::eType ProcessingAppHMITypesPolicies( + smart_objects::SmartObject& message, + policy::StringArray& app_hmi_types_in_policy); + + /** + * @brief Processes AppHMITypes in the received message + * @param message A message received from the mobile + * @param info Info in a string representation that should be added to the + * response info + * @param log A log in a string represenation that could contain the + * AppHMITypes that are absent in the policy table. + */ + mobile_apis::Result::eType ProcessingAppHMITypesInMessage( + const smart_objects::SmartObject& message); + + /** + * @brief WaitForHMIIsReady blocking function. Waits for HMI be ready for + * requests processing + */ + void WaitForHMIIsReady(); + + /** + * @brief FillApplicationParams set app application attributes from the RAI + * request + * @param application applicaiton to fill params + */ + void FillApplicationParams( + application_manager::ApplicationSharedPtr application); + + /** + * @brief SetupAppDeviceInfo add applicaiton device information to policies + * @param application applicaiton to process + */ + void SetupAppDeviceInfo( + application_manager::ApplicationSharedPtr application); + + /** + * @brief ApplicationDataShouldBeResumed check if application data should be + * resumed + * @return true if app data should be resumed, otherwise returns false + */ + bool ApplicationDataShouldBeResumed(std::string& add_info); + + /** + * @brief CalculateFinalResultCode calculates the final result code + * considering all previous conditions + * @return calculated result code + */ + mobile_apis::Result::eType CalculateFinalResultCode() const; + + /** + * @brief AddApplicationDataToPolicy adds specified application to policy + * database and returns a callback with extra actions to be done if required + * @param application pointer to application to add + * @return callback with extra actions after adding specified application + */ + policy::StatusNotifier AddApplicationDataToPolicy( + application_manager::ApplicationSharedPtr application); + + /** + * @brief CheckLanguage check if language in RAI matches hmi_capabilities + * Setup result_code variable in case of does not match + */ + void CheckLanguage(); + std::string response_info_; - mobile_apis::Result::eType result_code_; + bool are_tts_chunks_invalid_; + bool are_hmi_types_invalid_; + bool is_resumption_failed_; + bool is_wrong_language_; + connection_handler::DeviceHandle device_handle_; std::string device_id_; |