summaryrefslogtreecommitdiff
path: root/src/components/application_manager/src/policies/delegates
diff options
context:
space:
mode:
authorokozlovlux <okozlov@luxoft.com>2017-02-20 19:16:07 +0200
committerokozlovlux <okozlov@luxoft.com>2017-05-17 19:27:11 +0300
commit6a3c65f64fb7e9e5a770476b3f664d57606af33a (patch)
treebc618e0ff31525d9157b1df098a5149efe557720 /src/components/application_manager/src/policies/delegates
parent8aadc5d6d51b49c381fb89fd4b1fbfebec732cc3 (diff)
downloadsdl_core-6a3c65f64fb7e9e5a770476b3f664d57606af33a.tar.gz
Add functionality for External UCS
- added functionality for External UCS: ON by the User - added UTs for policices External UCS: ON by the User - added perstistence for external user consent status received from system Fix issuies for HTTP and PROPRIETARY mode in mock policy handler - fixed issues in mock policy handler - fix coding style
Diffstat (limited to 'src/components/application_manager/src/policies/delegates')
-rw-r--r--src/components/application_manager/src/policies/delegates/app_permission_delegate.cc19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/components/application_manager/src/policies/delegates/app_permission_delegate.cc b/src/components/application_manager/src/policies/delegates/app_permission_delegate.cc
index 5ec184e563..871e96442a 100644
--- a/src/components/application_manager/src/policies/delegates/app_permission_delegate.cc
+++ b/src/components/application_manager/src/policies/delegates/app_permission_delegate.cc
@@ -36,18 +36,35 @@
namespace policy {
CREATE_LOGGERPTR_GLOBAL(logger_, "PolicyHandler")
+#ifdef EXTERNAL_PROPRIETARY_MODE
AppPermissionDelegate::AppPermissionDelegate(
const uint32_t connection_key,
const PermissionConsent& permissions,
+ const ExternalConsentStatus& external_consent_status,
policy::PolicyHandlerInterface& policy_handler)
: connection_key_(connection_key)
, permissions_(permissions)
+ , external_consent_status_(external_consent_status)
, policy_handler_(policy_handler) {}
+#else
+AppPermissionDelegate::AppPermissionDelegate(
+ const uint32_t connection_key,
+ const PermissionConsent& permissions,
+ policy::PolicyHandlerInterface& policy_handler)
+ : connection_key_(connection_key)
+ , permissions_(permissions)
+ , policy_handler_(policy_handler) {}
+#endif
void AppPermissionDelegate::threadMain() {
LOG4CXX_AUTO_TRACE(logger_);
+
+#ifdef EXTERNAL_PROPRIETARY_MODE
policy_handler_.OnAppPermissionConsentInternal(
- connection_key_, ccs_status_, permissions_);
+ connection_key_, external_consent_status_, permissions_);
+#else
+ policy_handler_.OnAppPermissionConsentInternal(connection_key_, permissions_);
+#endif
}
void AppPermissionDelegate::exitThreadMain() {