summaryrefslogtreecommitdiff
path: root/src/components/application_manager/include/application_manager/commands/mobile/register_app_interface_request.h
diff options
context:
space:
mode:
authorJackLivio <jack@livio.io>2018-01-25 14:10:01 -0500
committerGitHub <noreply@github.com>2018-01-25 14:10:01 -0500
commitb973e81afb1d38a27a478ce706e16b5352fb026b (patch)
tree939c4864d1ef9101414b99560ac81f10e303c242 /src/components/application_manager/include/application_manager/commands/mobile/register_app_interface_request.h
parente8911d03dde016a29b01fe80533bc6ac56531678 (diff)
parent82d13ffda5f1d946f815a9f0a7de13e0add2fc44 (diff)
downloadsdl_core-b973e81afb1d38a27a478ce706e16b5352fb026b.tar.gz
Merge pull request #1927 from smartdevicelink/feature/IAP_over_BT
Implementation of transport switching from iAP2 Bluetooth to iAP2 USB
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.h32
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_;