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 | 49 |
1 files changed, 32 insertions, 17 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 e5bcf40da9..b0a2ee05d1 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 @@ -34,9 +34,10 @@ #ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_REGISTER_APP_INTERFACE_REQUEST_H_ #define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_REGISTER_APP_INTERFACE_REQUEST_H_ -#include <string.h> #include "application_manager/commands/command_request_impl.h" +#include "application_manager/policies/policy_handler_interface.h" #include "utils/macro.h" +#include "utils/custom_string.h" namespace policy { struct DeviceInfo; @@ -48,6 +49,8 @@ class Application; namespace commands { +namespace custom_str = utils::custom_string; + /** * @brief Register app interface request command class **/ @@ -56,7 +59,8 @@ class RegisterAppInterfaceRequest : public CommandRequestImpl { /** * \brief RegisterAppInterfaceRequest class constructor **/ - explicit RegisterAppInterfaceRequest(const MessageSharedPtr& message); + RegisterAppInterfaceRequest(const MessageSharedPtr& message, + ApplicationManager& application_manager); /** * @brief RegisterAppInterfaceRequest class destructor @@ -79,10 +83,22 @@ class RegisterAppInterfaceRequest : public CommandRequestImpl { *@param application_impl application * **/ - void SendRegisterAppInterfaceResponseToMobile( - mobile_apis::Result::eType result = mobile_apis::Result::SUCCESS); + void SendRegisterAppInterfaceResponseToMobile(); private: + smart_objects::SmartObjectSPtr GetLockScreenIconUrlNotification( + const uint32_t connection_key, + ApplicationSharedPtr app); + + /** + * @brief Sends OnAppRegistered notification to HMI + * + *@param application_impl application with changed HMI status + * + **/ + void SendOnAppRegisteredNotificationToHMI(const Application& application_impl, + bool resumption = false, + bool need_restore_vr = false); /* * @brief Check new ID along with known mobile application ID * @@ -100,22 +116,21 @@ class RegisterAppInterfaceRequest : public CommandRequestImpl { mobile_apis::Result::eType CheckCoincidence(); /* - * @brief Predicate for using with CheckCoincidence method to compare with VR synonym SO + * @brief Predicate for using with CheckCoincidence method to compare with VR + * synonym SO * * return TRUE if there is coincidence of VR, otherwise FALSE */ struct CoincidencePredicateVR { - explicit CoincidencePredicateVR(const std::string &newItem) - :newItem_(newItem) - {}; - - bool operator()(smart_objects::SmartObject obj) { - const std::string vr_synonym = obj.asString(); - return !(strcasecmp(vr_synonym.c_str(), newItem_.c_str())); - }; + CoincidencePredicateVR(const custom_str::CustomString& newItem) + : newItem_(newItem) {} - const std::string &newItem_; - }; + bool operator()(const smart_objects::SmartObject& obj) { + const custom_str::CustomString& vr_synonym = obj.asCustomString(); + return newItem_.CompareIgnoreCase(vr_synonym); + } + const custom_str::CustomString& newItem_; + }; /** * @brief Check request parameters against policy table data @@ -153,11 +168,11 @@ class RegisterAppInterfaceRequest : public CommandRequestImpl { */ void SendSubscribeCustomButtonNotification(); -private: + private: std::string response_info_; mobile_apis::Result::eType result_checking_app_hmi_type_; - + policy::PolicyHandlerInterface& GetPolicyHandler(); DISALLOW_COPY_AND_ASSIGN(RegisterAppInterfaceRequest); }; |