diff options
Diffstat (limited to 'src')
3 files changed, 12 insertions, 17 deletions
diff --git a/src/components/policy/policy_external/src/access_remote_impl.cc b/src/components/policy/policy_external/src/access_remote_impl.cc index ced87eb515..d042d8c402 100644 --- a/src/components/policy/policy_external/src/access_remote_impl.cc +++ b/src/components/policy/policy_external/src/access_remote_impl.cc @@ -167,7 +167,7 @@ void AccessRemoteImpl::SetDefaultHmiTypes(const ApplicationOnDevice& who, } const policy_table::AppHMITypes& AccessRemoteImpl::HmiTypes( - const Subject& who) { + const ApplicationOnDevice& who) { LOG4CXX_AUTO_TRACE(logger_); if (cache_->IsDefaultPolicy(who.app_id)) { return hmi_types_[who]; @@ -177,12 +177,13 @@ const policy_table::AppHMITypes& AccessRemoteImpl::HmiTypes( } } -const policy_table::Strings& AccessRemoteImpl::GetGroups(const Subject& who) { +const policy_table::Strings& AccessRemoteImpl::GetGroups( + const ApplicationOnDevice& who) { LOG4CXX_AUTO_TRACE(logger_); return cache_->GetGroups(who.app_id); } -bool AccessRemoteImpl::IsAppRemoteControl(const Subject& who) { +bool AccessRemoteImpl::IsAppRemoteControl(const ApplicationOnDevice& who) { const policy_table::AppHMITypes& hmi_types = HmiTypes(who); return std::find(hmi_types.begin(), hmi_types.end(), @@ -226,7 +227,7 @@ extern std::ostream& operator<<(std::ostream& output, void AccessRemoteImpl::GetGroupsIds(const std::string& device_id, const std::string& app_id, FunctionalGroupIDs& groups_ids) { - Subject who = {device_id, app_id}; + ApplicationOnDevice who = {device_id, app_id}; const policy_table::Strings& groups = GetGroups(who); LOG4CXX_DEBUG(logger_, "Groups Names: " << groups); groups_ids.resize(groups.size()); diff --git a/src/components/policy/policy_external/test/include/policy/mock_access_remote.h b/src/components/policy/policy_external/test/include/policy/mock_access_remote.h index 3eed880c0b..486c27590d 100644 --- a/src/components/policy/policy_external/test/include/policy/mock_access_remote.h +++ b/src/components/policy/policy_external/test/include/policy/mock_access_remote.h @@ -39,22 +39,19 @@ namespace test { namespace components { namespace access_remote_test { -class MockSubject : public policy::Subject { - public: -}; - class MockAccessRemote : public policy::AccessRemote { public: MOCK_CONST_METHOD3( FindGroup, - policy::PTString(const policy::Subject& who, + policy::PTString(const policy::ApplicationOnDevice& who, const policy::PTString& rpc, const policy::RemoteControlParams& params)); MOCK_METHOD2(SetDefaultHmiTypes, - void(const policy::Subject& who, + void(const policy::ApplicationOnDevice& who, const std::vector<int>& hmi_types)); - MOCK_METHOD1(GetGroups, - const policy_table::Strings&(const policy::Subject& who)); + MOCK_METHOD1( + GetGroups, + const policy_table::Strings&(const policy::ApplicationOnDevice& who)); MOCK_METHOD3(GetPermissionsForApp, bool(const std::string& device_id, const std::string& app_id, @@ -62,7 +59,8 @@ class MockAccessRemote : public policy::AccessRemote { MOCK_CONST_METHOD2(CheckModuleType, bool(const policy::PTString& app_id, policy_table::ModuleType module)); - MOCK_METHOD1(IsAppRemoteControl, bool(const policy::Subject& who)); + MOCK_METHOD1(IsAppRemoteControl, + bool(const policy::ApplicationOnDevice& who)); MOCK_METHOD2(GetModuleTypes, bool(const std::string& application_id, std::vector<std::string>* modules)); diff --git a/src/components/policy/policy_regular/test/include/policy/mock_access_remote.h b/src/components/policy/policy_regular/test/include/policy/mock_access_remote.h index 8dc3e2d3a0..0b64ff645e 100644 --- a/src/components/policy/policy_regular/test/include/policy/mock_access_remote.h +++ b/src/components/policy/policy_regular/test/include/policy/mock_access_remote.h @@ -39,10 +39,6 @@ namespace test { namespace components { namespace access_remote_test { -class MockSubject : public policy::ApplicationOnDevice { - public: -}; - class MockAccessRemote : public policy::AccessRemote { public: MOCK_CONST_METHOD3( |