summaryrefslogtreecommitdiff
path: root/src/components/policy/policy_external/include/policy/ptu_retry_handler.h
diff options
context:
space:
mode:
authorMaksym Ked (GitHub) <41471947+mked-luxoft@users.noreply.github.com>2019-08-29 22:28:40 +0300
committerJacob Keeler <jacob.keeler@livioradio.com>2019-08-29 15:28:40 -0400
commite90b4aa4729ca9f64e7b6f4aa9fc746c29863f23 (patch)
tree75d35eac19de42817e387b91250faab94f7e4e70 /src/components/policy/policy_external/include/policy/ptu_retry_handler.h
parent5905717229c512e975ca95715736db795f3105d2 (diff)
downloadsdl_core-e90b4aa4729ca9f64e7b6f4aa9fc746c29863f23.tar.gz
Feature/service status update to hmi (#2921)
* Added OnServiceUpdate notification * Added handling of service status update - introduced ServiceStatusUpdateHandler and ServiceStatusUpdateHandlerListener interfaces - added lacking interface functions to corresponding entities - added notification of listeners - introduced ServiceStatusUpdateNotificationBuilder - replaced shared_ptr with unique_ptr - moved SERVICE_RECEIVED * Add UT's for service status update to HMI feature * Added ServiceStatusUpdateDocumentation * Added sending error on PTU retries exceed allowed count * Fix OnServiceUpdate for unsecure force protected service * Updates according to proposal changes Added new result codes for ServiceStatusUpdateReasonStructure
Diffstat (limited to 'src/components/policy/policy_external/include/policy/ptu_retry_handler.h')
-rw-r--r--src/components/policy/policy_external/include/policy/ptu_retry_handler.h57
1 files changed, 57 insertions, 0 deletions
diff --git a/src/components/policy/policy_external/include/policy/ptu_retry_handler.h b/src/components/policy/policy_external/include/policy/ptu_retry_handler.h
new file mode 100644
index 0000000000..79623124e3
--- /dev/null
+++ b/src/components/policy/policy_external/include/policy/ptu_retry_handler.h
@@ -0,0 +1,57 @@
+/*
+ Copyright (c) 2019, Ford Motor Company
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided with the
+ distribution.
+
+ Neither the name of the Ford Motor Company nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ */
+#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_POLICIES_PTU_RETRY_HANDLER_H_
+#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_POLICIES_PTU_RETRY_HANDLER_H_
+
+namespace policy {
+
+class PTURetryHandler {
+ public:
+ /**
+ * @brief Check whether allowed retry sequence count is exceeded
+ * @return bool value - true is allowed count is exceeded, otherwise - false
+ */
+ virtual bool IsAllowedRetryCountExceeded() const = 0;
+
+ /**
+ * @brief Begins new retry sequence
+ */
+ virtual void OnSystemRequestReceived() = 0;
+
+ /**
+ * @brief Handle OnSystemRequest from HMI timeout
+ */
+ virtual void RetrySequenceFailed() = 0;
+};
+} // namespace policy
+
+#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_POLICIES_PTU_RETRY_HANDLER_H_