diff options
author | sniukalov <sniukalov@luxoft.com> | 2019-06-27 21:35:50 +0300 |
---|---|---|
committer | sniukalov <sniukalov@luxoft.com> | 2019-08-14 14:59:40 +0300 |
commit | 9487796ee0aded60b45d2a9bb729c0fc6010d0a2 (patch) | |
tree | 1d09d599d0afc6fc5b45a5f7099e9b013d3ffbb9 /src/components/application_manager | |
parent | caa5911c0c976f432dd6e246555ba97bbc1e3bc4 (diff) | |
download | sdl_core-9487796ee0aded60b45d2a9bb729c0fc6010d0a2.tar.gz |
Removed DEPRECATED methods.
Diffstat (limited to 'src/components/application_manager')
5 files changed, 1 insertions, 217 deletions
diff --git a/src/components/application_manager/include/application_manager/application_manager_impl.h b/src/components/application_manager/include/application_manager/application_manager_impl.h index b8de08b7b6..add099f975 100644 --- a/src/components/application_manager/include/application_manager/application_manager_impl.h +++ b/src/components/application_manager/include/application_manager/application_manager_impl.h @@ -1036,17 +1036,6 @@ class ApplicationManagerImpl const connection_handler::DeviceHandle handle) const OVERRIDE; /** - * DEPRECATED - * @brief IsAppInReconnectMode check if application belongs to session - * affected by transport switching at the moment by checking internal - * waiting list prepared on switching start - * @param policy_app_id Application id - * @return True if application is in the waiting list, otherwise - false - */ - DEPRECATED bool IsAppInReconnectMode( - const std::string& policy_app_id) const FINAL; - - /** * @brief IsAppInReconnectMode check if application belongs to session * affected by transport switching at the moment by checking internal * waiting list prepared on switching start diff --git a/src/components/application_manager/include/application_manager/policies/policy_handler.h b/src/components/application_manager/include/application_manager/policies/policy_handler.h index 275dd84ac7..3422a2a2d2 100644 --- a/src/components/application_manager/include/application_manager/policies/policy_handler.h +++ b/src/components/application_manager/include/application_manager/policies/policy_handler.h @@ -117,16 +117,6 @@ class PolicyHandler : public PolicyHandlerInterface, const std::string& device_id) const OVERRIDE; /** - * DEPRECATED - * @brief Sets HMI default type for specified application - * @param application_id ID application - * @param app_types list of HMI types - */ - DEPRECATED void SetDefaultHmiTypes( - const std::string& application_id, - const smart_objects::SmartObject* app_types) OVERRIDE; - - /** * @brief Sets HMI default type for specified application * @param device_handle device identifier * @param application_id ID application @@ -192,8 +182,6 @@ class PolicyHandler : public PolicyHandlerInterface, bool GetModuleTypes(const std::string& policy_app_id, std::vector<std::string>* modules) const OVERRIDE; - DEPRECATED bool GetDefaultHmi(const std::string& policy_app_id, - std::string* default_hmi) const OVERRIDE; bool GetDefaultHmi(const std::string& device_id, const std::string& policy_app_id, std::string* default_hmi) const OVERRIDE; @@ -532,18 +520,6 @@ class PolicyHandler : public PolicyHandlerInterface, virtual void GetAvailableApps(std::queue<std::string>& apps) OVERRIDE; /** - * DEPRECATED - * @brief Allows to add new or update existed application during - * registration process - * @param application_id The policy aplication id. - * @param hmi_types list of hmi types - * @return function that will notify update manager about new application - */ - DEPRECATED StatusNotifier AddApplication( - const std::string& application_id, - const rpc::policy_table_interface_base::AppHmiTypes& hmi_types) OVERRIDE; - - /** * @brief Allows to add new or update existed application during * registration process * @param device_id device identifier @@ -592,17 +568,6 @@ class PolicyHandler : public PolicyHandlerInterface, void OnAppsSearchCompleted(const bool trigger_ptu) OVERRIDE; /** - * DEPRECATED - * @brief OnAppRegisteredOnMobile allows to handle event when application were - * succesfully registered on mobile device. - * It will send OnAppPermissionSend notification and will try to start PTU. - * - * @param application_id registered application. - */ - DEPRECATED void OnAppRegisteredOnMobile( - const std::string& application_id) OVERRIDE; - - /** * @brief OnAppRegisteredOnMobile allows to handle event when application were * succesfully registered on mobile device. * It will send OnAppPermissionSend notification and will try to start PTU. @@ -614,17 +579,6 @@ class PolicyHandler : public PolicyHandlerInterface, const std::string& application_id) OVERRIDE; /** - * DEPRECATED - * @brief Checks if certain request type is allowed for application - * @param policy_app_id Unique applicaion id - * @param type Request type - * @return true, if allowed, otherwise - false - */ - DEPRECATED bool IsRequestTypeAllowed( - const std::string& policy_app_id, - mobile_apis::RequestType::eType type) const OVERRIDE; - - /** * @brief Checks if certain request type is allowed for application * @param device_handle device identifier * @param policy_app_id Unique applicaion id @@ -663,15 +617,6 @@ class PolicyHandler : public PolicyHandlerInterface, const std::string& policy_app_id) const OVERRIDE; /** - * DEPRECATED - * @brief Gets application request types - * @param policy_app_id Unique application id - * @return request types - */ - DEPRECATED const std::vector<std::string> GetAppRequestTypes( - const std::string& policy_app_id) const OVERRIDE; - - /** * @brief Gets application request types * @param device_id device identifier * @param policy_app_id Unique application id @@ -747,28 +692,6 @@ class PolicyHandler : public PolicyHandlerInterface, private: /** - * DEPRECATED - * @brief Update currently used device id in policies manager for given - * application - * @param policy_app_id Application id - */ - std::string OnCurrentDeviceIdUpdateRequired( - const std::string& policy_app_id) OVERRIDE; - - void OnPendingPermissionChange(const std::string& policy_app_id) OVERRIDE; - - void SendOnAppPermissionsChanged( - const AppPermissions& permissions, - const std::string& policy_app_id) const OVERRIDE; - - void OnPermissionsUpdated(const std::string& policy_app_id, - const Permissions& permissions, - const HMILevel& default_hmi) OVERRIDE; - - void OnPermissionsUpdated(const std::string& policy_app_id, - const Permissions& permissions) OVERRIDE; - - /** * Checks system action of application for permission of keep context * @param system_action system action (see mobile api) * @param policy_app_id unique application id diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_system_request_notification_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_system_request_notification_test.cc index 54c81d7fa9..ffa7203f1f 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_system_request_notification_test.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_system_request_notification_test.cc @@ -174,7 +174,7 @@ TEST_F(OnSystemRequestNotificationTest, Run_InvalidApp_NoNotification) { EXPECT_CALL(app_mngr_, application(kConnectionKey)) .WillOnce(Return(MockAppPtr())); EXPECT_CALL(*mock_app_, policy_app_id()).Times(0); - EXPECT_CALL(mock_policy_handler_, IsRequestTypeAllowed(_, _)).Times(0); + EXPECT_CALL(mock_policy_handler_, IsRequestTypeAllowed(_, _, _)).Times(0); EXPECT_CALL(mock_message_helper_, PrintSmartObject(_)).Times(0); diff --git a/src/components/application_manager/src/application_manager_impl.cc b/src/components/application_manager/src/application_manager_impl.cc index 412b8533ba..fbbcc12249 100644 --- a/src/components/application_manager/src/application_manager_impl.cc +++ b/src/components/application_manager/src/application_manager_impl.cc @@ -121,20 +121,6 @@ bool device_id_comparator(const std::string& device_id, } /** - * DEPRECATED - * @brief policy_app_id_comparator is predicate to compare policy application - * ids - * @param policy_app_id Policy id of application - * @param app Application pointer - * @return True if policy id of application matches to policy id passed - */ -bool policy_app_id_comparator(const std::string& policy_app_id, - ApplicationSharedPtr app) { - DCHECK_OR_RETURN(app, false); - return app->policy_app_id() == policy_app_id; -} - -/** * @brief PolicyAppIdComparator is struct predicate to compare policy * application ids & device * @param device_handle of application @@ -3541,17 +3527,6 @@ bool ApplicationManagerImpl::IsApplicationForbidden( } bool ApplicationManagerImpl::IsAppInReconnectMode( - const std::string& policy_app_id) const { - LOG4CXX_AUTO_TRACE(logger_); - sync_primitives::AutoLock lock(reregister_wait_list_lock_); - return reregister_wait_list_.end() != - std::find_if(reregister_wait_list_.begin(), - reregister_wait_list_.end(), - std::bind1st(std::ptr_fun(&policy_app_id_comparator), - policy_app_id)); -} - -bool ApplicationManagerImpl::IsAppInReconnectMode( const connection_handler::DeviceHandle& device_id, const std::string& policy_app_id) const { LOG4CXX_AUTO_TRACE(logger_); diff --git a/src/components/application_manager/src/policies/policy_handler.cc b/src/components/application_manager/src/policies/policy_handler.cc index 114dd14772..fdbd0ce391 100644 --- a/src/components/application_manager/src/policies/policy_handler.cc +++ b/src/components/application_manager/src/policies/policy_handler.cc @@ -480,22 +480,6 @@ void PolicyHandler::OnDeviceConsentChanged(const std::string& device_id, } void PolicyHandler::SendOnAppPermissionsChanged( - const AppPermissions& permissions, const std::string& policy_app_id) const { - LOG4CXX_AUTO_TRACE(logger_); - LOG4CXX_DEBUG( - logger_, - "PolicyHandler::SendOnAppPermissionsChanged for " << policy_app_id); - ApplicationSharedPtr app = - application_manager_.application_by_policy_id(policy_app_id); - if (app.use_count() == 0) { - LOG4CXX_WARN(logger_, "No app found for policy app id = " << policy_app_id); - return; - } - MessageHelper::SendOnAppPermissionsChangedNotification( - app->app_id(), permissions, application_manager_); -} - -void PolicyHandler::SendOnAppPermissionsChanged( const AppPermissions& permissions, const std::string& device_id, const std::string& policy_app_id) const { @@ -1355,62 +1339,6 @@ void PolicyHandler::PTExchangeAtUserRequest(uint32_t correlation_id) { update_status, correlation_id, application_manager_); } -void PolicyHandler::OnPermissionsUpdated(const std::string& policy_app_id, - const Permissions& permissions, - const HMILevel& default_hmi) { - LOG4CXX_AUTO_TRACE(logger_); - OnPermissionsUpdated(policy_app_id, permissions); - - ApplicationSharedPtr app = - application_manager_.application_by_policy_id(policy_app_id); - if (app.use_count() == 0) { - LOG4CXX_WARN( - logger_, - "Connection_key not found for application_id: " << policy_app_id); - return; - } - - // The application currently not running (i.e. in NONE) should change HMI - // level to default - mobile_apis::HMILevel::eType current_hmi_level = app->hmi_level(); - mobile_apis::HMILevel::eType hmi_level = - MessageHelper::StringToHMILevel(default_hmi); - - if (mobile_apis::HMILevel::INVALID_ENUM == hmi_level) { - LOG4CXX_WARN( - logger_, - "Couldn't convert default hmi level " << default_hmi << " to enum."); - return; - } - if (current_hmi_level == hmi_level) { - LOG4CXX_DEBUG(logger_, "Application already in default hmi state."); - return; - } - switch (current_hmi_level) { - case mobile_apis::HMILevel::HMI_NONE: { - LOG4CXX_INFO(logger_, - "Changing hmi level of application " - << policy_app_id << " to default hmi level " - << default_hmi); - - if (hmi_level == mobile_apis::HMILevel::HMI_FULL) { - application_manager_.state_controller().SetRegularState( - app, hmi_level, true); - } else { - application_manager_.state_controller().SetRegularState( - app, hmi_level, false); - } - break; - } - default: - LOG4CXX_WARN(logger_, - "Application " << policy_app_id - << " is running." - "HMI level won't be changed."); - break; - } -} - void PolicyHandler::OnPermissionsUpdated(const std::string& device_id, const std::string& policy_app_id, const Permissions& permissions, @@ -1467,27 +1395,6 @@ void PolicyHandler::OnPermissionsUpdated(const std::string& device_id, } } -void PolicyHandler::OnPermissionsUpdated(const std::string& policy_app_id, - const Permissions& permissions) { - LOG4CXX_AUTO_TRACE(logger_); - ApplicationSharedPtr app = - application_manager_.application_by_policy_id(policy_app_id); - if (app.use_count() == 0) { - LOG4CXX_WARN( - logger_, - "Connection_key not found for application_id: " << policy_app_id); - return; - } - - MessageHelper::SendOnPermissionsChangeNotification( - app->app_id(), permissions, application_manager_); - - LOG4CXX_DEBUG(logger_, - "Notification sent for application_id: " - << policy_app_id << " and connection_key " - << app->app_id()); -} - void PolicyHandler::OnPermissionsUpdated(const std::string& device_id, const std::string& policy_app_id, const Permissions& permissions) { @@ -2181,16 +2088,6 @@ void PolicyHandler::OnAppsSearchCompleted(const bool trigger_ptu) { policy_manager_->OnAppsSearchCompleted(trigger_ptu); } -void PolicyHandler::OnAppRegisteredOnMobile(const std::string& application_id) { - POLICY_LIB_CHECK_VOID(); - const auto app = - application_manager_.application_by_policy_id(application_id); - if (app.use_count()) { - policy_manager_->OnAppRegisteredOnMobile(app->mac_address(), - application_id); - } -} - void PolicyHandler::OnAppRegisteredOnMobile(const std::string& device_id, const std::string& application_id) { POLICY_LIB_CHECK_VOID(); |