diff options
author | jacobkeeler <jacob.keeler@livioradio.com> | 2018-11-15 15:54:08 -0500 |
---|---|---|
committer | ShobhitAd <adlakhashobhit@gmail.com> | 2018-11-16 13:40:42 -0500 |
commit | 2360fbdd7d634214a4ea86864bf7acfed0bc646d (patch) | |
tree | f1b0086deb2e244acb4b2cbfd7806a7da8cb1bc3 /src/components/policy/policy_external/src | |
parent | 07e2490fcec48c6e4937ed3f5c8db150f7327a51 (diff) | |
download | sdl_core-2360fbdd7d634214a4ea86864bf7acfed0bc646d.tar.gz |
Address review comments
Diffstat (limited to 'src/components/policy/policy_external/src')
-rw-r--r-- | src/components/policy/policy_external/src/cache_manager.cc | 12 | ||||
-rw-r--r-- | src/components/policy/policy_external/src/policy_manager_impl.cc | 16 |
2 files changed, 15 insertions, 13 deletions
diff --git a/src/components/policy/policy_external/src/cache_manager.cc b/src/components/policy/policy_external/src/cache_manager.cc index 116b315755..dc0838d429 100644 --- a/src/components/policy/policy_external/src/cache_manager.cc +++ b/src/components/policy/policy_external/src/cache_manager.cc @@ -1403,8 +1403,9 @@ void CacheManager::GetEnabledCloudApps( } } -const bool CacheManager::GetCloudAppParameters( +void CacheManager::GetCloudAppParameters( const std::string& policy_app_id, + bool& enabled, std::string& endpoint, std::string& certificate, std::string& auth_token, @@ -1418,21 +1419,20 @@ const bool CacheManager::GetCloudAppParameters( auto app_policy = (*policy_iter).second; endpoint = app_policy.endpoint.is_initialized() ? *app_policy.endpoint : std::string(); - certificate = app_policy.certificate.is_initialized() - ? *app_policy.certificate - : std::string(); auth_token = app_policy.auth_token.is_initialized() ? *app_policy.auth_token : std::string(); cloud_transport_type = app_policy.cloud_transport_type.is_initialized() ? *app_policy.cloud_transport_type : std::string(); + certificate = app_policy.certificate.is_initialized() + ? *app_policy.certificate + : std::string(); hybrid_app_preference = app_policy.hybrid_app_preference.is_initialized() ? EnumToJsonString(*app_policy.hybrid_app_preference) : std::string(); - return app_policy.enabled.is_initialized() && *app_policy.enabled; + enabled = app_policy.enabled.is_initialized() && *app_policy.enabled; } - return false; } void CacheManager::SetCloudAppEnabled(const std::string& policy_app_id, diff --git a/src/components/policy/policy_external/src/policy_manager_impl.cc b/src/components/policy/policy_external/src/policy_manager_impl.cc index 31cc212254..df474268ba 100644 --- a/src/components/policy/policy_external/src/policy_manager_impl.cc +++ b/src/components/policy/policy_external/src/policy_manager_impl.cc @@ -730,19 +730,21 @@ void PolicyManagerImpl::GetEnabledCloudApps( cache_->GetEnabledCloudApps(enabled_apps); } -const bool PolicyManagerImpl::GetCloudAppParameters( +void PolicyManagerImpl::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 { - return cache_->GetCloudAppParameters(policy_app_id, - endpoint, - certificate, - auth_token, - cloud_transport_type, - hybrid_app_preference); + cache_->GetCloudAppParameters(policy_app_id, + enabled, + endpoint, + certificate, + auth_token, + cloud_transport_type, + hybrid_app_preference); } void PolicyManagerImpl::SetCloudAppEnabled(const std::string& policy_app_id, |