summaryrefslogtreecommitdiff
path: root/src/components/application_manager/include/application_manager/resumption/resume_ctrl.h
diff options
context:
space:
mode:
authorAKalinich-Luxoft <AKalinich@luxoft.com>2017-06-09 09:39:12 +0300
committerAKalinich-Luxoft <AKalinich@luxoft.com>2017-12-12 14:10:29 +0200
commit2f22052761aed0069b9a7fc99c0ffee1e60822c0 (patch)
tree9f7e50486584cf6d7b0328efa941fcd318d97cbb /src/components/application_manager/include/application_manager/resumption/resume_ctrl.h
parent6153f79de2c362dd51c3e945294b74cd9f965ac5 (diff)
downloadsdl_core-2f22052761aed0069b9a7fc99c0ffee1e60822c0.tar.gz
Added OnIgnitionOff() and new bool flag to ResumeCtrl class
SDL should distinct ignition off and suspend notifications. SDL should not increment ignition off count in case of suspended notification, only in case of ignition off. This logic was separated by appending new function OnIgnitionOff() which will be called from application manager on ignition off instead of OnSuspend(). Also was added is_suspended flag and related getter/setter. This flag is used in: - ApplicationImpl to check should SDL send OnHashChange or not - In OnAwakeSDLNotification to check should SDL do OnAwake actions or not - OnExitAllApplicationsNotification and OnAwakeSDLNotification switches this flag Also was fixed some related UT expectations and mocks.
Diffstat (limited to 'src/components/application_manager/include/application_manager/resumption/resume_ctrl.h')
-rw-r--r--src/components/application_manager/include/application_manager/resumption/resume_ctrl.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/components/application_manager/include/application_manager/resumption/resume_ctrl.h b/src/components/application_manager/include/application_manager/resumption/resume_ctrl.h
index 26b1739a38..298992c907 100644
--- a/src/components/application_manager/include/application_manager/resumption/resume_ctrl.h
+++ b/src/components/application_manager/include/application_manager/resumption/resume_ctrl.h
@@ -115,11 +115,34 @@ class ResumeCtrl {
virtual void OnSuspend() = 0;
/**
+ * @brief Processes resumption data after receiving signal "Ignition Off"
+ */
+ virtual void OnIgnitionOff() = 0;
+
+ /**
* @brief Processes resumption data after receiving signal "Awake"
*/
virtual void OnAwake() = 0;
/**
+ * @brief Retrieves value of is_suspended_
+ *
+ * @return Returns TRUE if SDL has received OnExitAllApplication notification
+ * with reason "SUSPEND" otherwise returns FALSE
+ */
+ virtual bool is_suspended() const = 0;
+
+ /**
+ * @brief Sets value of is_suspended_
+ *
+ * @param contains TRUE if method is called when SDL has received
+ * OnExitAllApplication notification with reason "SUSPEND"
+ * contains FALSE if method is called when SDL has received
+ * OnAwakeSDL notification.
+ */
+ virtual void set_is_suspended(const bool suspended_flag) = 0;
+
+ /**
* @brief Method stops timer "RsmCtrlPercist" when SDL
* receives OnExitAllApplication notification
* with reason "SUSPEND"