summaryrefslogtreecommitdiff
path: root/src/components/include/policy/policy_regular/policy/policy_manager.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/include/policy/policy_regular/policy/policy_manager.h')
-rw-r--r--src/components/include/policy/policy_regular/policy/policy_manager.h68
1 files changed, 46 insertions, 22 deletions
diff --git a/src/components/include/policy/policy_regular/policy/policy_manager.h b/src/components/include/policy/policy_regular/policy/policy_manager.h
index ee1f5fa98f..52923a53e2 100644
--- a/src/components/include/policy/policy_regular/policy/policy_manager.h
+++ b/src/components/include/policy/policy_regular/policy/policy_manager.h
@@ -575,6 +575,14 @@ class PolicyManager : public usage_statistics::StatisticsManager,
* @return policy_table as json object
*/
virtual Json::Value GetPolicyTableData() const = 0;
+
+ /**
+ * @brief Get a list of policy app ids
+ * @return apps list filled with the policy app ids of each
+ * application
+ */
+ virtual const std::vector<std::string> GetApplicationPolicyIDs() const = 0;
+
/**
* @brief Get a list of enabled cloud applications
* @param enabled_apps List filled with the policy app id of each enabled
@@ -584,29 +592,21 @@ class PolicyManager : public usage_statistics::StatisticsManager,
std::vector<std::string>& enabled_apps) const = 0;
/**
- * @brief Get cloud app policy information, all fields that aren't set for a
+ * @brief Get a list of enabled local applications
+ * @return enabled_apps List filled with the policy app id of each enabled
+ * local application
+ */
+ virtual std::vector<std::string> GetEnabledLocalApps() const = 0;
+
+ /**
+ * @brief Get app policy information, all fields that aren't set for a
* given app will be filled with empty strings
- * @param policy_app_id Unique application id
- * @param enabled Whether or not the app is enabled
- * @param endpoint Filled with the endpoint used to connect to the cloud
- * application
- * @param certificate Filled with the certificate used to for creating a
- * secure connection to the cloud application
- * @param auth_token Filled with the token used for authentication when
- * reconnecting to the cloud app
- * @param cloud_transport_type Filled with the transport type used by the
- * cloud application (ex. "WSS")
- * @param hybrid_app_preference Filled with the hybrid app preference for the
- * cloud application set by the user
- */
- virtual bool GetCloudAppParameters(
- const std::string& policy_app_id,
- bool& enabled,
- std::string& endpoint,
- std::string& certificate,
- std::string& auth_token,
- std::string& cloud_transport_type,
- std::string& hybrid_app_preference) const = 0;
+ * @param policy_app_id policy app id
+ * @param out_app_properties application properties
+ * @return true if application presents in database, otherwise - false
+ */
+ virtual bool GetAppProperties(const std::string& policy_app_id,
+ AppProperties& out_app_properties) const = 0;
/**
* @ brief Initialize new cloud app in the policy table
@@ -758,6 +758,13 @@ class PolicyManager : public usage_statistics::StatisticsManager,
const std::string& application_id) = 0;
/**
+ * @brief Send OnAppPropertiesChangeNotification to the HMI
+ * @param policy_app_id policy app id
+ */
+ virtual void SendOnAppPropertiesChangeNotification(
+ const std::string& policy_app_id) const = 0;
+
+ /**
* @brief Gets all allowed module types
* @param policy_app_id unique identifier of application
* @param modules list of allowed module types
@@ -785,6 +792,23 @@ class PolicyManager : public usage_statistics::StatisticsManager,
virtual AppIdURL RetrySequenceUrl(const struct RetrySequenceURL& rs,
const EndpointUrls& urls) const = 0;
+ /**
+ * @brief OnLocalAppAdded triggers PTU
+ */
+ virtual void OnLocalAppAdded() = 0;
+
+ /**
+ * @brief Check if certain application already in policy db.
+ * @param policy application id.
+ * @return true if application presents false otherwise.
+ */
+ virtual bool IsNewApplication(const std::string& application_id) const = 0;
+
+ /**
+ * @brief Restart PTU timeout if PTU in UPDATING state
+ */
+ virtual void ResetTimeout() = 0;
+
protected:
/**
* @brief Checks is PT exceeded IgnitionCycles