diff options
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.h | 136 |
1 files changed, 124 insertions, 12 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 ee0bae7118..f82657ef26 100644 --- a/src/components/include/policy/policy_regular/policy/policy_manager.h +++ b/src/components/include/policy/policy_regular/policy/policy_manager.h @@ -33,16 +33,16 @@ #ifndef SRC_COMPONENTS_INCLUDE_POLICY_POLICY_REGULAR_POLICY_POLICY_MANAGER_H_ #define SRC_COMPONENTS_INCLUDE_POLICY_POLICY_REGULAR_POLICY_POLICY_MANAGER_H_ -#include <vector> #include <cstdint> +#include <vector> -#include "utils/callable.h" -#include "policy/policy_types.h" -#include "policy/policy_table/types.h" +#include "policy/access_remote.h" +#include "policy/cache_manager_interface.h" #include "policy/policy_listener.h" +#include "policy/policy_table/types.h" +#include "policy/policy_types.h" #include "policy/usage_statistics/statistics_manager.h" -#include "policy/cache_manager_interface.h" -#include "policy/access_remote.h" +#include "utils/callable.h" namespace policy { class PolicySettings; @@ -87,12 +87,21 @@ class PolicyManager : public usage_statistics::StatisticsManager { /** * @brief GetLockScreenIcon allows to obtain lock screen icon url; - * @return url which point to the resourse where lock screen icon could be + * @return url which point to the resource where lock screen icon could be *obtained. */ virtual std::string GetLockScreenIconUrl() const = 0; /** + * @brief Get Icon Url used for showing a cloud apps icon before the initial + *registration + * + * @return url which point to the resource where icon could be + *obtained. + */ + virtual std::string GetIconUrl(const std::string& policy_app_id) const = 0; + + /** * @brief Gets all URLs for sending PTS to from PT itself. * @param service_type Service specifies user of URL * @param out_end_points output vector of urls @@ -503,6 +512,109 @@ class PolicyManager : public usage_statistics::StatisticsManager { virtual const VehicleInfo GetVehicleInfo() const = 0; /** + * @brief Get a list of enabled cloud applications + * @param enabled_apps List filled with the policy app id of each enabled + * cloud application + */ + virtual void GetEnabledCloudApps( + std::vector<std::string>& enabled_apps) const = 0; + + /** + * @brief Get cloud 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; + + /** + * @ brief Initialize new cloud app in the policy table + * @ param policy_app_id Application ID + */ + + virtual void InitCloudApp(const std::string& policy_app_id) = 0; + + /** + * @brief Enable or disable a cloud application in the HMI + * @param enabled Cloud app enabled state + */ + virtual void SetCloudAppEnabled(const std::string& policy_app_id, + const bool enabled) = 0; + + /** + * @brief Set an app's auth token + * @param auth_token Cloud app authentication token + */ + virtual void SetAppAuthToken(const std::string& policy_app_id, + const std::string& auth_token) = 0; + + /** + * @brief Set a cloud app's transport type + * @param cloud_transport_type Cloud app transport type + */ + virtual void SetAppCloudTransportType( + const std::string& policy_app_id, + const std::string& cloud_transport_type) = 0; + + /** + * @brief Set a cloud app's endpoint url + * @param endpoint URL for websocket connection + */ + virtual void SetAppEndpoint(const std::string& policy_app_id, + const std::string& endpoint) = 0; + + /** + * @brief Set a cloud app's nicknames + * @param nicknames Nicknames for cloud app + */ + virtual void SetAppNicknames(const std::string& policy_app_id, + const StringArray& nicknames) = 0; + + /** + * @brief Set the user preference for how a hybrid (cloud and mobile) app + * should be used + * @param hybrid_app_preference Hybrid app user preference + */ + virtual void SetHybridAppPreference( + const std::string& policy_app_id, + const std::string& hybrid_app_preference) = 0; + + /** + * @brief Get app service parameters from the policy table + * @param policy_app_id Unique application id + * @param app_service_parameters Pointer to struct containing all app service + * information + */ + virtual void GetAppServiceParameters( + const std::string& policy_app_id, + policy_table::AppServiceParameters* app_service_parameters) const = 0; + + /** + * @brief Check if an app can send unknown rpc requests to an app service + * provider + * @param policy_app_id Unique application id + */ + virtual bool UnknownRPCPassthroughAllowed( + const std::string& policy_app_id) const = 0; + + /** * @brief OnAppRegisteredOnMobile allows to handle event when application were * succesfully registered on mobile device. * It will send OnAppPermissionSend notification and will try to start PTU. * @@ -576,11 +688,11 @@ class PolicyManager : public usage_statistics::StatisticsManager { const std::string& application_id) = 0; /** - * @brief Gets all allowed module types - * @param policy_app_id unique identifier of application - * @param modules list of allowed module types - * @return true if application has allowed modules - */ + * @brief Gets all allowed module types + * @param policy_app_id unique identifier of application + * @param modules list of allowed module types + * @return true if application has allowed modules + */ virtual bool GetModuleTypes(const std::string& policy_app_id, std::vector<std::string>* modules) const = 0; |