summaryrefslogtreecommitdiff
path: root/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile
diff options
context:
space:
mode:
authorAlexander <akutsan@luxoft.com>2018-06-16 19:45:29 +0300
committerIra Lytvynenko (GitHub) <ILytvynenko@luxoft.com>2018-06-26 12:01:48 +0300
commitac86aa9a064bce07c5cec933fb27dfd9f92c7bc0 (patch)
treea859328a22b0753a593538da43e34f6906bf7286 /src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile
parenta79ca65ed1171f9abbdf3443843dae79151e97a3 (diff)
downloadsdl_core-ac86aa9a064bce07c5cec933fb27dfd9f92c7bc0.tar.gz
Replace all of application SubscribeToIVI to app extension subscribeToVehicleInfo
Diffstat (limited to 'src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile')
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/subscribe_vehicle_data_request.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/subscribe_vehicle_data_request.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/subscribe_vehicle_data_request.cc
index 766e720217..51c5fab6fe 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/subscribe_vehicle_data_request.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/commands/mobile/subscribe_vehicle_data_request.cc
@@ -39,6 +39,7 @@
#include "application_manager/application_impl.h"
#include "application_manager/message_helper.h"
#include "utils/helpers.h"
+#include "vehicle_info_plugin/vehicle_info_app_extension.h"
namespace vehicle_info_plugin {
using namespace application_manager;
@@ -269,7 +270,8 @@ void SubscribeVehicleDataRequest::on_event(const event_engine::Event& event) {
app_mngr::VehicleInfoSubscriptions::const_iterator key =
vi_waiting_for_subscribe_.begin();
for (; key != vi_waiting_for_subscribe_.end(); ++key) {
- app->SubscribeToIVI(*key);
+ auto& ext = VehicleInfoAppExtension::ExtractVIExtension(*app);
+ ext.subscribeToVehicleInfo(*key);
}
}
}
@@ -436,7 +438,9 @@ void SubscribeVehicleDataRequest::CheckVISubscriptions(
"There are apps subscribed already for "
"VehicleDataType: "
<< key_type);
- if (!app->SubscribeToIVI(static_cast<uint32_t>(key_type))) {
+ auto& ext = VehicleInfoAppExtension::ExtractVIExtension(*app);
+
+ if (!ext.subscribeToVehicleInfo(key_type)) {
LOG4CXX_ERROR(
logger_,
"Unable to subscribe for VehicleDataType: " << key_type);