diff options
author | Kozoriz <kozorizandriy@gmail.com> | 2016-04-11 16:21:12 +0300 |
---|---|---|
committer | Kozoriz <kozorizandriy@gmail.com> | 2016-04-25 12:05:00 +0300 |
commit | 2c7dc612ce41461bebc3416917d2607f24002285 (patch) | |
tree | 3dfce6575c040c3469e17ec1eab07d02c3dee92f /src/components/application_manager/src/commands/mobile/unsubscribe_way_points_request.cc | |
parent | 8b1699d3829ad4e2384788652a2102f7cd8a8bff (diff) | |
download | sdl_core-2c7dc612ce41461bebc3416917d2607f24002285.tar.gz |
Mobile commands update after removing all singletones
Diffstat (limited to 'src/components/application_manager/src/commands/mobile/unsubscribe_way_points_request.cc')
-rw-r--r-- | src/components/application_manager/src/commands/mobile/unsubscribe_way_points_request.cc | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/components/application_manager/src/commands/mobile/unsubscribe_way_points_request.cc b/src/components/application_manager/src/commands/mobile/unsubscribe_way_points_request.cc index c5c6f688b6..215d6dadc2 100644 --- a/src/components/application_manager/src/commands/mobile/unsubscribe_way_points_request.cc +++ b/src/components/application_manager/src/commands/mobile/unsubscribe_way_points_request.cc @@ -1,4 +1,4 @@ -#include "application_manager/application_manager_impl.h" +#include "application_manager/application_manager.h" #include "application_manager/commands/mobile/unsubscribe_way_points_request.h" namespace application_manager { @@ -6,8 +6,8 @@ namespace application_manager { namespace commands { UnSubscribeWayPointsRequest::UnSubscribeWayPointsRequest( - const MessageSharedPtr &message) - : CommandRequestImpl(message) {} + const MessageSharedPtr &message, ApplicationManager& application_manager) + : CommandRequestImpl(message, application_manager) {} UnSubscribeWayPointsRequest::~UnSubscribeWayPointsRequest() {} @@ -15,8 +15,7 @@ void UnSubscribeWayPointsRequest::Run() { LOG4CXX_AUTO_TRACE(logger_); ApplicationSharedPtr app = - application_manager::ApplicationManagerImpl::instance()->application( - connection_key()); + application_manager_.application(connection_key()); if (!app) { LOG4CXX_ERROR(logger_, "An application with connection key " @@ -25,8 +24,7 @@ void UnSubscribeWayPointsRequest::Run() { return; } - if (!application_manager::ApplicationManagerImpl::instance() - ->IsAppSubscribedForWayPoints(app->app_id())) { + if (!application_manager_.IsAppSubscribedForWayPoints(app->app_id())) { SendResponse(false, mobile_apis::Result::IGNORED); return; } @@ -38,8 +36,7 @@ void UnSubscribeWayPointsRequest::Run() { void UnSubscribeWayPointsRequest::on_event(const event_engine::Event &event) { LOG4CXX_AUTO_TRACE(logger_); ApplicationSharedPtr app = - application_manager::ApplicationManagerImpl::instance()->application( - connection_key()); + application_manager_.application(connection_key()); const smart_objects::SmartObject &message = event.smart_object(); switch (event.id()) { case hmi_apis::FunctionID::Navigation_UnsubscribeWayPoints: { @@ -49,8 +46,7 @@ void UnSubscribeWayPointsRequest::on_event(const event_engine::Event &event) { message[strings::params][hmi_response::code].asUInt())); bool result = mobile_apis::Result::SUCCESS == result_code; if (result) { - application_manager::ApplicationManagerImpl::instance() - ->UnsubscribeAppFromWayPoints(app->app_id()); + application_manager_.UnsubscribeAppFromWayPoints(app->app_id()); } SendResponse(result, result_code, NULL, &(message[strings::msg_params])); break; |