diff options
Diffstat (limited to 'src/components/policy/policy_regular/src/cache_manager.cc')
-rw-r--r-- | src/components/policy/policy_regular/src/cache_manager.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/components/policy/policy_regular/src/cache_manager.cc b/src/components/policy/policy_regular/src/cache_manager.cc index 1edb79501b..6902a5fe81 100644 --- a/src/components/policy/policy_regular/src/cache_manager.cc +++ b/src/components/policy/policy_regular/src/cache_manager.cc @@ -124,6 +124,20 @@ const policy_table::Strings& CacheManager::GetGroups(const PTString& app_id) { return pt_->policy_table.app_policies_section.apps[app_id].groups; } +const policy_table::Strings CacheManager::GetPolicyAppNames() const { + LOG4CXX_AUTO_TRACE(logger_); + sync_primitives::AutoLock auto_lock(cache_lock_); + + const auto apps = pt_->policy_table.app_policies_section.apps; + + policy_table::Strings policy_app_ids; + for (const auto& app : apps) { + policy_app_ids.push_back(app.first); + } + + return policy_app_ids; +} + bool CacheManager::CanAppKeepContext(const std::string& app_id) const { CACHE_MANAGER_CHECK(false); bool result = true; |