summaryrefslogtreecommitdiff
path: root/src/components/include/policy
diff options
context:
space:
mode:
authorJacob Keeler <jacob.keeler@livioradio.com>2019-03-07 22:43:04 -0500
committerjacobkeeler <jacob.keeler@livioradio.com>2019-03-07 22:45:21 -0500
commit9a60799a4f119e2411ee0a0a9d94ae1c8fa668f8 (patch)
tree730bd51dc8503a0d9c24f4e6f5c18ea5c56ddae9 /src/components/include/policy
parent3be4d6a8384f5422a040121c11b448a7dd6901fc (diff)
parent3da1fc5cd3a1873400ea28cb9977926ffa56e34c (diff)
downloadsdl_core-9a60799a4f119e2411ee0a0a9d94ae1c8fa668f8.tar.gz
Merge branch 'feature/cloud_app_transport' into feature/base_app_services_implementation
Diffstat (limited to 'src/components/include/policy')
-rw-r--r--src/components/include/policy/policy_external/policy/policy_listener.h10
-rw-r--r--src/components/include/policy/policy_external/policy/policy_manager.h27
-rw-r--r--src/components/include/policy/policy_regular/policy/policy_listener.h10
-rw-r--r--src/components/include/policy/policy_regular/policy/policy_manager.h27
4 files changed, 70 insertions, 4 deletions
diff --git a/src/components/include/policy/policy_external/policy/policy_listener.h b/src/components/include/policy/policy_external/policy/policy_listener.h
index c446c87d1b..8299d019f5 100644
--- a/src/components/include/policy/policy_external/policy/policy_listener.h
+++ b/src/components/include/policy/policy_external/policy/policy_listener.h
@@ -115,6 +115,16 @@ class PolicyListener {
virtual void OnCertificateUpdated(const std::string& certificate_data) = 0;
/**
+ * @brief OnAuthTokenUpdated the callback which signals if an app's auth token
+ * field has been updated during a PTU
+ *
+ * @param policy_app_id the policy app id tied to the updated field.
+ * @param auth_token the value of the updated field.
+ */
+ virtual void OnAuthTokenUpdated(const std::string& policy_app_id,
+ const std::string& auth_token) = 0;
+
+ /**
* @brief OnPTUFinishedd the callback which signals PTU has finished
*
* @param ptu_result the result from the PTU - true if successful,
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 e7aefe9f6c..80365f10ab 100644
--- a/src/components/include/policy/policy_external/policy/policy_manager.h
+++ b/src/components/include/policy/policy_external/policy/policy_manager.h
@@ -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;
@@ -546,7 +555,7 @@ class PolicyManager : public usage_statistics::StatisticsManager {
* @param hybrid_app_preference Filled with the hybrid app preference for the
* cloud application set by the user
*/
- virtual void GetCloudAppParameters(
+ virtual bool GetCloudAppParameters(
const std::string& policy_app_id,
bool& enabled,
std::string& endpoint,
@@ -584,6 +593,20 @@ class PolicyManager : public usage_statistics::StatisticsManager {
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
diff --git a/src/components/include/policy/policy_regular/policy/policy_listener.h b/src/components/include/policy/policy_regular/policy/policy_listener.h
index 3f6f555bcc..56e674e81b 100644
--- a/src/components/include/policy/policy_regular/policy/policy_listener.h
+++ b/src/components/include/policy/policy_regular/policy/policy_listener.h
@@ -113,6 +113,16 @@ class PolicyListener {
virtual void OnCertificateUpdated(const std::string& certificate_data) = 0;
/**
+ * @brief OnAuthTokenUpdated the callback which signals if an app's auth token
+ * field has been updated during a PTU
+ *
+ * @param policy_app_id the policy app id tied to the updated field.
+ * @param auth_token the value of the updated field.
+ */
+ virtual void OnAuthTokenUpdated(const std::string& policy_app_id,
+ const std::string& auth_token) = 0;
+
+ /**
* Gets devices ids by policy application id
* @param policy_app_id
* @return list devices ids
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 e4ee95fda0..bcb55ed681 100644
--- a/src/components/include/policy/policy_regular/policy/policy_manager.h
+++ b/src/components/include/policy/policy_regular/policy/policy_manager.h
@@ -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
@@ -526,7 +535,7 @@ class PolicyManager : public usage_statistics::StatisticsManager {
* @param hybrid_app_preference Filled with the hybrid app preference for the
* cloud application set by the user
*/
- virtual void GetCloudAppParameters(
+ virtual bool GetCloudAppParameters(
const std::string& policy_app_id,
bool& enabled,
std::string& endpoint,
@@ -565,6 +574,20 @@ class PolicyManager : public usage_statistics::StatisticsManager {
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