diff options
Diffstat (limited to 'src/components/policy/policy_external/include/policy/cache_manager_interface.h')
-rw-r--r-- | src/components/policy/policy_external/include/policy/cache_manager_interface.h | 166 |
1 files changed, 140 insertions, 26 deletions
diff --git a/src/components/policy/policy_external/include/policy/cache_manager_interface.h b/src/components/policy/policy_external/include/policy/cache_manager_interface.h index bb9ce14c7f..980ad42dcd 100644 --- a/src/components/policy/policy_external/include/policy/cache_manager_interface.h +++ b/src/components/policy/policy_external/include/policy/cache_manager_interface.h @@ -39,9 +39,9 @@ #include "policy/policy_table/types.h" #include "policy/pt_representation.h" -#include "policy/usage_statistics/counter.h" -#include "policy/policy_types.h" #include "policy/policy_settings.h" +#include "policy/policy_types.h" +#include "policy/usage_statistics/counter.h" namespace policy_table = rpc::policy_table_interface_base; @@ -166,6 +166,110 @@ class CacheManagerInterface { 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; + + /** + * Initializes a new cloud application with default policies + * Then adds cloud specific policies + * @param app_id application id + * @return true if success + */ + 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 Allows to update 'vin' field in module_meta table. * * @param new 'vin' value. @@ -208,6 +312,15 @@ class CacheManagerInterface { virtual std::string GetLockScreenIconUrl() const = 0; /** + * @brief Get Icon Url used for showing a cloud apps icon before the intial + *registration + * + * @return url which point to the resourse where icon could be + *obtained. + */ + virtual std::string GetIconUrl(const std::string& policy_app_id) const = 0; + + /** * @brief Get allowed number of notifications * depending on application priority. * @param priority Priority of application @@ -754,9 +867,9 @@ class CacheManagerInterface { virtual std::string GetCertificate() const = 0; /** - * @brief Sets decrypted certificate in policy table - * @param certificate content of certificate - */ + * @brief Sets decrypted certificate in policy table + * @param certificate content of certificate + */ virtual void SetDecryptedCertificate(const std::string& certificate) = 0; /** @@ -781,34 +894,35 @@ class CacheManagerInterface { virtual ExternalConsentStatus GetExternalConsentEntities() = 0; /** - * @brief Creates collection of ExternalConsent items known by current - * functional - * groupings and appropiate section - * (disallowed_by_external_consent_entities_on/off) where - * is item is being holded - * @param status Current status containing collection of ExternalConsent items - * @return Collection of ExternalConsent items mapped to list of groups with - * section - * marker where the item is found - */ + * @brief Creates collection of ExternalConsent items known by current + * functional + * groupings and appropiate section + * (disallowed_by_external_consent_entities_on/off) where + * is item is being holded + * @param status Current status containing collection of ExternalConsent items + * @return Collection of ExternalConsent items mapped to list of groups with + * section + * marker where the item is found + */ virtual GroupsByExternalConsentStatus GetGroupsWithSameEntities( const ExternalConsentStatus& status) = 0; /** - * @brief Gets collection of links device-to-application from device_data - * section of policy table if there any application records present, i.e. if - * any specific user consent is present - * @return Collection of device-to-application links - */ + * @brief Gets collection of links device-to-application from device_data + * section of policy table if there any application records present, i.e. if + * any specific user consent is present + * @return Collection of device-to-application links + */ virtual std::map<std::string, std::string> GetKnownLinksFromPT() = 0; /** - * @brief Sets groups permissions affected by customer connectivity settings - * entities status, i.e. groups assigned to particular application on - * particular device which have same entities as current ExternalConsent status - * @param permissions Groups permissions which result current ExternalConsent - * status - */ + * @brief Sets groups permissions affected by customer connectivity settings + * entities status, i.e. groups assigned to particular application on + * particular device which have same entities as current ExternalConsent + * status + * @param permissions Groups permissions which result current ExternalConsent + * status + */ virtual void SetExternalConsentForApp( const PermissionConsent& permissions) = 0; |