summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleksandr Lohvinenko (GitHub) <OLohvinenko@luxoft.com>2018-06-05 13:07:39 +0300
committerIra Lytvynenko (GitHub) <ILytvynenko@luxoft.com>2018-06-26 12:01:47 +0300
commit8300400118aaab59114d953a59ab54bd04231311 (patch)
tree5b8129d548ea3b37e1e1fed589045944fce71e53
parent2e903fc348c547ba3e44e6bd1be42886054af39f (diff)
downloadsdl_core-8300400118aaab59114d953a59ab54bd04231311.tar.gz
Minor refactoring.
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_app_extension.cc10
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_command_factory.cc2
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_hmi_command_factory.cc6
-rw-r--r--src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_mobile_command_factory.cc6
4 files changed, 13 insertions, 11 deletions
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_app_extension.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_app_extension.cc
index 2d3f798554..1559306b54 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_app_extension.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_app_extension.cc
@@ -32,7 +32,7 @@
#include "vehicle_info_plugin/vehicle_info_app_extension.h"
-CREATE_LOGGERPTR_GLOBAL(logger_, "Vehicle Info Plugin")
+CREATE_LOGGERPTR_GLOBAL(logger_, "VehicleInfoPlugin")
namespace vehicle_info_plugin {
@@ -41,15 +41,19 @@ VehicleInfoAppExtension::VehicleInfoAppExtension(application_manager::AppExtensi
LOG4CXX_AUTO_TRACE(logger_);
}
-VehicleInfoAppExtension::~VehicleInfoAppExtension() {}
+VehicleInfoAppExtension::~VehicleInfoAppExtension() {
+ LOG4CXX_AUTO_TRACE(logger_);
+}
void VehicleInfoAppExtension::subscribeToVehicleInfo(
const std::string& moduleType) {
+ LOG4CXX_DEBUG(logger_, moduleType);
subscribed_modules_.insert(moduleType);
}
void VehicleInfoAppExtension::unsubscribeFromVehicleInfo(
const std::string& moduleType) {
+ LOG4CXX_DEBUG(logger_, moduleType);
auto it = subscribed_modules_.find(moduleType);
if (it != subscribed_modules_.end()) {
subscribed_modules_.erase(it);
@@ -57,11 +61,13 @@ void VehicleInfoAppExtension::unsubscribeFromVehicleInfo(
}
void VehicleInfoAppExtension::unsubscribeFromVehicleInfo() {
+ LOG4CXX_AUTO_TRACE(logger_);
subscribed_modules_.clear();
}
bool VehicleInfoAppExtension::isSubscribedToVehicleInfo(
const std::string& moduleType) const {
+ LOG4CXX_DEBUG(logger_, moduleType);
return subscribed_modules_.find(moduleType) !=
subscribed_modules_.end();
}
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_command_factory.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_command_factory.cc
index c0b3f70858..84b72bf264 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_command_factory.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_command_factory.cc
@@ -32,7 +32,7 @@
#include "vehicle_info_plugin/vehicle_info_command_factory.h"
-CREATE_LOGGERPTR_GLOBAL(logger_, "Vehicle Info Plugin")
+CREATE_LOGGERPTR_GLOBAL(logger_, "VehicleInfoPlugin")
namespace vehicle_info_plugin {
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_hmi_command_factory.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_hmi_command_factory.cc
index f15107dd97..5f380826c1 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_hmi_command_factory.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_hmi_command_factory.cc
@@ -50,7 +50,7 @@
#include "vehicle_info_plugin/commands/hmi/vi_unsubscribe_vehicle_data_request.h"
#include "vehicle_info_plugin/commands/hmi/vi_unsubscribe_vehicle_data_response.h"
-CREATE_LOGGERPTR_GLOBAL(logger_, "Vehicle Info Plugin")
+CREATE_LOGGERPTR_GLOBAL(logger_, "VehicleInfoPlugin")
namespace vehicle_info_plugin {
namespace strings = app_mngr::strings;
@@ -80,13 +80,11 @@ app_mngr::CommandSharedPtr VehicleInfoHmiCommandFactory::CreateCommand(
static_cast<hmi_apis::messageType::eType>(
(*message)[strings::params][strings::message_type].asInt());
- auto message_type_str = "";
+ auto message_type_str = "request";
if (hmi_apis::messageType::response == message_type) {
message_type_str = "response";
} else if (hmi_apis::messageType::error_response == message_type) {
message_type_str = "error response";
- } else {
- message_type_str = "request";
}
LOG4CXX_DEBUG(
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_mobile_command_factory.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_mobile_command_factory.cc
index f237617630..e93e4bf208 100644
--- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_mobile_command_factory.cc
+++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/src/vehicle_info_mobile_command_factory.cc
@@ -49,7 +49,7 @@
#include "vehicle_info_plugin/commands/mobile/unsubscribe_vehicle_data_request.h"
#include "vehicle_info_plugin/commands/mobile/unsubscribe_vehicle_data_response.h"
-CREATE_LOGGERPTR_GLOBAL(logger_, "Vehicle Info Plugin")
+CREATE_LOGGERPTR_GLOBAL(logger_, "VehicleInfoPlugin")
namespace vehicle_info_plugin {
namespace strings = app_mngr::strings;
@@ -79,13 +79,11 @@ app_mngr::CommandSharedPtr VehicleInfoMobileCommandFactory::CreateCommand(
static_cast<mobile_apis::messageType::eType>(
(*message)[strings::params][strings::message_type].asInt());
- auto message_type_str = "";
+ auto message_type_str = "request";
if (mobile_apis::messageType::response == message_type) {
message_type_str = "response";
} else if (mobile_apis::messageType::notification == message_type) {
message_type_str = "notification";
- } else {
- message_type_str = "request";
}
LOG4CXX_DEBUG(