diff options
18 files changed, 0 insertions, 137 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 d8f02a1f2f..7a55332220 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 @@ -299,12 +299,6 @@ class ApplicationManagerImpl bool MakeAppFullScreen(uint32_t app_id); /** - * @brief Subscribes to notification from HMI - * @param hmi_notification string with notification name - */ - void SubscribeToHMINotification(const std::string& hmi_notification) OVERRIDE; - - /** * @brief Checks HMI level and returns true if audio streaming is allowed */ bool IsAudioStreamingAllowed(uint32_t connection_key) const OVERRIDE; diff --git a/src/components/application_manager/include/application_manager/core_service.h b/src/components/application_manager/include/application_manager/core_service.h index e4512b1080..a342df2314 100644 --- a/src/components/application_manager/include/application_manager/core_service.h +++ b/src/components/application_manager/include/application_manager/core_service.h @@ -134,12 +134,6 @@ class CoreService : public Service { std::vector<ApplicationSharedPtr> GetApplications(AppExtensionUID uid) FINAL; /** - * @brief Subscribes to notification from HMI - * @param hmi_notification string with notification name - */ - void SubscribeToHMINotification(const std::string& hmi_notification) FINAL; - - /** * @brief Change hmi level of app and notify it * @param app Application to be changed and notified * @param level New HMI level of app diff --git a/src/components/application_manager/include/application_manager/service.h b/src/components/application_manager/include/application_manager/service.h index 1c34b06209..f6d8cf2efe 100644 --- a/src/components/application_manager/include/application_manager/service.h +++ b/src/components/application_manager/include/application_manager/service.h @@ -119,13 +119,6 @@ class Service { AppExtensionUID uid) = 0; /** - * @brief Subscribes to notification from HMI - * @param hmi_notification string with notification name - */ - virtual void SubscribeToHMINotification( - const std::string& hmi_notification) = 0; - - /** * @brief Change hmi level of app and notify it * @param app Application to be changed and notified * @param level New HMI level of app diff --git a/src/components/application_manager/src/application_manager_impl.cc b/src/components/application_manager/src/application_manager_impl.cc index 8fbd4cb5b5..8fcec4ac1a 100644 --- a/src/components/application_manager/src/application_manager_impl.cc +++ b/src/components/application_manager/src/application_manager_impl.cc @@ -4105,11 +4105,6 @@ bool ApplicationManagerImpl::IsVideoStreamingAllowed( return Compare<eType, EQ, ONE>(app->hmi_level(), HMI_FULL, HMI_LIMITED); } -void ApplicationManagerImpl::SubscribeToHMINotification( - const std::string& hmi_notification) { - hmi_handler_->SubscribeToHMINotification(hmi_notification); -} - void ApplicationManagerImpl::ChangeAppsHMILevel( uint32_t app_id, mobile_apis::HMILevel::eType level) { using namespace mobile_apis::HMILevel; diff --git a/src/components/application_manager/src/core_service.cc b/src/components/application_manager/src/core_service.cc index d0e8bdd5f3..8a699d0404 100644 --- a/src/components/application_manager/src/core_service.cc +++ b/src/components/application_manager/src/core_service.cc @@ -152,13 +152,6 @@ std::vector<ApplicationSharedPtr> CoreService::GetApplications( return result; } -void CoreService::SubscribeToHMINotification( - const std::string& hmi_notification) { - if (!hmi_notification.empty()) { - application_manager_.SubscribeToHMINotification(hmi_notification); - } -} - void CoreService::ChangeNotifyHMILevel(ApplicationSharedPtr app, mobile_apis::HMILevel::eType level) { application_manager_.ChangeAppsHMILevel(app->app_id(), level); diff --git a/src/components/functional_module/src/generic_module.cc b/src/components/functional_module/src/generic_module.cc index 14a083ca6a..142b1ef58c 100644 --- a/src/components/functional_module/src/generic_module.cc +++ b/src/components/functional_module/src/generic_module.cc @@ -45,12 +45,6 @@ void GenericModule::set_service(application_manager::ServicePtr service) { void GenericModule::OnServiceStateChanged(ServiceState state) { state_ = state; - - if (HMI_ADAPTER_INITIALIZED == state_) { - // We must subscribe to necessary HMI notifications - service_->SubscribeToHMINotification(hmi_api::on_interior_vehicle_data); - service_->SubscribeToHMINotification(hmi_api::on_remote_control_settings); - } } application_manager::ServicePtr GenericModule::service() { diff --git a/src/components/functional_module/test/include/mock_service.h b/src/components/functional_module/test/include/mock_service.h index 947896051f..53ec993db3 100644 --- a/src/components/functional_module/test/include/mock_service.h +++ b/src/components/functional_module/test/include/mock_service.h @@ -47,8 +47,6 @@ class MockService : public Service { MOCK_METHOD0(GetNextCorrelationID, uint32_t()); MOCK_METHOD1(GetApplications, std::vector<ApplicationSharedPtr>(AppExtensionUID)); - MOCK_METHOD1(SubscribeToHMINotification, - void(const std::string& hmi_notification)); MOCK_METHOD2(ChangeNotifyHMILevel, void(ApplicationSharedPtr app, mobile_apis::HMILevel::eType level)); diff --git a/src/components/functional_module/test/src/generic_module_test.cc b/src/components/functional_module/test/src/generic_module_test.cc index b052050cdb..71d8325f6d 100644 --- a/src/components/functional_module/test/src/generic_module_test.cc +++ b/src/components/functional_module/test/src/generic_module_test.cc @@ -24,37 +24,6 @@ TEST(GenericModuleTest, SetService) { EXPECT_EQ(exp_service.get(), out_service.get()); } -TEST(GenericModuleTest, OnServiceStateChangedFail) { - DriverGenericModuleTest module(18); - MockService* mock_service = new MockService(); - ServicePtr exp_service(mock_service); - module.set_service(exp_service); - - EXPECT_CALL(*mock_service, SubscribeToHMINotification(_)).Times(0); - - module.OnServiceStateChanged(LOWVOLTAGE); -} - -TEST(GenericModuleTest, OnServiceStateChangedPass) { - DriverGenericModuleTest module(18); - MockService* mock_service = new MockService(); - ServicePtr exp_service(mock_service); - module.set_service(exp_service); - - EXPECT_CALL(*mock_service, SubscribeToHMINotification(_)).Times(2); - - module.OnServiceStateChanged(HMI_ADAPTER_INITIALIZED); -} - -TEST(GenericModuleTest, AddObserver) { - DriverGenericModuleTest module(18); - MockModuleObserver observer; - module.AddObserver(&observer); - const DriverGenericModuleTest::Observers& full = module.observers(); - ASSERT_EQ(1u, full.size()); - EXPECT_EQ(&observer, full[0]); -} - TEST(GenericModuleTest, RemoveObserver) { DriverGenericModuleTest module(18); MockModuleObserver* observer = new MockModuleObserver(); diff --git a/src/components/hmi_message_handler/include/hmi_message_handler/hmi_message_adapter_impl.h b/src/components/hmi_message_handler/include/hmi_message_handler/hmi_message_adapter_impl.h index 1a28c89bda..f2a5ce2dd8 100644 --- a/src/components/hmi_message_handler/include/hmi_message_handler/hmi_message_adapter_impl.h +++ b/src/components/hmi_message_handler/include/hmi_message_handler/hmi_message_adapter_impl.h @@ -53,13 +53,6 @@ class HMIMessageAdapterImpl : public HMIMessageAdapter { */ ~HMIMessageAdapterImpl(); -#ifdef SDL_REMOTE_CONTROL - /** - * @brief Subscribes to notification from HMI - * @param hmi_notification string with notification name - */ - void SubscribeToHMINotification(const std::string& hmi_notification) OVERRIDE; -#endif // SDL_REMOTE_CONTROL protected: virtual HMIMessageHandler* handler() const { return handler_; diff --git a/src/components/hmi_message_handler/include/hmi_message_handler/hmi_message_handler_impl.h b/src/components/hmi_message_handler/include/hmi_message_handler/hmi_message_handler_impl.h index daba87e738..0d85c30fc2 100644 --- a/src/components/hmi_message_handler/include/hmi_message_handler/hmi_message_handler_impl.h +++ b/src/components/hmi_message_handler/include/hmi_message_handler/hmi_message_handler_impl.h @@ -96,13 +96,6 @@ class HMIMessageHandlerImpl : public HMIMessageHandler, void AddHMIMessageAdapter(HMIMessageAdapter* adapter) OVERRIDE; void RemoveHMIMessageAdapter(HMIMessageAdapter* adapter) OVERRIDE; -#ifdef SDL_REMOTE_CONTROL - /** - * @brief Subscribes to notification from HMI - * @param hmi_notification string with notification name - */ - void SubscribeToHMINotification(const std::string& hmi_notification) OVERRIDE; -#endif // SDL_REMOTE_CONTROL const HMIMessageHandlerSettings& get_settings() const OVERRIDE; #ifdef BUILD_TESTS diff --git a/src/components/hmi_message_handler/include/hmi_message_handler/messagebroker_adapter.h b/src/components/hmi_message_handler/include/hmi_message_handler/messagebroker_adapter.h index 8acc8fb207..f582cb2b81 100644 --- a/src/components/hmi_message_handler/include/hmi_message_handler/messagebroker_adapter.h +++ b/src/components/hmi_message_handler/include/hmi_message_handler/messagebroker_adapter.h @@ -76,13 +76,6 @@ class MessageBrokerAdapter : public HMIMessageAdapterImpl, void* SubscribeAndBeginReceiverThread(void* param); -#ifdef SDL_REMOTE_CONTROL - /** - * @brief Subscribes to notification from HMI - * @param hmi_notification string with notification name - */ - void SubscribeToHMINotification(const std::string& hmi_notification) FINAL; -#endif // SDL_REMOTE_CONTROL protected: void ProcessRecievedFromMB(Json::Value& root); diff --git a/src/components/hmi_message_handler/src/hmi_message_adapter_impl.cc b/src/components/hmi_message_handler/src/hmi_message_adapter_impl.cc index e58c5a8fb6..48874618a0 100644 --- a/src/components/hmi_message_handler/src/hmi_message_adapter_impl.cc +++ b/src/components/hmi_message_handler/src/hmi_message_adapter_impl.cc @@ -40,10 +40,4 @@ HMIMessageAdapterImpl::~HMIMessageAdapterImpl() { handler_ = 0; } -#ifdef SDL_REMOTE_CONTROL -void HMIMessageAdapterImpl::SubscribeToHMINotification( - const std::string& hmi_notification) { - // TODO(SL): Find an immplementation -} -#endif // SDL_REMOTE_CONTROL } // namespace hmi_message_handler diff --git a/src/components/hmi_message_handler/src/hmi_message_handler_impl.cc b/src/components/hmi_message_handler/src/hmi_message_handler_impl.cc index 654b67de7f..70865f7771 100644 --- a/src/components/hmi_message_handler/src/hmi_message_handler_impl.cc +++ b/src/components/hmi_message_handler/src/hmi_message_handler_impl.cc @@ -132,16 +132,5 @@ void HMIMessageHandlerImpl::Handle(const impl::MessageToHmi message) { (*it)->SendMessageToHMI(message); } } -#ifdef SDL_REMOTE_CONTROL -void HMIMessageHandlerImpl::SubscribeToHMINotification( - const std::string& hmi_notification) { - sync_primitives::AutoLock lock(message_adapters_locker_); - for (std::set<HMIMessageAdapter*>::iterator it = message_adapters_.begin(); - it != message_adapters_.end(); - ++it) { - (*it)->SubscribeToHMINotification(hmi_notification); - } -} -#endif // SDL_REMOTE_CONTROL } // namespace hmi_message_handler diff --git a/src/components/hmi_message_handler/src/messagebroker_adapter.cc b/src/components/hmi_message_handler/src/messagebroker_adapter.cc index 6702b10cee..66c0fa3dc7 100644 --- a/src/components/hmi_message_handler/src/messagebroker_adapter.cc +++ b/src/components/hmi_message_handler/src/messagebroker_adapter.cc @@ -141,12 +141,6 @@ void MessageBrokerAdapter::SubscribeTo() { LOG4CXX_INFO(logger_, "Subscribed to notifications."); } -#ifdef SDL_REMOTE_CONTROL -void MessageBrokerAdapter::SubscribeToHMINotification( - const std::string& hmi_notification) { - MessageBrokerController::subscribeTo(hmi_notification); -} -#endif void* MessageBrokerAdapter::SubscribeAndBeginReceiverThread(void* param) { PassToThread(threads::Thread::CurrentId()); diff --git a/src/components/include/application_manager/application_manager.h b/src/components/include/application_manager/application_manager.h index e275d67f74..6659022ee5 100644 --- a/src/components/include/application_manager/application_manager.h +++ b/src/components/include/application_manager/application_manager.h @@ -164,9 +164,6 @@ class ApplicationManager { virtual ApplicationSharedPtr application( const std::string& device_id, const std::string& policy_app_id) const = 0; - virtual void SubscribeToHMINotification( - const std::string& hmi_notification) = 0; - virtual uint32_t GetDeviceHandle(uint32_t connection_key) = 0; /** diff --git a/src/components/include/hmi_message_handler/hmi_message_adapter.h b/src/components/include/hmi_message_handler/hmi_message_adapter.h index 9423f74394..704cc619be 100644 --- a/src/components/include/hmi_message_handler/hmi_message_adapter.h +++ b/src/components/include/hmi_message_handler/hmi_message_adapter.h @@ -49,15 +49,6 @@ class HMIMessageAdapter : public HMIMessageSender { */ virtual ~HMIMessageAdapter() {} -#ifdef SDL_REMOTE_CONTROL - /** - * @brief Subscribes to notification from HMI - * @param hmi_notification string with notification name - */ - virtual void SubscribeToHMINotification( - const std::string& hmi_notification) = 0; -#endif // SDL_REMOTE_CONTROL - protected: /** * \brief Interface for subscriptions. diff --git a/src/components/include/hmi_message_handler/hmi_message_handler.h b/src/components/include/hmi_message_handler/hmi_message_handler.h index 5c4a443407..411d19fb75 100644 --- a/src/components/include/hmi_message_handler/hmi_message_handler.h +++ b/src/components/include/hmi_message_handler/hmi_message_handler.h @@ -51,15 +51,6 @@ class HMIMessageHandler : public HMIMessageObserver, public HMIMessageSender { virtual void AddHMIMessageAdapter(HMIMessageAdapter* adapter) = 0; virtual void RemoveHMIMessageAdapter(HMIMessageAdapter* adapter) = 0; -#ifdef SDL_REMOTE_CONTROL - /** - * @brief Subscribes to notification from HMI - * @param hmi_notification string with notification name - */ - virtual void SubscribeToHMINotification( - const std::string& hmi_notification) = 0; -#endif // SDL_REMOTE_CONTROL - /** * \brief Hmi message handler settings getter * \return pointer to hmi message handler settings class diff --git a/src/components/include/test/application_manager/mock_application_manager.h b/src/components/include/test/application_manager/mock_application_manager.h index 139efbf1ee..4dde99dbfc 100644 --- a/src/components/include/test/application_manager/mock_application_manager.h +++ b/src/components/include/test/application_manager/mock_application_manager.h @@ -81,8 +81,6 @@ class MockApplicationManager : public application_manager::ApplicationManager { application_manager::ApplicationSharedPtr( const std::string& device_id, const std::string& policy_app_id)); - MOCK_METHOD1(SubscribeToHMINotification, - void(const std::string& hmi_notification)); MOCK_METHOD1(GetDeviceHandle, uint32_t(uint32_t connection_key)); MOCK_CONST_METHOD1(IsAudioStreamingAllowed, bool(uint32_t connection_key)); MOCK_CONST_METHOD1(IsVideoStreamingAllowed, bool(uint32_t connection_key)); |