diff options
4 files changed, 22 insertions, 33 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 bac58235cb..feeac722b9 100644 --- a/src/components/include/policy/policy_external/policy/policy_listener.h +++ b/src/components/include/policy/policy_external/policy/policy_listener.h @@ -155,11 +155,6 @@ class PolicyListener { virtual void OnUpdateHMILevel(const std::string& device_id, const std::string& policy_app_id, const std::string& hmi_level) = 0; - /** - * @brief Signal that country_consent field was updated during PTU - * @param new_consent New value of country_consent - */ - virtual void OnRemoteAllowedChanged(bool new_consent) = 0; /** * @brief Notifies Remote apps about change in permissions 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 bfb9f94c6d..7d61a4deab 100644 --- a/src/components/policy/policy_external/src/access_remote_impl.cc +++ b/src/components/policy/policy_external/src/access_remote_impl.cc @@ -155,30 +155,6 @@ bool AccessRemoteImpl::CompareParameters( return input->empty(); } -void AccessRemoteImpl::Allow(const Subject& who, const Object& what) { - LOG4CXX_AUTO_TRACE(logger_); - acl_[what][who] = TypeAccess::kAllowed; -} - -void AccessRemoteImpl::Deny(const Subject& who, const Object& what) { - LOG4CXX_AUTO_TRACE(logger_); - acl_[what][who] = TypeAccess::kDisallowed; -} - -void AccessRemoteImpl::Reset(const Subject& who) { - LOG4CXX_AUTO_TRACE(logger_); - std::for_each(acl_.begin(), acl_.end(), Erase(who)); -} - -void AccessRemoteImpl::Reset(const Object& what) { - LOG4CXX_AUTO_TRACE(logger_); - acl_.erase(what); -} - -void AccessRemoteImpl::Reset() { - acl_.clear(); -} - void AccessRemoteImpl::SetDefaultHmiTypes(const Subject& who, const std::vector<int>& hmi_types) { LOG4CXX_AUTO_TRACE(logger_); diff --git a/src/components/policy/policy_external/src/policy_table/enums.cc b/src/components/policy/policy_external/src/policy_table/enums.cc index fc108217c4..168ff86b27 100644 --- a/src/components/policy/policy_external/src/policy_table/enums.cc +++ b/src/components/policy/policy_external/src/policy_table/enums.cc @@ -467,6 +467,10 @@ const char* EnumToJsonString(AppHMIType val) { return "TESTING"; case AHT_SYSTEM: return "SYSTEM"; + case AHT_PROJECTION: + return "PROJECTION"; + case AHT_REMOTE_CONTROL: + return "REMOTE_CONTROL"; default: return ""; } @@ -684,10 +688,6 @@ bool EnumFromJsonString(const std::string& literal, RequestType* result) { *result = RT_DRIVER_PROFILE; return true; } -} -else if ("REMOTE_CONTROL" == literal) { - *result = AHT_REMOTE_CONTROL; - return true; if ("VOICE_SEARCH" == literal) { *result = RT_VOICE_SEARCH; return true; diff --git a/src/components/policy/policy_external/src/sql_pt_representation.cc b/src/components/policy/policy_external/src/sql_pt_representation.cc index 3d5ae4960d..7f67ed82f6 100644 --- a/src/components/policy/policy_external/src/sql_pt_representation.cc +++ b/src/components/policy/policy_external/src/sql_pt_representation.cc @@ -1658,6 +1658,24 @@ bool SQLPTRepresentation::GatherModuleType( return true; } +bool SQLPTRepresentation::SaveRemoteControlDenied(const std::string& app_id, + bool deny) { + LOG4CXX_AUTO_TRACE(logger_); + dbms::SQLQuery query(db()); + if (!query.Prepare(sql_pt::kUpdateRemoteControlDenied)) { + LOG4CXX_WARN(logger_, "Incorrect update statement for remote control flag"); + return false; + } + LOG4CXX_DEBUG(logger_, "App: " << app_id << std::boolalpha << " - " << deny); + query.Bind(0, deny); + query.Bind(1, app_id); + if (!query.Exec()) { + LOG4CXX_WARN(logger_, "Incorrect update remote control flag."); + return false; + } + return true; +} + bool SQLPTRepresentation::SaveModuleType( const std::string& app_id, const policy_table::ModuleTypes& types) { dbms::SQLQuery query(db()); |