From 59f437dc8608e1ec54c517416a39860d9a7be3b8 Mon Sep 17 00:00:00 2001 From: Alexander Kutsan Date: Thu, 10 Aug 2017 14:07:09 +0300 Subject: Implementation of Remote Control plugin Stype changes after integration Fix policy handler remote unit tests --- .../include/policy/sql_pt_representation.h | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'src/components/policy/policy_regular/include/policy/sql_pt_representation.h') diff --git a/src/components/policy/policy_regular/include/policy/sql_pt_representation.h b/src/components/policy/policy_regular/include/policy/sql_pt_representation.h index bd867389ab..e152c040b1 100644 --- a/src/components/policy/policy_regular/include/policy/sql_pt_representation.h +++ b/src/components/policy/policy_regular/include/policy/sql_pt_representation.h @@ -97,6 +97,31 @@ class SQLPTRepresentation : public virtual PTRepresentation { } #endif // BUILD_TESTS protected: +#ifdef SDL_REMOTE_CONTROL + enum TypeAccess { kAllowed, kManual }; + bool GatherAppGroupPrimary(const std::string& app_id, + policy_table::Strings* app_groups) const; + bool GatherAppGroupNonPrimary(const std::string& app_id, + policy_table::Strings* app_groups) const; + bool GatherModuleType(const std::string& app_id, + policy_table::ModuleTypes* module_types) const; + bool GatherRemoteControlDenied(const std::string& app_id, bool* denied) const; + bool GatherAccessModule(TypeAccess access, + policy_table::AccessModules* modules) const; + bool GatherRemoteRpc(int module_id, policy_table::RemoteRpcs* rpcs) const; + bool SaveAppGroupPrimary(const std::string& app_id, + const policy_table::Strings& app_groups); + bool SaveAppGroupNonPrimary(const std::string& app_id, + const policy_table::Strings& app_groups); + bool SaveModuleType(const std::string& app_id, + const policy_table::ModuleTypes& types); + bool SaveRemoteControlDenied(const std::string& app_id, bool deny); + + bool SaveAccessModule(TypeAccess access, + const policy_table::AccessModules& modules); + bool SaveRemoteRpc(int module_id, const policy_table::RemoteRpcs& rpcs); +#endif // SDL_REMOTE_CONTROL + virtual void GatherModuleMeta(policy_table::ModuleMeta* meta) const; virtual void GatherModuleConfig(policy_table::ModuleConfig* config) const; virtual bool GatherUsageAndErrorCounts( -- cgit v1.2.1