summaryrefslogtreecommitdiff
path: root/src/components/include/policy/policy_external/policy/policy_manager.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/include/policy/policy_external/policy/policy_manager.h')
-rw-r--r--src/components/include/policy/policy_external/policy/policy_manager.h139
1 files changed, 125 insertions, 14 deletions
diff --git a/src/components/include/policy/policy_external/policy/policy_manager.h b/src/components/include/policy/policy_external/policy/policy_manager.h
index 57f6d2f802..331b579365 100644
--- a/src/components/include/policy/policy_external/policy/policy_manager.h
+++ b/src/components/include/policy/policy_external/policy/policy_manager.h
@@ -37,12 +37,12 @@
#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"
namespace policy {
class PolicySettings;
@@ -109,12 +109,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 PTU is needed, for this PTS has to be formed and sent.
*/
virtual void RequestPTUpdate() = 0;
@@ -509,10 +518,10 @@ class PolicyManager : public usage_statistics::StatisticsManager {
const std::string policy_app_id) const = 0;
/**
- * @brief Gets request subtypes for application
- * @param policy_app_id Unique application id
- * @return request subtypes of application
- */
+ * @brief Gets request subtypes for application
+ * @param policy_app_id Unique application id
+ * @return request subtypes of application
+ */
virtual const std::vector<std::string> GetAppRequestSubTypes(
const std::string& policy_app_id) const = 0;
@@ -523,6 +532,108 @@ 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 Gets meta information
* @return meta information
*/
@@ -596,11 +707,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;