diff options
Diffstat (limited to 'src/components/policy/src/policy/include/policy/policy_manager.h')
-rw-r--r-- | src/components/policy/src/policy/include/policy/policy_manager.h | 98 |
1 files changed, 54 insertions, 44 deletions
diff --git a/src/components/policy/src/policy/include/policy/policy_manager.h b/src/components/policy/src/policy/include/policy/policy_manager.h index 3cd295bd9..aa2eb7d3d 100644 --- a/src/components/policy/src/policy/include/policy/policy_manager.h +++ b/src/components/policy/src/policy/include/policy/policy_manager.h @@ -1,4 +1,4 @@ -/* +/* Copyright (c) 2013, Ford Motor Company All rights reserved. @@ -40,7 +40,6 @@ #include "usage_statistics/statistics_manager.h" namespace policy { - class PolicyManager : public usage_statistics::StatisticsManager { public: virtual ~PolicyManager() { @@ -77,27 +76,19 @@ class PolicyManager : public usage_statistics::StatisticsManager { * @param service_type Service specifies user of URL * @return string URL */ - virtual std::string GetUpdateUrl(int service_type) = 0; - - /** - * @brief GetLockScreenIcon allows to obtain lock screen icon url; - * - * @return url which point to the resourse where lock screen icon could be obtained. - */ - virtual std::string GetLockScreenIconUrl() const = 0; + virtual std::string GetUpdateUrl(int service_type) const = 0; /** * @brief Gets all URLs for sending PTS to from PT itself. * @param service_type Service specifies user of URL * @return vector of urls */ - virtual EndpointUrls GetUpdateUrls(int service_type) = 0; + virtual void GetUpdateUrls(int service_type, EndpointUrls& end_points) = 0; /** * @brief PTU is needed, for this PTS has to be formed and sent. - * @return BinaryMessage* PTS. */ - virtual BinaryMessageSptr RequestPTUpdate() = 0; + virtual void RequestPTUpdate() = 0; /** * @brief Check if specified RPC for specified application @@ -125,27 +116,14 @@ class PolicyManager : public usage_statistics::StatisticsManager { * @brief Returns current status of policy table for HMI * @return Current status of policy table */ - virtual PolicyTableStatus GetPolicyTableStatus() = 0; - - /** - * Checks is PT exceeded IgnitionCycles - * @return true if exceeded - */ - virtual bool ExceededIgnitionCycles() = 0; - - /** - * Checks is PT exceeded days - * @param days current day after epoch - * @return true if exceeded - */ - virtual bool ExceededDays(int days) = 0; + virtual std::string GetPolicyTableStatus() const = 0; /** * Checks is PT exceeded kilometers * @param kilometers current kilometers at odometer * @return true if exceeded */ - virtual bool ExceededKilometers(int kilometers) = 0; + virtual void KmsChanged(int kilometers) = 0; /** * Increments counter of ignition cycles @@ -153,6 +131,11 @@ class PolicyManager : public usage_statistics::StatisticsManager { virtual void IncrementIgnitionCycles() = 0; /** + * @brief ExchangeByUserRequest + */ + virtual std::string ForcePTExchange() = 0; + + /** * Resets retry sequence */ virtual void ResetRetrySequence() = 0; @@ -302,12 +285,11 @@ class PolicyManager : public usage_statistics::StatisticsManager { /** * @brief Gets specific application permissions changes since last policy * table update - * @param device_id Id of device, which hosts application * @param policy_app_id Unique application id * @return Permissions changes */ virtual AppPermissions GetAppPermissionsChanges( - const std::string& device_id, const std::string& policy_app_id) = 0; + const std::string& policy_app_id) = 0; virtual void RemovePendingPermissionChanges(const std::string& app_id) = 0; @@ -354,14 +336,6 @@ class PolicyManager : public usage_statistics::StatisticsManager { virtual void AddApplication(const std::string& application_id) = 0; /** - * @brief IsAppInUpdateList allows to check if specific application - * presents in update list. - * @param app_id id of the application that should be verified. - * @return true in case of application is in update list, false otherwise. - */ - virtual bool IsAppInUpdateList(const std::string& app_id) const = 0; - - /** * @brief Removes unpaired device records and related records from DB * @param device_ids List of device_id, which should be removed * @return true, if succedeed, otherwise - false @@ -393,12 +367,6 @@ class PolicyManager : public usage_statistics::StatisticsManager { virtual uint32_t GetNotificationsNumber(const std::string& priority) = 0; /** - * @brief Provide info about device consent for application - * @return Amount of groups for which app is allowed - */ - virtual int IsConsentNeeded(const std::string& app_id) = 0; - - /** * @brief Allows to update Vehicle Identification Number in policy table. * @param new value for the parameter. */ @@ -418,6 +386,48 @@ class PolicyManager : public usage_statistics::StatisticsManager { * otherwise heart beat for specific application isn't set */ virtual uint16_t HeartBeatTimeout(const std::string& app_id) const = 0; + + /** + * @brief SaveUpdateStatusRequired alows to save update status. + */ + virtual void SaveUpdateStatusRequired(bool is_update_needed) = 0; + + /** + * @brief RemoteAppsUrl allows to obtain url for QUERY_APP system request. + * + * @return url. + */ + virtual std::string RemoteAppsUrl() const = 0; + + /** + * @brief Handler on applications search started + */ + virtual void OnAppsSearchStarted() = 0; + + /** + * @brief Handler on applications search completed + */ + virtual void OnAppsSearchCompleted() = 0; + + protected: + /** + * Checks is PT exceeded IgnitionCycles + * @return true if exceeded + */ + virtual bool ExceededIgnitionCycles() = 0; + + /** + * Checks is PT exceeded days + * @return true if exceeded + */ + virtual bool ExceededDays() = 0; + + /** + * @brief StartPTExchange allows to start PTU. The function will check + * if one is required and starts the update flow in only case when previous + * condition is true. + */ + virtual void StartPTExchange() = 0; }; } // namespace policy |