diff options
author | AKalinich-Luxoft <AKalinich@luxoft.com> | 2017-08-30 13:51:48 +0300 |
---|---|---|
committer | AKalinich-Luxoft <AKalinich@luxoft.com> | 2017-08-30 17:20:20 +0300 |
commit | 356f6fbb8f2c268ad22f2199419a474245e12137 (patch) | |
tree | 98af6777270bd5105be0610ec992bb8ba60abf8d /src | |
parent | 32cbfcb21153b03a883f145c1c67c29d611bb806 (diff) | |
download | sdl_core-356f6fbb8f2c268ad22f2199419a474245e12137.tar.gz |
Added/updated description in AccessRemote classes for policy regular
Diffstat (limited to 'src')
-rw-r--r-- | src/components/policy/policy_regular/include/policy/access_remote.h | 42 | ||||
-rw-r--r-- | src/components/policy/policy_regular/include/policy/access_remote_impl.h | 14 |
2 files changed, 30 insertions, 26 deletions
diff --git a/src/components/policy/policy_regular/include/policy/access_remote.h b/src/components/policy/policy_regular/include/policy/access_remote.h index e598e4e4f1..7b7cf57d5f 100644 --- a/src/components/policy/policy_regular/include/policy/access_remote.h +++ b/src/components/policy/policy_regular/include/policy/access_remote.h @@ -62,52 +62,52 @@ class AccessRemote { public: virtual ~AccessRemote() {} /** - * Checks permissions for module - * @param app_id application ID - * @param module type - * @return true if allowed + * @brief CheckModuleType check if module type is allowed for application + * @param app_id application id + * @param module module + * @return true if allowed, if not - false */ virtual bool CheckModuleType(const PTString& app_id, policy_table::ModuleType module) const = 0; /** - * Sets HMI types if application has default policy permissions - * @param who subject - * @param hmi_types list of HMI types + * @brief SetDefaultHmiTypes setup default hmi typed for application + * @param who application on specific device + * @param hmi_types hmi types list */ virtual void SetDefaultHmiTypes(const Subject& who, const std::vector<int>& hmi_types) = 0; /** - * Gets groups - * @param who subject + * @brief GetGroups return list of groups for applicaiton + * @param who application on specific device * @return list of groups */ virtual const policy_table::Strings& GetGroups(const Subject& who) = 0; /** - * Gets permissions for application - * @param device_id - * @param app_id - * @param group_types - * @return true if success + * @brief GetPermissionsForApp read list of permissions for application + * @param device_id device + * @param app_id application + * @param group_types output parameter for permissions + * @return true */ virtual bool GetPermissionsForApp(const std::string& device_id, const std::string& app_id, FunctionalIdType& group_types) = 0; /** - * Checks if application has remote functionality - * @param who subject - * @return true if application uses remote control + * @brief IsAppRemoteControl check is app is remote controll + * @param who application on specific device + * @return true is remote controll aotherwise return false */ virtual bool IsAppRemoteControl(const Subject& who) = 0; /** - * Gets all allowed module types - * @param app_id unique identifier of application - * @param list of allowed module types - * @return true if application has allowed modules + * @brief GetModuleTypes get list of module types of application + * @param policy_app_id application id + * @param modules output parameter for module types + * @return true on success otherwise false */ virtual bool GetModuleTypes(const std::string& policy_app_id, std::vector<std::string>* modules) = 0; diff --git a/src/components/policy/policy_regular/include/policy/access_remote_impl.h b/src/components/policy/policy_regular/include/policy/access_remote_impl.h index 018bbc3e4e..694b680374 100644 --- a/src/components/policy/policy_regular/include/policy/access_remote_impl.h +++ b/src/components/policy/policy_regular/include/policy/access_remote_impl.h @@ -45,8 +45,6 @@ namespace policy { class AccessRemoteImpl : public AccessRemote { public: - typedef std::map<Subject, policy_table::AppHMITypes> HMIList; - AccessRemoteImpl(); explicit AccessRemoteImpl(utils::SharedPtr<CacheManager> cache); /** @@ -136,13 +134,19 @@ class AccessRemoteImpl : public AccessRemote { */ bool CompareParameters(const policy_table::Strings& parameters, RemoteControlParams* input) const; + + /** + * @brief cache_ contains pointer to cache manager instance + */ utils::SharedPtr<CacheManager> cache_; + + /** + * @brief hmi_types_ contains list of default HMI types for applications + */ + typedef std::map<Subject, policy_table::AppHMITypes> HMIList; HMIList hmi_types_; #ifdef BUILD_TESTS - friend struct Erase; - friend struct IsTypeAccess; - FRIEND_TEST(AccessRemoteImplTest, KeyMapTest); FRIEND_TEST(AccessRemoteImplTest, Allow); FRIEND_TEST(AccessRemoteImplTest, Deny); |