summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Oleynik <aoleynik@luxoft.com>2016-04-27 10:45:20 +0300
committerAndrey Oleynik <aoleynik@luxoft.com>2016-04-27 10:45:20 +0300
commitd1b07a7982390ee9c0b34d35fd1e501dc431ffad (patch)
treed4194c6b6b51734018f912743f3aaa02c1d39cc5
parent1a48a329f64f7ae129323b8334035bc926524fb8 (diff)
downloadsdl_core-d1b07a7982390ee9c0b34d35fd1e501dc431ffad.tar.gz
Beautifies code with clang-format
Related-issues: APPLINK-22713, APPLINK-22716
-rw-r--r--src/appMain/main.cc3
-rw-r--r--src/components/application_manager/include/application_manager/application_manager_impl.h16
-rw-r--r--src/components/application_manager/src/application_impl.cc32
-rw-r--r--src/components/application_manager/src/application_manager_impl.cc186
-rw-r--r--src/components/application_manager/src/application_state.cc3
-rw-r--r--src/components/application_manager/src/commands/command_impl.cc12
-rw-r--r--src/components/application_manager/src/commands/command_request_impl.cc8
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_audio_start_stream_request.cc20
-rw-r--r--src/components/application_manager/src/commands/hmi/navi_start_stream_request.cc20
-rw-r--r--src/components/application_manager/src/commands/hmi/on_system_request_notification.cc4
-rw-r--r--src/components/application_manager/src/commands/hmi/sdl_activate_app_request.cc10
-rw-r--r--src/components/application_manager/src/commands/hmi/sdl_get_user_friendly_message_request.cc2
-rw-r--r--src/components/application_manager/src/commands/hmi/tts_get_language_response.cc6
-rw-r--r--src/components/application_manager/src/commands/hmi/ui_get_language_response.cc6
-rw-r--r--src/components/application_manager/src/commands/hmi/vr_get_language_response.cc6
-rw-r--r--src/components/application_manager/src/commands/mobile/add_command_request.cc16
-rw-r--r--src/components/application_manager/src/commands/mobile/alert_maneuver_request.cc8
-rw-r--r--src/components/application_manager/src/commands/mobile/alert_request.cc18
-rw-r--r--src/components/application_manager/src/commands/mobile/change_registration_request.cc19
-rw-r--r--src/components/application_manager/src/commands/mobile/create_interaction_choice_set_request.cc38
-rw-r--r--src/components/application_manager/src/commands/mobile/delete_command_request.cc14
-rw-r--r--src/components/application_manager/src/commands/mobile/delete_file_request.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/delete_interaction_choice_set_request.cc10
-rw-r--r--src/components/application_manager/src/commands/mobile/diagnostic_message_request.cc4
-rw-r--r--src/components/application_manager/src/commands/mobile/dial_number_request.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/get_vehicle_data_request.cc8
-rw-r--r--src/components/application_manager/src/commands/mobile/get_way_points_request.cc4
-rw-r--r--src/components/application_manager/src/commands/mobile/list_files_request.cc6
-rw-r--r--src/components/application_manager/src/commands/mobile/on_button_event_notification.cc12
-rw-r--r--src/components/application_manager/src/commands/mobile/on_button_press_notification.cc12
-rw-r--r--src/components/application_manager/src/commands/mobile/on_hash_change_notification.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/on_hmi_status_notification.cc6
-rw-r--r--src/components/application_manager/src/commands/mobile/on_hmi_status_notification_from_mobile.cc14
-rw-r--r--src/components/application_manager/src/commands/mobile/on_keyboard_input_notification.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/on_system_request_notification.cc8
-rw-r--r--src/components/application_manager/src/commands/mobile/on_vehicle_data_notification.cc6
-rw-r--r--src/components/application_manager/src/commands/mobile/perform_audio_pass_thru_request.cc6
-rw-r--r--src/components/application_manager/src/commands/mobile/perform_interaction_request.cc34
-rw-r--r--src/components/application_manager/src/commands/mobile/put_file_request.cc19
-rw-r--r--src/components/application_manager/src/commands/mobile/register_app_interface_request.cc43
-rw-r--r--src/components/application_manager/src/commands/mobile/register_app_interface_response.cc4
-rw-r--r--src/components/application_manager/src/commands/mobile/send_location_request.cc10
-rw-r--r--src/components/application_manager/src/commands/mobile/set_app_icon_request.cc22
-rw-r--r--src/components/application_manager/src/commands/mobile/set_global_properties_request.cc28
-rw-r--r--src/components/application_manager/src/commands/mobile/set_icon_request.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/show_constant_tbt_request.cc14
-rw-r--r--src/components/application_manager/src/commands/mobile/show_request.cc2
-rw-r--r--src/components/application_manager/src/commands/mobile/slider_request.cc4
-rw-r--r--src/components/application_manager/src/commands/mobile/speak_request.cc4
-rw-r--r--src/components/application_manager/src/commands/mobile/subscribe_button_request.cc7
-rw-r--r--src/components/application_manager/src/commands/mobile/subscribe_vehicle_data_request.cc34
-rw-r--r--src/components/application_manager/src/commands/mobile/subscribe_way_points_request.cc4
-rw-r--r--src/components/application_manager/src/commands/mobile/system_request.cc182
-rw-r--r--src/components/application_manager/src/commands/mobile/unsubscribe_vehicle_data_request.cc30
-rw-r--r--src/components/application_manager/src/commands/mobile/unsubscribe_way_points_request.cc4
-rw-r--r--src/components/application_manager/src/commands/mobile/update_turn_list_request.cc9
-rw-r--r--src/components/application_manager/src/hmi_command_factory.cc4
-rw-r--r--src/components/application_manager/src/hmi_language_handler.cc49
-rw-r--r--src/components/application_manager/src/message_helper/message_helper.cc8
-rw-r--r--src/components/application_manager/src/mobile_message_handler.cc22
-rw-r--r--src/components/application_manager/src/policies/policy_handler.cc117
-rw-r--r--src/components/application_manager/src/policies/policy_retry_sequence.cc2
-rw-r--r--src/components/application_manager/src/policies/pt_exchange_handler_ext.cc4
-rw-r--r--src/components/application_manager/src/request_controller.cc92
-rw-r--r--src/components/application_manager/src/request_info.cc20
-rw-r--r--src/components/application_manager/src/resumption/resume_ctrl.cc67
-rw-r--r--src/components/application_manager/src/resumption/resumption_data_db.cc187
-rw-r--r--src/components/application_manager/src/resumption/resumption_data_json.cc20
-rw-r--r--src/components/application_manager/src/state_controller_impl.cc88
-rw-r--r--src/components/config_profile/src/profile.cc18
-rw-r--r--src/components/connection_handler/src/connection.cc18
-rw-r--r--src/components/connection_handler/src/connection_handler_impl.cc83
-rw-r--r--src/components/connection_handler/src/device.cc4
-rw-r--r--src/components/connection_handler/src/heartbeat_monitor.cc30
-rw-r--r--src/components/dbus/src/dbus_adapter.cc23
-rw-r--r--src/components/hmi_message_handler/src/mqueue_adapter.cc8
-rw-r--r--src/components/include/utils/logger.h10
-rw-r--r--src/components/include/utils/macro.h46
-rw-r--r--src/components/media_manager/src/audio/a2dp_source_player_adapter.cc15
-rw-r--r--src/components/media_manager/src/audio/from_mic_recorder_adapter.cc6
-rw-r--r--src/components/media_manager/src/audio/from_mic_recorder_listener.cc9
-rw-r--r--src/components/media_manager/src/media_manager_impl.cc8
-rw-r--r--src/components/media_manager/src/pipe_streamer_adapter.cc10
-rw-r--r--src/components/media_manager/src/socket_streamer_adapter.cc2
-rw-r--r--src/components/media_manager/src/streamer_adapter.cc18
-rw-r--r--src/components/media_manager/src/streamer_listener.cc5
-rw-r--r--src/components/media_manager/src/video/video_stream_to_file_adapter.cc15
-rw-r--r--src/components/policy/src/policy/policy_table/table_struct/validation.cc14
-rw-r--r--src/components/policy/src/policy/src/cache_manager.cc60
-rw-r--r--src/components/policy/src/policy/src/policy_helper.cc15
-rw-r--r--src/components/policy/src/policy/src/policy_manager_impl.cc36
-rw-r--r--src/components/policy/src/policy/src/sql_pt_ext_representation.cc70
-rw-r--r--src/components/policy/src/policy/src/sql_pt_representation.cc73
-rw-r--r--src/components/policy/src/policy/src/update_status_manager.cc5
-rw-r--r--src/components/protocol_handler/src/incoming_data_handler.cc30
-rw-r--r--src/components/protocol_handler/src/multiframe_builder.cc56
-rw-r--r--src/components/protocol_handler/src/protocol_handler_impl.cc198
-rw-r--r--src/components/protocol_handler/src/protocol_packet.cc38
-rw-r--r--src/components/resumption/src/last_state.cc4
-rw-r--r--src/components/security_manager/src/crypto_manager_impl.cc27
-rw-r--r--src/components/security_manager/src/security_manager_impl.cc29
-rw-r--r--src/components/security_manager/src/ssl_context_impl.cc20
-rw-r--r--src/components/telemetry_monitor/src/telemetry_monitor.cc4
-rw-r--r--src/components/transport_manager/src/bluetooth/bluetooth_connection_factory.cc4
-rw-r--r--src/components/transport_manager/src/bluetooth/bluetooth_device.cc8
-rw-r--r--src/components/transport_manager/src/bluetooth/bluetooth_device_scanner.cc22
-rw-r--r--src/components/transport_manager/src/bluetooth/bluetooth_socket_connection.cc6
-rw-r--r--src/components/transport_manager/src/tcp/tcp_connection_factory.cc4
-rw-r--r--src/components/transport_manager/src/tcp/tcp_socket_connection.cc10
-rw-r--r--src/components/transport_manager/src/transport_adapter/threaded_socket_connection.cc14
-rw-r--r--src/components/transport_manager/src/transport_adapter/transport_adapter_impl.cc105
-rw-r--r--src/components/transport_manager/src/transport_adapter/transport_adapter_listener_impl.cc59
-rw-r--r--src/components/transport_manager/src/transport_manager_default.cc4
-rw-r--r--src/components/transport_manager/src/transport_manager_impl.cc110
-rw-r--r--src/components/transport_manager/src/usb/libusb/platform_usb_device.cc4
-rw-r--r--src/components/transport_manager/src/usb/libusb/usb_connection.cc35
-rw-r--r--src/components/transport_manager/src/usb/libusb/usb_handler.cc65
-rw-r--r--src/components/transport_manager/src/usb/qnx/usb_connection.cc26
-rw-r--r--src/components/transport_manager/src/usb/qnx/usb_handler.cc44
-rw-r--r--src/components/transport_manager/src/usb/usb_aoa_adapter.cc8
-rw-r--r--src/components/transport_manager/src/usb/usb_connection_factory.cc12
-rw-r--r--src/components/transport_manager/src/usb/usb_device_scanner.cc12
-rw-r--r--src/components/utils/src/conditional_variable_posix.cc12
-rw-r--r--src/components/utils/src/lock_posix.cc14
-rw-r--r--src/components/utils/src/resource_usage.cc4
-rw-r--r--src/components/utils/src/system.cc4
-rw-r--r--src/components/utils/src/threads/posix_thread.cc61
-rw-r--r--src/components/utils/src/threads/pulse_thread_delegate.cc8
-rw-r--r--src/components/utils/src/threads/thread_validator.cc20
129 files changed, 1660 insertions, 1709 deletions
diff --git a/src/appMain/main.cc b/src/appMain/main.cc
index 35fe4f02d6..8f3fc870e8 100644
--- a/src/appMain/main.cc
+++ b/src/appMain/main.cc
@@ -139,8 +139,7 @@ int32_t main(int32_t argc, char** argv) {
threads::Thread::SetNameForId(threads::Thread::CurrentId(), "MainThread");
if (!utils::appenders_loader.Loaded()) {
- LOGGER_ERROR(logger_,
- "Appenders plugin not loaded, file logging disabled");
+ LOGGER_ERROR(logger_, "Appenders plugin not loaded, file logging disabled");
}
LOGGER_INFO(logger_, "Application started!");
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 b5e68ceedd..3c6452b945 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
@@ -488,7 +488,7 @@ class ApplicationManagerImpl
ApplicationSharedPtr app = application(app_id);
if (!app) {
LOGGER_ERROR(logger_,
- "Application with appID=" << app_id << " does not exist");
+ "Application with appID=" << app_id << " does not exist");
return;
}
state_ctrl_.SetRegularState(app, audio_state);
@@ -505,7 +505,7 @@ class ApplicationManagerImpl
ApplicationSharedPtr app = application(app_id);
if (!app) {
LOGGER_ERROR(logger_,
- "Application with appID=" << app_id << " does not exist");
+ "Application with appID=" << app_id << " does not exist");
return;
}
state_ctrl_.SetRegularState(app, new_state, SendActivateApp);
@@ -521,7 +521,7 @@ class ApplicationManagerImpl
ApplicationSharedPtr app = application(app_id);
if (!app) {
LOGGER_ERROR(logger_,
- "Application with appID=" << app_id << " does not exist");
+ "Application with appID=" << app_id << " does not exist");
return;
}
state_ctrl_.SetRegularState(app, hmi_level, SendActivateApp);
@@ -541,7 +541,7 @@ class ApplicationManagerImpl
ApplicationSharedPtr app = application(app_id);
if (!app) {
LOGGER_ERROR(logger_,
- "Application with appID=" << app_id << " does not exist");
+ "Application with appID=" << app_id << " does not exist");
return;
}
state_ctrl_.SetRegularState(app, hmi_level, audio_state, SendActivateApp);
@@ -562,7 +562,7 @@ class ApplicationManagerImpl
ApplicationSharedPtr app = application(app_id);
if (!app) {
LOGGER_ERROR(logger_,
- "Application with appID=" << app_id << " does not exist");
+ "Application with appID=" << app_id << " does not exist");
return;
}
state_ctrl_.SetRegularState(
@@ -579,7 +579,7 @@ class ApplicationManagerImpl
ApplicationSharedPtr app = application(app_id);
if (!app) {
LOGGER_ERROR(logger_,
- "Application with appID=" << app_id << " does not exist");
+ "Application with appID=" << app_id << " does not exist");
return;
}
state_ctrl_.SetRegularState(app, system_context);
@@ -594,7 +594,7 @@ class ApplicationManagerImpl
ApplicationSharedPtr app = application(app_id);
if (!app) {
LOGGER_ERROR(logger_,
- "Application with appID=" << app_id << " does not exist");
+ "Application with appID=" << app_id << " does not exist");
return;
}
state_ctrl_.SetRegularState(app, hmi_level);
@@ -609,7 +609,7 @@ class ApplicationManagerImpl
ApplicationSharedPtr app = application(app_id);
if (!app) {
LOGGER_ERROR(logger_,
- "Application with appID=" << app_id << " does not exist");
+ "Application with appID=" << app_id << " does not exist");
return;
}
state_ctrl_.SetRegularState(app, state);
diff --git a/src/components/application_manager/src/application_impl.cc b/src/components/application_manager/src/application_impl.cc
index e8ae9bb58e..6b4d5d17f0 100644
--- a/src/components/application_manager/src/application_impl.cc
+++ b/src/components/application_manager/src/application_impl.cc
@@ -604,8 +604,8 @@ bool ApplicationImpl::is_resuming() const {
bool ApplicationImpl::AddFile(const AppFile& file) {
if (app_files_.count(file.file_name) == 0) {
LOGGER_INFO(logger_,
- "AddFile file " << file.file_name << " File type is "
- << file.file_type);
+ "AddFile file " << file.file_name << " File type is "
+ << file.file_type);
app_files_[file.file_name] = file;
return true;
}
@@ -615,8 +615,8 @@ bool ApplicationImpl::AddFile(const AppFile& file) {
bool ApplicationImpl::UpdateFile(const AppFile& file) {
if (app_files_.count(file.file_name) != 0) {
LOGGER_INFO(logger_,
- "UpdateFile file " << file.file_name << " File type is "
- << file.file_type);
+ "UpdateFile file " << file.file_name << " File type is "
+ << file.file_type);
app_files_[file.file_name] = file;
return true;
}
@@ -627,8 +627,8 @@ bool ApplicationImpl::DeleteFile(const std::string& file_name) {
AppFilesMap::iterator it = app_files_.find(file_name);
if (it != app_files_.end()) {
LOGGER_INFO(logger_,
- "DeleteFile file " << it->second.file_name << " File type is "
- << it->second.file_type);
+ "DeleteFile file " << it->second.file_name << " File type is "
+ << it->second.file_type);
app_files_.erase(it);
return true;
}
@@ -699,7 +699,7 @@ bool ApplicationImpl::IsCommandLimitsExceeded(
cmd_number_to_time_limits_.find(cmd_id);
if (cmd_number_to_time_limits_.end() == it) {
LOGGER_WARN(logger_,
- "Limits for command id " << cmd_id << "had not been set.");
+ "Limits for command id " << cmd_id << "had not been set.");
return true;
}
@@ -720,13 +720,13 @@ bool ApplicationImpl::IsCommandLimitsExceeded(
}
LOGGER_INFO(logger_,
- "Time Info: "
- << "\n Current: " << current.tv_sec << "\n Limit: ("
- << limit.first.tv_sec << "," << limit.second
- << ")"
- "\n frequency_restrictions: ("
- << frequency_restrictions.first << ","
- << frequency_restrictions.second << ")");
+ "Time Info: "
+ << "\n Current: " << current.tv_sec << "\n Limit: ("
+ << limit.first.tv_sec << "," << limit.second
+ << ")"
+ "\n frequency_restrictions: ("
+ << frequency_restrictions.first << ","
+ << frequency_restrictions.second << ")");
if (current.tv_sec < limit.first.tv_sec + frequency_restrictions.second) {
if (limit.second < frequency_restrictions.first) {
++limit.second;
@@ -889,8 +889,8 @@ void ApplicationImpl::LoadPersistentFiles() {
}
LOGGER_INFO(logger_,
- "Loaded persistent file "
- << file.file_name << " File type is " << file.file_type);
+ "Loaded persistent file "
+ << file.file_name << " File type is " << file.file_type);
AddFile(file);
}
}
diff --git a/src/components/application_manager/src/application_manager_impl.cc b/src/components/application_manager/src/application_manager_impl.cc
index d2810f8236..138589447d 100644
--- a/src/components/application_manager/src/application_manager_impl.cc
+++ b/src/components/application_manager/src/application_manager_impl.cc
@@ -430,7 +430,7 @@ ApplicationSharedPtr ApplicationManagerImpl::RegisterApplication(
if (!is_all_apps_allowed_) {
LOGGER_WARN(logger_,
- "RegisterApplication: access to app's disabled by user");
+ "RegisterApplication: access to app's disabled by user");
utils::SharedPtr<smart_objects::SmartObject> response(
MessageHelper::CreateNegativeResponse(
connection_key,
@@ -451,7 +451,7 @@ ApplicationSharedPtr ApplicationManagerImpl::RegisterApplication(
LOGGER_ERROR(logger_, "Failed to extract device mac for id " << device_id);
} else {
LOGGER_DEBUG(logger_,
- "Device mac for id" << device_id << " is " << device_mac);
+ "Device mac for id" << device_id << " is " << device_mac);
}
ApplicationSharedPtr application(
new ApplicationImpl(app_id,
@@ -600,13 +600,12 @@ mobile_api::HMILevel::eType ApplicationManagerImpl::IsHmiLevelFullAllowed(
} else if (is_active_app_exist && (!is_audio_app)) {
result = GetDefaultHmiLevel(app);
}
- LOGGER_ERROR(
- logger_,
- "is_audio_app : " << is_audio_app
- << "; does_audio_app_with_same_type_exist : "
- << does_audio_app_with_same_type_exist
- << "; is_active_app_exist : " << is_active_app_exist
- << "; result : " << result);
+ LOGGER_ERROR(logger_,
+ "is_audio_app : "
+ << is_audio_app << "; does_audio_app_with_same_type_exist : "
+ << does_audio_app_with_same_type_exist
+ << "; is_active_app_exist : " << is_active_app_exist
+ << "; result : " << result);
return result;
}
@@ -749,8 +748,8 @@ void ApplicationManagerImpl::SendAudioPassThroughNotification(
if (!audio_pass_thru_active_) {
LOGGER_ERROR(logger_,
- "Trying to send PassThroughNotification"
- " when PassThrough is not active");
+ "Trying to send PassThroughNotification"
+ " when PassThrough is not active");
return;
}
@@ -972,7 +971,7 @@ mobile_apis::HMILevel::eType ApplicationManagerImpl::GetDefaultHmiLevel(
}
} else {
LOGGER_ERROR(logger_,
- "Unable to get default hmi_level for " << policy_app_id);
+ "Unable to get default hmi_level for " << policy_app_id);
}
}
return default_hmi;
@@ -1004,9 +1003,9 @@ void ApplicationManagerImpl::ReplaceMobileByHMIAppId(
application(message[strings::app_id].asUInt());
if (application_ptr.valid()) {
LOGGER_DEBUG(logger_,
- "ReplaceMobileByHMIAppId from "
- << message[strings::app_id].asInt() << " to "
- << application_ptr->hmi_app_id());
+ "ReplaceMobileByHMIAppId from "
+ << message[strings::app_id].asInt() << " to "
+ << application_ptr->hmi_app_id());
message[strings::app_id] = application_ptr->hmi_app_id();
}
} else {
@@ -1041,9 +1040,9 @@ void ApplicationManagerImpl::ReplaceHMIByMobileAppId(
if (application.valid()) {
LOGGER_DEBUG(logger_,
- "ReplaceHMIByMobileAppId from "
- << message[strings::app_id].asInt() << " to "
- << application->app_id());
+ "ReplaceHMIByMobileAppId from "
+ << message[strings::app_id].asInt() << " to "
+ << application->app_id());
message[strings::app_id] = application->app_id();
}
} else {
@@ -1134,8 +1133,8 @@ bool ApplicationManagerImpl::OnServiceStartedCallback(
using namespace protocol_handler;
LOGGER_AUTO_TRACE(logger_);
LOGGER_DEBUG(logger_,
- "ServiceType = " << type << ". Session = " << std::hex
- << session_key);
+ "ServiceType = " << type << ". Session = " << std::hex
+ << session_key);
if (type == kRpc) {
LOGGER_DEBUG(logger_, "RPC service is about to be started.");
@@ -1144,8 +1143,8 @@ bool ApplicationManagerImpl::OnServiceStartedCallback(
ApplicationSharedPtr app = application(session_key);
if (!app) {
LOGGER_WARN(logger_,
- "The application with id:" << session_key
- << " doesn't exists.");
+ "The application with id:" << session_key
+ << " doesn't exists.");
return false;
}
@@ -1172,9 +1171,9 @@ void ApplicationManagerImpl::OnServiceEndedCallback(
using namespace mobile_apis;
LOGGER_DEBUG(logger_,
- "OnServiceEndedCallback for service "
- << type << " with reason " << close_reason
- << " in session 0x" << std::hex << session_key);
+ "OnServiceEndedCallback for service "
+ << type << " with reason " << close_reason
+ << " in session 0x" << std::hex << session_key);
if (type == kRpc) {
LOGGER_INFO(logger_, "Remove application.");
@@ -1376,8 +1375,8 @@ void ApplicationManagerImpl::SendMessageToMobile(
const std::string string_functionID =
MessageHelper::StringifiedFunctionID(function_id);
LOGGER_WARN(logger_,
- "Function \"" << string_functionID << "\" (#" << function_id
- << ") not allowed by policy");
+ "Function \"" << string_functionID << "\" (#" << function_id
+ << ") not allowed by policy");
return;
}
@@ -1430,7 +1429,7 @@ bool ApplicationManagerImpl::ManageMobileCommand(
if (!command) {
LOGGER_WARN(logger_,
- "RET Failed to create mobile command from smart object");
+ "RET Failed to create mobile command from smart object");
return false;
}
@@ -1513,8 +1512,8 @@ bool ApplicationManagerImpl::ManageMobileCommand(
} else if (result == request_controller::RequestController::
TOO_MANY_PENDING_REQUESTS) {
LOGGER_ERROR(logger_,
- "RET Unable top perform request: "
- << "TOO_MANY_PENDING_REQUESTS");
+ "RET Unable top perform request: "
+ << "TOO_MANY_PENDING_REQUESTS");
smart_objects::SmartObjectSPtr response =
MessageHelper::CreateNegativeResponse(
@@ -1533,8 +1532,8 @@ bool ApplicationManagerImpl::ManageMobileCommand(
} else if (result ==
request_controller::RequestController::TOO_MANY_REQUESTS) {
LOGGER_ERROR(logger_,
- "RET Unable to perform request: "
- << "TOO_MANY_REQUESTS");
+ "RET Unable to perform request: "
+ << "TOO_MANY_REQUESTS");
ManageMobileCommand(
MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile(
@@ -1553,8 +1552,8 @@ bool ApplicationManagerImpl::ManageMobileCommand(
} else if (result == request_controller::RequestController::
NONE_HMI_LEVEL_MANY_REQUESTS) {
LOGGER_ERROR(logger_,
- "RET Unable to perform request: "
- << "REQUEST_WHILE_IN_NONE_HMI_LEVEL");
+ "RET Unable to perform request: "
+ << "REQUEST_WHILE_IN_NONE_HMI_LEVEL");
ManageMobileCommand(
MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile(
@@ -1613,8 +1612,7 @@ void ApplicationManagerImpl::SendMessageToHMI(
message_to_send->set_smart_object(*message);
#else
if (!ConvertSOtoMessage(*message, *message_to_send)) {
- LOGGER_WARN(logger_,
- "Cannot send message to HMI: failed to create string");
+ LOGGER_WARN(logger_, "Cannot send message to HMI: failed to create string");
return;
}
#endif // HMI_DBUS_API
@@ -1681,7 +1679,7 @@ bool ApplicationManagerImpl::Init(resumption::LastState& last_state,
if (!(file_system::IsWritingAllowed(app_storage_folder) &&
file_system::IsReadingAllowed(app_storage_folder))) {
LOGGER_ERROR(logger_,
- "Storage directory doesn't have read/write permissions");
+ "Storage directory doesn't have read/write permissions");
return false;
}
@@ -1700,7 +1698,7 @@ bool ApplicationManagerImpl::Init(resumption::LastState& last_state,
if (GetPolicyHandler().PolicyEnabled()) {
if (!GetPolicyHandler().LoadPolicyLibrary()) {
LOGGER_ERROR(logger_,
- "Policy library is not loaded. Check LD_LIBRARY_PATH");
+ "Policy library is not loaded. Check LD_LIBRARY_PATH");
return false;
}
LOGGER_INFO(logger_, "Policy library is loaded, now initing PT");
@@ -1710,7 +1708,7 @@ bool ApplicationManagerImpl::Init(resumption::LastState& last_state,
}
} else {
LOGGER_WARN(logger_,
- "System is configured to work without policy functionality.");
+ "System is configured to work without policy functionality.");
}
media_manager_ = media_manager;
return true;
@@ -1726,7 +1724,7 @@ bool ApplicationManagerImpl::Stop() {
UnregisterAllApplications();
} catch (...) {
LOGGER_ERROR(logger_,
- "An error occurred during unregistering applications.");
+ "An error occurred during unregistering applications.");
}
request_ctrl_.DestroyThreadpool();
@@ -1741,9 +1739,9 @@ bool ApplicationManagerImpl::ConvertMessageToSO(
const Message& message, smart_objects::SmartObject& output) {
LOGGER_AUTO_TRACE(logger_);
LOGGER_DEBUG(logger_,
- "\t\t\tMessage to convert: protocol "
- << message.protocol_version() << "; json "
- << message.json_message());
+ "\t\t\tMessage to convert: protocol "
+ << message.protocol_version() << "; json "
+ << message.json_message());
switch (message.protocol_version()) {
case ProtocolVersion::kV4:
@@ -1760,8 +1758,8 @@ bool ApplicationManagerImpl::ConvertMessageToSO(
!mobile_so_factory().attachSchema(output, true) ||
((output.validate() != smart_objects::Errors::OK))) {
LOGGER_WARN(logger_,
- "Failed to parse string to smart object :"
- << message.json_message());
+ "Failed to parse string to smart object :"
+ << message.json_message());
utils::SharedPtr<smart_objects::SmartObject> response(
MessageHelper::CreateNegativeResponse(
message.connection_key(),
@@ -1772,8 +1770,8 @@ bool ApplicationManagerImpl::ConvertMessageToSO(
return false;
}
LOGGER_DEBUG(logger_,
- "Convertion result for sdl object is true function_id "
- << output[jhs::S_PARAMS][jhs::S_FUNCTION_ID].asInt());
+ "Convertion result for sdl object is true function_id "
+ << output[jhs::S_PARAMS][jhs::S_FUNCTION_ID].asInt());
output[strings::params][strings::connection_key] =
message.connection_key();
@@ -1782,10 +1780,10 @@ bool ApplicationManagerImpl::ConvertMessageToSO(
if (message.binary_data()) {
if (message.payload_size() < message.data_size()) {
LOGGER_ERROR(logger_,
- "Incomplete binary"
- << " binary size should be " << message.data_size()
- << " payload data size is "
- << message.payload_size());
+ "Incomplete binary"
+ << " binary size should be " << message.data_size()
+ << " payload data size is "
+ << message.payload_size());
utils::SharedPtr<smart_objects::SmartObject> response(
MessageHelper::CreateNegativeResponse(
message.connection_key(),
@@ -1808,9 +1806,9 @@ bool ApplicationManagerImpl::ConvertMessageToSO(
hmi_apis::FunctionID::eType,
hmi_apis::messageType::eType>(message.json_message(), output);
LOGGER_DEBUG(logger_,
- "Convertion result: "
- << result << " function id "
- << output[jhs::S_PARAMS][jhs::S_FUNCTION_ID].asInt());
+ "Convertion result: "
+ << result << " function id "
+ << output[jhs::S_PARAMS][jhs::S_FUNCTION_ID].asInt());
if (!hmi_so_factory().attachSchema(output, false)) {
LOGGER_WARN(logger_, "Failed to attach schema to object.");
return false;
@@ -1879,8 +1877,8 @@ bool ApplicationManagerImpl::ConvertMessageToSO(
// TODO(PV):
// removed NOTREACHED() because some app can still have vesion 1.
LOGGER_WARN(logger_,
- "Application used unsupported protocol :"
- << message.protocol_version() << ".");
+ "Application used unsupported protocol :"
+ << message.protocol_version() << ".");
return false;
}
@@ -2148,18 +2146,17 @@ void ApplicationManagerImpl::PullLanguagesInfo(const SmartObject& app_data,
app_data[json::languages][specific_idx][cur_vr_lang][json::ttsName];
} else {
LOGGER_DEBUG(logger_,
- "No data for ttsName for " << cur_vr_lang << " language");
+ "No data for ttsName for " << cur_vr_lang << " language");
}
if (app_data[json::languages][specific_idx][cur_vr_lang].keyExists(
json::vrSynonyms)) {
- LOGGER_DEBUG(logger_,
- "Get vrSynonyms from " << cur_vr_lang << " language");
+ LOGGER_DEBUG(logger_, "Get vrSynonyms from " << cur_vr_lang << " language");
vrSynonym =
app_data[json::languages][specific_idx][cur_vr_lang][json::vrSynonyms];
} else {
LOGGER_DEBUG(logger_,
- "No data for vrSynonyms for " << cur_vr_lang << " language");
+ "No data for vrSynonyms for " << cur_vr_lang << " language");
}
}
@@ -2182,8 +2179,8 @@ void ApplicationManagerImpl::CreateApplications(SmartArray& obj_array,
application_by_policy_id(policy_app_id);
if (registered_app) {
LOGGER_DEBUG(logger_,
- "Application with the same id: "
- << policy_app_id << " is registered already.");
+ "Application with the same id: "
+ << policy_app_id << " is registered already.");
continue;
}
@@ -2224,7 +2221,7 @@ void ApplicationManagerImpl::CreateApplications(SmartArray& obj_array,
connection_handler().GetDataOnSessionKey(
connection_key, NULL, NULL, &device_id)) {
LOGGER_ERROR(logger_,
- "Failed to create application: no connection info.");
+ "Failed to create application: no connection info.");
continue;
}
@@ -2257,11 +2254,11 @@ void ApplicationManagerImpl::CreateApplications(SmartArray& obj_array,
app->set_tts_name(ttsName);
sync_primitives::AutoLock lock(apps_to_register_list_lock_);
- LOGGER_DEBUG(
- logger_, "apps_to_register_ size before: " << apps_to_register_.size());
+ LOGGER_DEBUG(logger_,
+ "apps_to_register_ size before: " << apps_to_register_.size());
apps_to_register_.insert(app);
LOGGER_DEBUG(logger_,
- "apps_to_register_ size after: " << apps_to_register_.size());
+ "apps_to_register_ size after: " << apps_to_register_.size());
}
}
@@ -2422,8 +2419,7 @@ void ApplicationManagerImpl::SendOnSDLClose() {
message_to_send->set_smart_object(*msg);
#else
if (!ConvertSOtoMessage(*msg, *message_to_send)) {
- LOGGER_WARN(logger_,
- "Cannot send message to HMI: failed to create string");
+ LOGGER_WARN(logger_, "Cannot send message to HMI: failed to create string");
return;
}
#endif // HMI_DBUS_API
@@ -2485,8 +2481,8 @@ void ApplicationManagerImpl::RemoveAppsWaitingForRegistration(
while (apps_to_register_.end() != it_app) {
LOGGER_DEBUG(logger_,
- "Waiting app: " << (*it_app)->name().c_str()
- << " is removed.");
+ "Waiting app: " << (*it_app)->name().c_str()
+ << " is removed.");
apps_to_register_.erase(it_app);
it_app = std::find_if(
apps_to_register_.begin(), apps_to_register_.end(), device_finder);
@@ -2501,10 +2497,10 @@ void ApplicationManagerImpl::UnregisterApplication(
bool is_resuming,
bool is_unexpected_disconnect) {
LOGGER_DEBUG(logger_,
- "app_id = " << app_id << "; reason = " << reason
- << "; is_resuming = " << is_resuming
- << "; is_unexpected_disconnect = "
- << is_unexpected_disconnect);
+ "app_id = " << app_id << "; reason = " << reason
+ << "; is_resuming = " << is_resuming
+ << "; is_unexpected_disconnect = "
+ << is_unexpected_disconnect);
size_t subscribed_for_way_points_app_count = 0;
// SDL sends UnsubscribeWayPoints only for last application
@@ -2582,8 +2578,8 @@ void ApplicationManagerImpl::UnregisterApplication(
AppV4DevicePredicate finder(handle);
ApplicationSharedPtr app = FindApp(accessor, finder);
if (!app) {
- LOGGER_DEBUG(
- logger_, "There is no more SDL4 apps with device handle: " << handle);
+ LOGGER_DEBUG(logger_,
+ "There is no more SDL4 apps with device handle: " << handle);
RemoveAppsWaitingForRegistration(handle);
SendUpdateAppList();
@@ -2632,7 +2628,7 @@ void ApplicationManagerImpl::Handle(const impl::MessageFromMobile message) {
void ApplicationManagerImpl::Handle(const impl::MessageToMobile message) {
if (!protocol_handler_) {
LOGGER_WARN(logger_,
- "Protocol Handler is not set; cannot send message to mobile.");
+ "Protocol Handler is not set; cannot send message to mobile.");
return;
}
@@ -2742,9 +2738,9 @@ mobile_apis::Result::eType ApplicationManagerImpl::CheckPolicyPermissions(
const std::string stringified_hmi_level =
MessageHelper::StringifiedHMILevel(hmi_level);
LOGGER_DEBUG(logger_,
- "Checking permissions for " << policy_app_id << " in "
- << stringified_hmi_level << " rpc "
- << stringified_functionID);
+ "Checking permissions for " << policy_app_id << " in "
+ << stringified_hmi_level << " rpc "
+ << stringified_functionID);
policy::CheckPermissionResult result;
GetPolicyHandler().CheckPermissions(policy_app_id,
stringified_hmi_level,
@@ -3060,7 +3056,7 @@ void ApplicationManagerImpl::CloseNaviApp() {
if (navi_service_status_.end() != it) {
if (it->second.first || it->second.second) {
LOGGER_INFO(logger_,
- "App haven't answered for EndService. Unregister it.");
+ "App haven't answered for EndService. Unregister it.");
ManageMobileCommand(
MessageHelper::GetOnAppInterfaceUnregisteredNotificationToMobile(
app_id, PROTOCOL_VIOLATION),
@@ -3149,8 +3145,8 @@ mobile_apis::Result::eType ApplicationManagerImpl::SaveBinary(
const std::string& file_name,
const int64_t offset) {
LOGGER_DEBUG(logger_,
- "SaveBinaryWithOffset binary_size = "
- << binary_data.size() << " offset = " << offset);
+ "SaveBinaryWithOffset binary_size = "
+ << binary_data.size() << " offset = " << offset);
if (binary_data.size() > file_system::GetAvailableDiskSpace(file_path)) {
LOGGER_ERROR(logger_, "Out of free disc space.");
@@ -3163,8 +3159,8 @@ mobile_apis::Result::eType ApplicationManagerImpl::SaveBinary(
if (offset != 0) {
if (file_size != offset) {
LOGGER_DEBUG(logger_,
- "ApplicationManagerImpl::SaveBinaryWithOffset offset"
- << " does'n match existing file size");
+ "ApplicationManagerImpl::SaveBinaryWithOffset offset"
+ << " does'n match existing file size");
return mobile_apis::Result::INVALID_DATA;
}
file_stream = file_system::Open(full_file_path, std::ios_base::app);
@@ -3249,7 +3245,7 @@ void ApplicationManagerImpl::OnTimerSendTTSGlobalProperties() {
if (!app_list.empty()) {
for (uint32_t i = 0; i < app_list.size(); ++i) {
LOGGER_INFO(logger_,
- "Send TTS GlobalProperties to HMI with default helpPrompt");
+ "Send TTS GlobalProperties to HMI with default helpPrompt");
MessageHelper::SendTTSGlobalProperties(
application(app_list[i]), true, *this);
RemoveAppFromTTSGlobalPropertiesList(app_list[i]);
@@ -3418,16 +3414,16 @@ ProtocolVersion ApplicationManagerImpl::SupportedSDLVersion() const {
if (sdl4_support) {
LOGGER_DEBUG(logger_,
- "SDL Supported protocol version " << ProtocolVersion::kV4);
+ "SDL Supported protocol version " << ProtocolVersion::kV4);
return ProtocolVersion::kV4;
}
if (heart_beat_support) {
LOGGER_DEBUG(logger_,
- "SDL Supported protocol version " << ProtocolVersion::kV3);
+ "SDL Supported protocol version " << ProtocolVersion::kV3);
return ProtocolVersion::kV3;
}
LOGGER_DEBUG(logger_,
- "SDL Supported protocol version " << ProtocolVersion::kV2);
+ "SDL Supported protocol version " << ProtocolVersion::kV2);
return ProtocolVersion::kV2;
}
@@ -3452,12 +3448,12 @@ bool ApplicationManagerImpl::InitDirectory(
// if storage directory doesn't exist try to create it
if (!file_system::CreateDirectoryRecursively(path)) {
LOGGER_ERROR(logger_,
- "Unable to create " << directory_type << " directory "
- << path);
+ "Unable to create " << directory_type << " directory "
+ << path);
return false;
}
LOGGER_DEBUG(logger_,
- directory_type << " directory has been created: " << path);
+ directory_type << " directory has been created: " << path);
}
return true;
@@ -3469,13 +3465,13 @@ bool ApplicationManagerImpl::IsReadWriteAllowed(const std::string& path,
if (!(file_system::IsWritingAllowed(path) &&
file_system::IsReadingAllowed(path))) {
LOGGER_ERROR(logger_,
- directory_type
- << " directory doesn't have read/write permissions.");
+ directory_type
+ << " directory doesn't have read/write permissions.");
return false;
}
LOGGER_DEBUG(logger_,
- directory_type << " directory has read/write permissions.");
+ directory_type << " directory has read/write permissions.");
return true;
}
diff --git a/src/components/application_manager/src/application_state.cc b/src/components/application_manager/src/application_state.cc
index b3ca85a1ae..9450621b61 100644
--- a/src/components/application_manager/src/application_state.cc
+++ b/src/components/application_manager/src/application_state.cc
@@ -88,8 +88,7 @@ void ApplicationState::RemoveState(HmiState::StateID state) {
switch (state) {
case HmiState::StateID::STATE_ID_CURRENT:
case HmiState::StateID::STATE_ID_REGULAR:
- LOGGER_ERROR(logger_,
- "State of type '" << state << "'can't be removed.");
+ LOGGER_ERROR(logger_, "State of type '" << state << "'can't be removed.");
break;
case HmiState::StateID::STATE_ID_POSTPONED:
RemovePostponedState();
diff --git a/src/components/application_manager/src/commands/command_impl.cc b/src/components/application_manager/src/commands/command_impl.cc
index 745d96a499..1811cf6b58 100644
--- a/src/components/application_manager/src/commands/command_impl.cc
+++ b/src/components/application_manager/src/commands/command_impl.cc
@@ -101,9 +101,9 @@ void CommandImpl::ReplaceMobileByHMIAppId(
application_manager_.application(message[strings::app_id].asUInt());
if (application.valid()) {
LOGGER_DEBUG(logger_,
- "ReplaceMobileByHMIAppId from "
- << message[strings::app_id].asInt() << " to "
- << application->hmi_app_id());
+ "ReplaceMobileByHMIAppId from "
+ << message[strings::app_id].asInt() << " to "
+ << application->hmi_app_id());
message[strings::app_id] = application->hmi_app_id();
}
} else {
@@ -139,9 +139,9 @@ void CommandImpl::ReplaceHMIByMobileAppId(
if (application.valid()) {
LOGGER_DEBUG(logger_,
- "ReplaceHMIByMobileAppId from "
- << message[strings::app_id].asInt() << " to "
- << application->app_id());
+ "ReplaceHMIByMobileAppId from "
+ << message[strings::app_id].asInt() << " to "
+ << application->app_id());
message[strings::app_id] = application->app_id();
}
} else {
diff --git a/src/components/application_manager/src/commands/command_request_impl.cc b/src/components/application_manager/src/commands/command_request_impl.cc
index 2c2e8c6342..bbfe5eca24 100644
--- a/src/components/application_manager/src/commands/command_request_impl.cc
+++ b/src/components/application_manager/src/commands/command_request_impl.cc
@@ -204,8 +204,8 @@ uint32_t CommandRequestImpl::SendHMIRequest(
application_manager_.GetNextHMICorrelationID();
if (use_events) {
LOGGER_DEBUG(logger_,
- "subscribe_on_event " << function_id << " "
- << hmi_correlation_id);
+ "subscribe_on_event " << function_id << " "
+ << hmi_correlation_id);
subscribe_on_event(function_id, hmi_correlation_id);
}
@@ -485,8 +485,8 @@ void CommandRequestImpl::RemoveDisallowedParameters(
params.erase(key);
parameters_permissions_.undefined_params.push_back(key);
LOGGER_INFO(logger_,
- "Following parameter is not found among allowed parameters '"
- << key << "' and will be treated as disallowed.");
+ "Following parameter is not found among allowed parameters '"
+ << key << "' and will be treated as disallowed.");
}
}
}
diff --git a/src/components/application_manager/src/commands/hmi/navi_audio_start_stream_request.cc b/src/components/application_manager/src/commands/hmi/navi_audio_start_stream_request.cc
index 7f725ebb27..520aeca466 100644
--- a/src/components/application_manager/src/commands/hmi/navi_audio_start_stream_request.cc
+++ b/src/components/application_manager/src/commands/hmi/navi_audio_start_stream_request.cc
@@ -50,8 +50,8 @@ AudioStartStreamRequest::AudioStartStreamRequest(
default_timeout_ = stream_retry.second;
retry_number_ = stream_retry.first;
LOGGER_DEBUG(logger_,
- "default_timeout_ = " << default_timeout_
- << "; retry_number_ = " << retry_number_);
+ "default_timeout_ = " << default_timeout_
+ << "; retry_number_ = " << retry_number_);
}
AudioStartStreamRequest::~AudioStartStreamRequest() {}
@@ -70,8 +70,8 @@ void AudioStartStreamRequest::Run() {
SendRequest();
} else {
LOGGER_ERROR(logger_,
- "Applcation with hmi_app_id " << application_id()
- << " does not exist");
+ "Applcation with hmi_app_id " << application_id()
+ << " does not exist");
}
}
@@ -83,7 +83,7 @@ void AudioStartStreamRequest::on_event(const event_engine::Event& event) {
application_manager_.application_by_hmi_app(application_id());
if (!app) {
LOGGER_ERROR(logger_,
- "StartAudioStreamRequest aborted. Application not found");
+ "StartAudioStreamRequest aborted. Application not found");
return;
}
@@ -134,7 +134,7 @@ void AudioStartStreamRequest::RetryStartSession() {
application_manager_.application_by_hmi_app(application_id());
if (!app) {
LOGGER_ERROR(logger_,
- "StartAudioStreamRequest aborted. Application not found");
+ "StartAudioStreamRequest aborted. Application not found");
return;
}
@@ -145,8 +145,8 @@ void AudioStartStreamRequest::RetryStartSession() {
if (app->audio_streaming_approved()) {
LOGGER_INFO(logger_,
- "AudioStartStream retry sequence stopped. "
- << "SUCCESS received");
+ "AudioStartStream retry sequence stopped. "
+ << "SUCCESS received");
app->set_audio_stream_retry_number(0);
return;
}
@@ -160,8 +160,8 @@ void AudioStartStreamRequest::RetryStartSession() {
app->set_audio_stream_retry_number(++curr_retry_number);
} else {
LOGGER_DEBUG(logger_,
- "Audio start stream retry sequence stopped. "
- << "Attempts expired.");
+ "Audio start stream retry sequence stopped. "
+ << "Attempts expired.");
application_manager_.EndNaviServices(app->app_id());
}
diff --git a/src/components/application_manager/src/commands/hmi/navi_start_stream_request.cc b/src/components/application_manager/src/commands/hmi/navi_start_stream_request.cc
index ed5a2d8c8d..d715ec0fad 100644
--- a/src/components/application_manager/src/commands/hmi/navi_start_stream_request.cc
+++ b/src/components/application_manager/src/commands/hmi/navi_start_stream_request.cc
@@ -50,8 +50,8 @@ NaviStartStreamRequest::NaviStartStreamRequest(
default_timeout_ = stream_retry.second;
retry_number_ = stream_retry.first;
LOGGER_DEBUG(logger_,
- "default_timeout_ = " << default_timeout_
- << "; retry_number_ = " << retry_number_);
+ "default_timeout_ = " << default_timeout_
+ << "; retry_number_ = " << retry_number_);
}
NaviStartStreamRequest::~NaviStartStreamRequest() {}
@@ -70,8 +70,8 @@ void NaviStartStreamRequest::Run() {
SendRequest();
} else {
LOGGER_ERROR(logger_,
- "Applcation with hmi_app_id " << application_id()
- << "does not exist");
+ "Applcation with hmi_app_id " << application_id()
+ << "does not exist");
}
}
@@ -83,7 +83,7 @@ void NaviStartStreamRequest::on_event(const event_engine::Event& event) {
application_manager_.application_by_hmi_app(application_id());
if (!app) {
LOGGER_ERROR(logger_,
- "NaviStartStreamRequest aborted. Application not found");
+ "NaviStartStreamRequest aborted. Application not found");
return;
}
@@ -134,7 +134,7 @@ void NaviStartStreamRequest::RetryStartSession() {
application_manager_.application_by_hmi_app(application_id());
if (!app) {
LOGGER_ERROR(logger_,
- "NaviStartStreamRequest aborted. Application not found");
+ "NaviStartStreamRequest aborted. Application not found");
return;
}
@@ -145,8 +145,8 @@ void NaviStartStreamRequest::RetryStartSession() {
if (app->video_streaming_approved()) {
LOGGER_INFO(logger_,
- "NaviStartStream retry sequence stopped. "
- << "SUCCESS received");
+ "NaviStartStream retry sequence stopped. "
+ << "SUCCESS received");
app->set_video_stream_retry_number(0);
return;
}
@@ -160,8 +160,8 @@ void NaviStartStreamRequest::RetryStartSession() {
app->set_video_stream_retry_number(++curr_retry_number);
} else {
LOGGER_DEBUG(logger_,
- "NaviStartStream retry sequence stopped. "
- << "Attempts expired");
+ "NaviStartStream retry sequence stopped. "
+ << "Attempts expired");
application_manager_.EndNaviServices(app->app_id());
}
diff --git a/src/components/application_manager/src/commands/hmi/on_system_request_notification.cc b/src/components/application_manager/src/commands/hmi/on_system_request_notification.cc
index 86b72cc72e..9f3fc28e95 100644
--- a/src/components/application_manager/src/commands/hmi/on_system_request_notification.cc
+++ b/src/components/application_manager/src/commands/hmi/on_system_request_notification.cc
@@ -77,8 +77,8 @@ void OnSystemRequestNotification::Run() {
if (!app.valid()) {
LOGGER_WARN(logger_,
- "Application with connection key " << app_id
- << "is not registered.");
+ "Application with connection key " << app_id
+ << "is not registered.");
return;
}
diff --git a/src/components/application_manager/src/commands/hmi/sdl_activate_app_request.cc b/src/components/application_manager/src/commands/hmi/sdl_activate_app_request.cc
index 60db4da0e6..83e3fa5e06 100644
--- a/src/components/application_manager/src/commands/hmi/sdl_activate_app_request.cc
+++ b/src/components/application_manager/src/commands/hmi/sdl_activate_app_request.cc
@@ -63,9 +63,9 @@ void SDLActivateAppRequest::Run() {
DevicesApps devices_apps = FindAllAppOnParticularDevice(app->device());
if (!devices_apps.first && devices_apps.second.empty()) {
LOGGER_ERROR(logger_,
- "Can't find regular foreground app with the same "
- "connection id:"
- << app->device());
+ "Can't find regular foreground app with the same "
+ "connection id:"
+ << app->device());
SendResponse(false, correlation_id(), SDL_ActivateApp, NO_APPS_REGISTERED);
return;
}
@@ -125,8 +125,8 @@ void SDLActivateAppRequest::on_event(const event_engine::Event& event) {
ApplicationSharedPtr app =
application_manager_.application_by_hmi_app(hmi_application_id);
if (!app) {
- LOGGER_ERROR(
- logger_, "Application not found by HMI app id: " << hmi_application_id);
+ LOGGER_ERROR(logger_,
+ "Application not found by HMI app id: " << hmi_application_id);
return;
}
application_manager_.GetPolicyHandler().OnActivateApp(app->app_id(),
diff --git a/src/components/application_manager/src/commands/hmi/sdl_get_user_friendly_message_request.cc b/src/components/application_manager/src/commands/hmi/sdl_get_user_friendly_message_request.cc
index 8ad82ff884..68e3b4dfeb 100644
--- a/src/components/application_manager/src/commands/hmi/sdl_get_user_friendly_message_request.cc
+++ b/src/components/application_manager/src/commands/hmi/sdl_get_user_friendly_message_request.cc
@@ -48,7 +48,7 @@ void SDLGetUserFriendlyMessageRequest::Run() {
const std::string messageCodes = "messageCodes";
if (!(*message_)[strings::msg_params].keyExists(messageCodes)) {
LOGGER_WARN(logger_,
- "Mandatory parameter '" + messageCodes + "'' is missing");
+ "Mandatory parameter '" + messageCodes + "'' is missing");
return;
}
smart_objects::SmartArray* msg =
diff --git a/src/components/application_manager/src/commands/hmi/tts_get_language_response.cc b/src/components/application_manager/src/commands/hmi/tts_get_language_response.cc
index 0b833e5064..1db0c5c823 100644
--- a/src/components/application_manager/src/commands/hmi/tts_get_language_response.cc
+++ b/src/components/application_manager/src/commands/hmi/tts_get_language_response.cc
@@ -58,9 +58,9 @@ void TTSGetLanguageResponse::Run() {
application_manager_.hmi_capabilities().set_active_tts_language(language);
LOGGER_DEBUG(logger_,
- "Raising event for function_id " << function_id()
- << " and correlation_id "
- << correlation_id());
+ "Raising event for function_id " << function_id()
+ << " and correlation_id "
+ << correlation_id());
event_engine::Event event(FunctionID::TTS_GetLanguage);
event.set_smart_object(*message_);
event.raise(application_manager_.event_dispatcher());
diff --git a/src/components/application_manager/src/commands/hmi/ui_get_language_response.cc b/src/components/application_manager/src/commands/hmi/ui_get_language_response.cc
index 5da935c4ab..a7ba18bb6e 100644
--- a/src/components/application_manager/src/commands/hmi/ui_get_language_response.cc
+++ b/src/components/application_manager/src/commands/hmi/ui_get_language_response.cc
@@ -59,9 +59,9 @@ void UIGetLanguageResponse::Run() {
application_manager_.hmi_capabilities().set_active_ui_language(language);
LOGGER_DEBUG(logger_,
- "Raising event for function_id " << function_id()
- << " and correlation_id "
- << correlation_id());
+ "Raising event for function_id " << function_id()
+ << " and correlation_id "
+ << correlation_id());
event_engine::Event event(FunctionID::UI_GetLanguage);
event.set_smart_object(*message_);
event.raise(application_manager_.event_dispatcher());
diff --git a/src/components/application_manager/src/commands/hmi/vr_get_language_response.cc b/src/components/application_manager/src/commands/hmi/vr_get_language_response.cc
index 472d01af81..8f1384ebaa 100644
--- a/src/components/application_manager/src/commands/hmi/vr_get_language_response.cc
+++ b/src/components/application_manager/src/commands/hmi/vr_get_language_response.cc
@@ -59,9 +59,9 @@ void VRGetLanguageResponse::Run() {
application_manager_.hmi_capabilities().set_active_vr_language(language);
LOGGER_DEBUG(logger_,
- "Raising event for function_id " << function_id()
- << " and correlation_id "
- << correlation_id());
+ "Raising event for function_id " << function_id()
+ << " and correlation_id "
+ << correlation_id());
event_engine::Event event(FunctionID::VR_GetLanguage);
event.set_smart_object(*message_);
event.raise(application_manager_.event_dispatcher());
diff --git a/src/components/application_manager/src/commands/mobile/add_command_request.cc b/src/components/application_manager/src/commands/mobile/add_command_request.cc
index b9114d8bd8..d596acbe9a 100644
--- a/src/components/application_manager/src/commands/mobile/add_command_request.cc
+++ b/src/components/application_manager/src/commands/mobile/add_command_request.cc
@@ -83,8 +83,8 @@ void AddCommandRequest::Run() {
application_manager_);
if (mobile_apis::Result::SUCCESS != verification_result) {
- LOGGER_ERROR(
- logger_, "MessageHelper::VerifyImage return " << verification_result);
+ LOGGER_ERROR(logger_,
+ "MessageHelper::VerifyImage return " << verification_result);
SendResponse(false, verification_result);
return;
}
@@ -226,8 +226,8 @@ bool AddCommandRequest::CheckCommandName(ApplicationConstSharedPtr app) {
[strings::menu_name].asString()) &&
(saved_parent_id == parent_id)) {
LOGGER_INFO(logger_,
- "AddCommandRequest::CheckCommandName received"
- " command name already exist in same level menu");
+ "AddCommandRequest::CheckCommandName received"
+ " command name already exist in same level menu");
return false;
}
}
@@ -260,8 +260,8 @@ bool AddCommandRequest::CheckCommandVRSynonym(ApplicationConstSharedPtr app) {
if (vr_cmd_i.CompareIgnoreCase(vr_cmd_j)) {
LOGGER_INFO(logger_,
- "AddCommandRequest::CheckCommandVRSynonym"
- " received command vr synonym already exist");
+ "AddCommandRequest::CheckCommandVRSynonym"
+ " received command vr synonym already exist");
return false;
}
}
@@ -282,8 +282,8 @@ bool AddCommandRequest::CheckCommandParentId(ApplicationConstSharedPtr app) {
if (!parent) {
LOGGER_INFO(logger_,
- "AddCommandRequest::CheckCommandParentId received"
- " submenu doesn't exist");
+ "AddCommandRequest::CheckCommandParentId received"
+ " submenu doesn't exist");
return false;
}
return true;
diff --git a/src/components/application_manager/src/commands/mobile/alert_maneuver_request.cc b/src/components/application_manager/src/commands/mobile/alert_maneuver_request.cc
index 321b987c92..d5f8d52899 100644
--- a/src/components/application_manager/src/commands/mobile/alert_maneuver_request.cc
+++ b/src/components/application_manager/src/commands/mobile/alert_maneuver_request.cc
@@ -74,8 +74,8 @@ void AlertManeuverRequest::Run() {
if (IsWhiteSpaceExist()) {
LOGGER_ERROR(logger_,
- "Incoming alert maneuver has contains \\t\\n \\\\t \\\\n"
- "text contains only whitespace in ttsChunks");
+ "Incoming alert maneuver has contains \\t\\n \\\\t \\\\n"
+ "text contains only whitespace in ttsChunks");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
return;
}
@@ -179,8 +179,8 @@ void AlertManeuverRequest::on_event(const event_engine::Event& event) {
if (!pending_requests_.IsFinal(event_id)) {
LOGGER_DEBUG(logger_,
- "There are some pending responses from HMI."
- "AlertManeuverRequest still waiting.");
+ "There are some pending responses from HMI."
+ "AlertManeuverRequest still waiting.");
return;
}
diff --git a/src/components/application_manager/src/commands/mobile/alert_request.cc b/src/components/application_manager/src/commands/mobile/alert_request.cc
index 877cca9682..8ed116abe5 100644
--- a/src/components/application_manager/src/commands/mobile/alert_request.cc
+++ b/src/components/application_manager/src/commands/mobile/alert_request.cc
@@ -78,8 +78,8 @@ bool AlertRequest::Init() {
// response.
if ((*message_)[strings::msg_params].keyExists(strings::soft_buttons)) {
LOGGER_INFO(logger_,
- "Request contains soft buttons - request timeout "
- "will be set to 0.");
+ "Request contains soft buttons - request timeout "
+ "will be set to 0.");
default_timeout_ = 0;
}
@@ -125,8 +125,8 @@ void AlertRequest::onTimeOut() {
return;
}
LOGGER_INFO(logger_,
- "Default timeout ignored. "
- "AlertRequest with soft buttons wait timeout on HMI side");
+ "Default timeout ignored. "
+ "AlertRequest with soft buttons wait timeout on HMI side");
}
void AlertRequest::on_event(const event_engine::Event& event) {
@@ -139,11 +139,11 @@ void AlertRequest::on_event(const event_engine::Event& event) {
case hmi_apis::FunctionID::TTS_OnResetTimeout:
case hmi_apis::FunctionID::UI_OnResetTimeout: {
LOGGER_INFO(logger_,
- "Received UI_OnResetTimeout event "
- " or TTS_OnResetTimeout event"
- << awaiting_tts_speak_response_ << " "
- << awaiting_tts_stop_speaking_response_ << " "
- << awaiting_ui_alert_response_);
+ "Received UI_OnResetTimeout event "
+ " or TTS_OnResetTimeout event"
+ << awaiting_tts_speak_response_ << " "
+ << awaiting_tts_stop_speaking_response_ << " "
+ << awaiting_ui_alert_response_);
application_manager_.updateRequestTimeout(
connection_key(), correlation_id(), default_timeout());
break;
diff --git a/src/components/application_manager/src/commands/mobile/change_registration_request.cc b/src/components/application_manager/src/commands/mobile/change_registration_request.cc
index 693a1744d3..8f721b8783 100644
--- a/src/components/application_manager/src/commands/mobile/change_registration_request.cc
+++ b/src/components/application_manager/src/commands/mobile/change_registration_request.cc
@@ -81,7 +81,7 @@ void ChangeRegistrationRequest::Run() {
if (IsWhiteSpaceExist()) {
LOGGER_INFO(logger_,
- "Incoming request contains \t\n \\t \\n or whitespace");
+ "Incoming request contains \t\n \\t \\n or whitespace");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
return;
}
@@ -250,8 +250,8 @@ void ChangeRegistrationRequest::on_event(const event_engine::Event& event) {
&(message[strings::msg_params]));
} else {
LOGGER_INFO(logger_,
- "There are some pending responses from HMI."
- "ChangeRegistrationRequest still waiting.");
+ "There are some pending responses from HMI."
+ "ChangeRegistrationRequest still waiting.");
}
}
@@ -357,7 +357,7 @@ bool ChangeRegistrationRequest::IsWhiteSpaceExist() {
.asCharArray();
if (!CheckSyntax(str)) {
LOGGER_ERROR(logger_,
- "Invalid ngn_media_screen_app_name syntax check failed");
+ "Invalid ngn_media_screen_app_name syntax check failed");
return true;
}
}
@@ -441,8 +441,8 @@ bool ChangeRegistrationRequest::IsNicknameAllowed(
if (!app) {
LOGGER_ERROR(logger_,
- "Can't find appication with connection key "
- << connection_key());
+ "Can't find appication with connection key "
+ << connection_key());
return false;
}
@@ -456,8 +456,8 @@ bool ChangeRegistrationRequest::IsNicknameAllowed(
if (!init_result) {
LOGGER_ERROR(logger_,
- "Error during getting of nickname list for application "
- << policy_app_id);
+ "Error during getting of nickname list for application "
+ << policy_app_id);
return false;
}
@@ -466,8 +466,7 @@ bool ChangeRegistrationRequest::IsNicknameAllowed(
policy::StringArray::const_iterator it =
std::find_if(app_nicknames.begin(), app_nicknames.end(), compare);
if (app_nicknames.end() == it) {
- LOGGER_WARN(logger_,
- "Application name was not found in nicknames list.");
+ LOGGER_WARN(logger_, "Application name was not found in nicknames list.");
usage_statistics::AppCounter count_of_rejections_nickname_mismatch(
application_manager_.GetPolicyHandler().GetStatisticManager(),
diff --git a/src/components/application_manager/src/commands/mobile/create_interaction_choice_set_request.cc b/src/components/application_manager/src/commands/mobile/create_interaction_choice_set_request.cc
index 282206b9e7..7d7537edf0 100644
--- a/src/components/application_manager/src/commands/mobile/create_interaction_choice_set_request.cc
+++ b/src/components/application_manager/src/commands/mobile/create_interaction_choice_set_request.cc
@@ -101,7 +101,7 @@ void CreateInteractionChoiceSetRequest::Run() {
if (app->FindChoiceSet(choice_set_id_)) {
LOGGER_ERROR(logger_,
- "Choice set with id " << choice_set_id_ << " is not found.");
+ "Choice set with id " << choice_set_id_ << " is not found.");
SendResponse(false, Result::INVALID_ID);
return;
}
@@ -134,9 +134,9 @@ mobile_apis::Result::eType CreateInteractionChoiceSetRequest::CheckChoiceSet(
choice_id_set.insert((*choice_set_it)[strings::choice_id].asInt());
if (!ins_res.second) {
LOGGER_ERROR(logger_,
- "Choise with ID "
- << (*choice_set_it)[strings::choice_id].asInt()
- << " already exists");
+ "Choise with ID "
+ << (*choice_set_it)[strings::choice_id].asInt()
+ << " already exists");
return mobile_apis::Result::INVALID_ID;
}
@@ -167,8 +167,8 @@ bool CreateInteractionChoiceSetRequest::compareSynonyms(
if (it != vr_cmds_1->end()) {
LOGGER_INFO(logger_,
- "Incoming choice set has duplicated VR synonyms "
- << it->asString());
+ "Incoming choice set has duplicated VR synonyms "
+ << it->asString());
return true;
}
@@ -232,8 +232,8 @@ bool CreateInteractionChoiceSetRequest::IsWhiteSpaceExist(
str = choice_set[strings::secondary_image][strings::value].asCharArray();
if (!CheckSyntax(str)) {
LOGGER_ERROR(logger_,
- "Invalid secondary_image value. "
- "Syntax check failed");
+ "Invalid secondary_image value. "
+ "Syntax check failed");
return true;
}
}
@@ -260,7 +260,7 @@ void CreateInteractionChoiceSetRequest::SendVRAddCommandRequests(
sync_primitives::AutoLock error_lock(error_from_hmi_lock_);
if (error_from_hmi_) {
LOGGER_WARN(logger_,
- "Error from HMI received. Stop sending VRCommands");
+ "Error from HMI received. Stop sending VRCommands");
break;
}
}
@@ -280,8 +280,8 @@ void CreateInteractionChoiceSetRequest::SendVRAddCommandRequests(
VRCommandInfo vr_command(vr_cmd_id);
sent_commands_map_[vr_corr_id] = vr_command;
LOGGER_DEBUG(logger_,
- "VR_command sent corr_id " << vr_corr_id << " cmd_id "
- << vr_corr_id);
+ "VR_command sent corr_id " << vr_corr_id << " cmd_id "
+ << vr_corr_id);
}
expected_chs_count_ = chs_num;
LOGGER_DEBUG(logger_, "expected_chs_count_ = " << expected_chs_count_);
@@ -297,9 +297,9 @@ void CreateInteractionChoiceSetRequest::on_event(
if (event.id() == hmi_apis::FunctionID::VR_AddCommand) {
received_chs_count_++;
LOGGER_DEBUG(logger_,
- "Got VR.AddCommand response, there are "
- << expected_chs_count_ - received_chs_count_
- << " more to wait.");
+ "Got VR.AddCommand response, there are "
+ << expected_chs_count_ - received_chs_count_
+ << " more to wait.");
uint32_t corr_id = static_cast<uint32_t>(
message[strings::params][strings::correlation_id].asUInt());
@@ -322,9 +322,9 @@ void CreateInteractionChoiceSetRequest::on_event(
vr_command.succesful_response_received_ = true;
} else {
LOGGER_DEBUG(logger_,
- "Hmi response is not Success: "
- << vr_result
- << ". Stop sending VRAddCommand requests");
+ "Hmi response is not Success: "
+ << vr_result
+ << ". Stop sending VRAddCommand requests");
if (!error_from_hmi_) {
error_from_hmi_ = true;
SendResponse(false, GetMobileResultCode(vr_result));
@@ -379,8 +379,8 @@ void CreateInteractionChoiceSetRequest::DeleteChoices() {
SendHMIRequest(hmi_apis::FunctionID::VR_DeleteCommand, &msg_param);
} else {
LOGGER_WARN(logger_,
- "Succesfull response has not been received for cmd_id = "
- << vr_command_info.cmd_id_);
+ "Succesfull response has not been received for cmd_id = "
+ << vr_command_info.cmd_id_);
}
}
sent_commands_map_.clear();
diff --git a/src/components/application_manager/src/commands/mobile/delete_command_request.cc b/src/components/application_manager/src/commands/mobile/delete_command_request.cc
index 87b1f19d4f..af63552f9d 100644
--- a/src/components/application_manager/src/commands/mobile/delete_command_request.cc
+++ b/src/components/application_manager/src/commands/mobile/delete_command_request.cc
@@ -123,8 +123,8 @@ void DeleteCommandRequest::on_event(const event_engine::Event& event) {
const int result = message[strings::params][hmi_response::code].asInt();
ui_result_ = static_cast<hmi_apis::Common_Result::eType>(result);
LOGGER_DEBUG(logger_,
- "Received UI_DeleteCommand event with result "
- << MessageHelper::HMIResultToString(ui_result_));
+ "Received UI_DeleteCommand event with result "
+ << MessageHelper::HMIResultToString(ui_result_));
break;
}
case hmi_apis::FunctionID::VR_DeleteCommand: {
@@ -132,8 +132,8 @@ void DeleteCommandRequest::on_event(const event_engine::Event& event) {
const int result = message[strings::params][hmi_response::code].asInt();
vr_result_ = static_cast<hmi_apis::Common_Result::eType>(result);
LOGGER_DEBUG(logger_,
- "Received VR_DeleteCommand event with result "
- << MessageHelper::HMIResultToString(vr_result_));
+ "Received VR_DeleteCommand event with result "
+ << MessageHelper::HMIResultToString(vr_result_));
break;
}
default: {
@@ -162,9 +162,9 @@ void DeleteCommandRequest::on_event(const event_engine::Event& event) {
if (!command) {
LOGGER_ERROR(logger_,
- "Command id " << cmd_id << " not found for "
- "application with connection key "
- << connection_key());
+ "Command id " << cmd_id << " not found for "
+ "application with connection key "
+ << connection_key());
return;
}
diff --git a/src/components/application_manager/src/commands/mobile/delete_file_request.cc b/src/components/application_manager/src/commands/mobile/delete_file_request.cc
index 92c024e50d..c8303cda6c 100644
--- a/src/components/application_manager/src/commands/mobile/delete_file_request.cc
+++ b/src/components/application_manager/src/commands/mobile/delete_file_request.cc
@@ -65,7 +65,7 @@ void DeleteFileRequest::Run() {
// If application is in the HMI_NONE level the quantity of allowed
// DeleteFile request is limited by the configuration profile
LOGGER_ERROR(logger_,
- "Too many requests from the app with HMILevel HMI_NONE ");
+ "Too many requests from the app with HMILevel HMI_NONE ");
SendResponse(false, mobile_apis::Result::REJECTED);
return;
}
diff --git a/src/components/application_manager/src/commands/mobile/delete_interaction_choice_set_request.cc b/src/components/application_manager/src/commands/mobile/delete_interaction_choice_set_request.cc
index 901f80f4a8..8717bef503 100644
--- a/src/components/application_manager/src/commands/mobile/delete_interaction_choice_set_request.cc
+++ b/src/components/application_manager/src/commands/mobile/delete_interaction_choice_set_request.cc
@@ -55,8 +55,8 @@ void DeleteInteractionChoiceSetRequest::Run() {
if (!app) {
LOGGER_ERROR(logger_,
- "No application associated with connection key "
- << connection_key());
+ "No application associated with connection key "
+ << connection_key());
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
@@ -67,7 +67,7 @@ void DeleteInteractionChoiceSetRequest::Run() {
if (!app->FindChoiceSet(choice_set_id)) {
LOGGER_ERROR(logger_,
- "Choice set with id " << choice_set_id << " is not found.");
+ "Choice set with id " << choice_set_id << " is not found.");
SendResponse(false, mobile_apis::Result::INVALID_ID);
return;
}
@@ -116,7 +116,7 @@ bool DeleteInteractionChoiceSetRequest::ChoiceSetInUse(
for (; choice.end() != choice_it; ++choice_it) {
if (choice_it->first == choice_set_id) {
LOGGER_ERROR(logger_,
- "Choice set with id " << choice_set_id << " is in use.");
+ "Choice set with id " << choice_set_id << " is in use.");
return true;
}
}
@@ -136,7 +136,7 @@ void DeleteInteractionChoiceSetRequest::SendVrDeleteCommand(
if (!choice_set) {
LOGGER_ERROR(logger_,
- "Choice set with id " << choice_set_id << " is not found.");
+ "Choice set with id " << choice_set_id << " is not found.");
return;
}
diff --git a/src/components/application_manager/src/commands/mobile/diagnostic_message_request.cc b/src/components/application_manager/src/commands/mobile/diagnostic_message_request.cc
index 20e4ca4880..a7bce9f92a 100644
--- a/src/components/application_manager/src/commands/mobile/diagnostic_message_request.cc
+++ b/src/components/application_manager/src/commands/mobile/diagnostic_message_request.cc
@@ -71,8 +71,8 @@ void DiagnosticMessageRequest::Run() {
supported_diag_modes.end(),
msg_diagnostic_mode)) {
LOGGER_ERROR(logger_,
- "Received diagnostic mode " << msg_diagnostic_mode
- << " is not supported.");
+ "Received diagnostic mode " << msg_diagnostic_mode
+ << " is not supported.");
SendResponse(false,
mobile_apis::Result::REJECTED,
"Received diagnostic mode is not supported.");
diff --git a/src/components/application_manager/src/commands/mobile/dial_number_request.cc b/src/components/application_manager/src/commands/mobile/dial_number_request.cc
index d879ae4736..e185bbcd21 100644
--- a/src/components/application_manager/src/commands/mobile/dial_number_request.cc
+++ b/src/components/application_manager/src/commands/mobile/dial_number_request.cc
@@ -77,7 +77,7 @@ void DialNumberRequest::Run() {
StripNumberParam(number);
if (number.empty()) {
LOGGER_ERROR(logger_,
- "After strip number param is empty. Invalid incoming data");
+ "After strip number param is empty. Invalid incoming data");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
return;
}
diff --git a/src/components/application_manager/src/commands/mobile/get_vehicle_data_request.cc b/src/components/application_manager/src/commands/mobile/get_vehicle_data_request.cc
index 1b6644cda2..181172bf88 100644
--- a/src/components/application_manager/src/commands/mobile/get_vehicle_data_request.cc
+++ b/src/components/application_manager/src/commands/mobile/get_vehicle_data_request.cc
@@ -137,7 +137,7 @@ void GetVehicleDataRequest::SendRequestsToHmi(const int32_t app_id) {
}
LOGGER_INFO(logger_,
- hmi_requests_.size() << " requests are going to be sent to HMI");
+ hmi_requests_.size() << " requests are going to be sent to HMI");
for (HmiRequests::const_iterator it = hmi_requests_.begin();
it != hmi_requests_.end();
@@ -183,9 +183,9 @@ void GetVehicleDataRequest::on_event(const event_engine::Event& event) {
status = mobile_api::Result::eType::GENERIC_ERROR;
}
LOGGER_TRACE(logger_,
- "Status from HMI: " << it->status
- << ", so response status become "
- << status);
+ "Status from HMI: " << it->status
+ << ", so response status become "
+ << status);
} else {
any_arg_success = true;
}
diff --git a/src/components/application_manager/src/commands/mobile/get_way_points_request.cc b/src/components/application_manager/src/commands/mobile/get_way_points_request.cc
index 04c3a97aeb..0237d0e1c0 100644
--- a/src/components/application_manager/src/commands/mobile/get_way_points_request.cc
+++ b/src/components/application_manager/src/commands/mobile/get_way_points_request.cc
@@ -18,8 +18,8 @@ void GetWayPointsRequest::Run() {
if (!app) {
LOGGER_ERROR(logger_,
- "An application with connection key "
- << connection_key() << " is not registered.");
+ "An application with connection key "
+ << connection_key() << " is not registered.");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
diff --git a/src/components/application_manager/src/commands/mobile/list_files_request.cc b/src/components/application_manager/src/commands/mobile/list_files_request.cc
index 825b78205a..c7ee41eda4 100644
--- a/src/components/application_manager/src/commands/mobile/list_files_request.cc
+++ b/src/components/application_manager/src/commands/mobile/list_files_request.cc
@@ -67,7 +67,7 @@ void ListFilesRequest::Run() {
// If application is in the HMI_NONE level the quantity of allowed
// DeleteFile request is limited by the configuration profile
LOGGER_ERROR(logger_,
- "Too many requests from the app with HMILevel HMI_NONE ");
+ "Too many requests from the app with HMILevel HMI_NONE ");
SendResponse(false, mobile_apis::Result::REJECTED);
return;
}
@@ -87,11 +87,11 @@ void ListFilesRequest::Run() {
// Plus one required for move to next letter after '/'.
if (i < application_manager_.get_settings().list_files_response_size()) {
LOGGER_DEBUG(logger_,
- "File " + filename + " added to ListFiles response");
+ "File " + filename + " added to ListFiles response");
(*message_)[strings::msg_params][strings::filenames][i++] = filename;
} else {
LOGGER_DEBUG(logger_,
- "File " + filename + " not added to ListFiles response");
+ "File " + filename + " not added to ListFiles response");
}
}
(*message_)[strings::params][strings::message_type] =
diff --git a/src/components/application_manager/src/commands/mobile/on_button_event_notification.cc b/src/components/application_manager/src/commands/mobile/on_button_event_notification.cc
index ecece3619b..53a670e168 100644
--- a/src/components/application_manager/src/commands/mobile/on_button_event_notification.cc
+++ b/src/components/application_manager/src/commands/mobile/on_button_event_notification.cc
@@ -67,7 +67,7 @@ void OnButtonEventNotification::Run() {
(*message_)[strings::msg_params].keyExists(
hmi_response::custom_button_id)) {
LOGGER_ERROR(logger_,
- "CUSTOM_BUTTON OnButtonEvent without custom_button_id.");
+ "CUSTOM_BUTTON OnButtonEvent without custom_button_id.");
return;
}
@@ -86,7 +86,7 @@ void OnButtonEventNotification::Run() {
if (false == app->IsSubscribedToSoftButton(custom_btn_id)) {
LOGGER_ERROR(logger_,
- "Application doesn't subscribed to this custom_button_id.");
+ "Application doesn't subscribed to this custom_button_id.");
return;
}
@@ -109,8 +109,8 @@ void OnButtonEventNotification::Run() {
if ((mobile_api::HMILevel::HMI_FULL != subscribed_app->hmi_level()) &&
(mobile_api::HMILevel::HMI_LIMITED != subscribed_app->hmi_level())) {
LOGGER_WARN(logger_,
- "OnButtonEvent notification is allowed only"
- << "in FULL or LIMITED hmi level");
+ "OnButtonEvent notification is allowed only"
+ << "in FULL or LIMITED hmi level");
continue;
}
@@ -118,8 +118,8 @@ void OnButtonEventNotification::Run() {
if ((static_cast<uint32_t>(mobile_apis::ButtonName::OK) == btn_id) &&
(mobile_api::HMILevel::HMI_FULL != subscribed_app->hmi_level())) {
LOGGER_WARN(logger_,
- "OnButtonEvent notification for OK button"
- << "is allowed only in FULL hmi level");
+ "OnButtonEvent notification for OK button"
+ << "is allowed only in FULL hmi level");
continue;
}
diff --git a/src/components/application_manager/src/commands/mobile/on_button_press_notification.cc b/src/components/application_manager/src/commands/mobile/on_button_press_notification.cc
index 20d961e12d..9f3e5f604f 100644
--- a/src/components/application_manager/src/commands/mobile/on_button_press_notification.cc
+++ b/src/components/application_manager/src/commands/mobile/on_button_press_notification.cc
@@ -67,7 +67,7 @@ void OnButtonPressNotification::Run() {
(*message_)[strings::msg_params].keyExists(
hmi_response::custom_button_id)) {
LOGGER_ERROR(logger_,
- "CUSTOM_BUTTON OnButtonPress without custom_button_id.");
+ "CUSTOM_BUTTON OnButtonPress without custom_button_id.");
return;
}
@@ -86,7 +86,7 @@ void OnButtonPressNotification::Run() {
if (false == app->IsSubscribedToSoftButton(custom_btn_id)) {
LOGGER_ERROR(logger_,
- "Application doesn't subscribed to this custom_button_id.");
+ "Application doesn't subscribed to this custom_button_id.");
return;
}
@@ -109,8 +109,8 @@ void OnButtonPressNotification::Run() {
if ((mobile_api::HMILevel::HMI_FULL != subscribed_app->hmi_level()) &&
(mobile_api::HMILevel::HMI_LIMITED != subscribed_app->hmi_level())) {
LOGGER_WARN(logger_,
- "OnButtonPress notification is allowed only"
- << "in FULL or LIMITED hmi level");
+ "OnButtonPress notification is allowed only"
+ << "in FULL or LIMITED hmi level");
continue;
}
@@ -118,8 +118,8 @@ void OnButtonPressNotification::Run() {
if ((static_cast<uint32_t>(mobile_apis::ButtonName::OK) == btn_id) &&
(mobile_api::HMILevel::HMI_FULL != subscribed_app->hmi_level())) {
LOGGER_WARN(logger_,
- "OnButtonPress notification for OK button"
- << "is allowed only in FULL hmi level");
+ "OnButtonPress notification for OK button"
+ << "is allowed only in FULL hmi level");
continue;
}
diff --git a/src/components/application_manager/src/commands/mobile/on_hash_change_notification.cc b/src/components/application_manager/src/commands/mobile/on_hash_change_notification.cc
index 55aef9f7e0..d9deee8c79 100644
--- a/src/components/application_manager/src/commands/mobile/on_hash_change_notification.cc
+++ b/src/components/application_manager/src/commands/mobile/on_hash_change_notification.cc
@@ -64,7 +64,7 @@ void OnHashChangeNotification::Run() {
SendNotification();
} else {
LOGGER_WARN(logger_,
- "Application with app_id " << app_id << " does not exist");
+ "Application with app_id " << app_id << " does not exist");
}
}
diff --git a/src/components/application_manager/src/commands/mobile/on_hmi_status_notification.cc b/src/components/application_manager/src/commands/mobile/on_hmi_status_notification.cc
index b2026a53a8..77057c29ad 100644
--- a/src/components/application_manager/src/commands/mobile/on_hmi_status_notification.cc
+++ b/src/components/application_manager/src/commands/mobile/on_hmi_status_notification.cc
@@ -65,8 +65,8 @@ void OnHMIStatusNotification::Run() {
if (!(app->tts_properties_in_none())) {
app->set_tts_properties_in_none(true);
LOGGER_INFO(logger_,
- "OnHMIStatusNotification::Send TTS GlobalProperties"
- " with empty array to HMI");
+ "OnHMIStatusNotification::Send TTS GlobalProperties"
+ " with empty array to HMI");
MessageHelper::SendTTSGlobalProperties(app, false, application_manager_);
}
} else if ((mobile_apis::HMILevel::HMI_FULL == hmi_level) ||
@@ -74,7 +74,7 @@ void OnHMIStatusNotification::Run() {
if (!(app->tts_properties_in_full())) {
app->set_tts_properties_in_full(true);
LOGGER_INFO(logger_,
- "OnHMIStatusNotification AddAppToTTSGlobalPropertiesList");
+ "OnHMIStatusNotification AddAppToTTSGlobalPropertiesList");
application_manager_.AddAppToTTSGlobalPropertiesList(app->app_id());
}
}
diff --git a/src/components/application_manager/src/commands/mobile/on_hmi_status_notification_from_mobile.cc b/src/components/application_manager/src/commands/mobile/on_hmi_status_notification_from_mobile.cc
index ef1caaa796..69523e32f5 100644
--- a/src/components/application_manager/src/commands/mobile/on_hmi_status_notification_from_mobile.cc
+++ b/src/components/application_manager/src/commands/mobile/on_hmi_status_notification_from_mobile.cc
@@ -52,8 +52,8 @@ void OnHMIStatusNotificationFromMobile::Run() {
ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app.valid()) {
- LOGGER_ERROR(
- logger_, "OnHMIStatusNotificationFromMobile application doesn't exist");
+ LOGGER_ERROR(logger_,
+ "OnHMIStatusNotificationFromMobile application doesn't exist");
return;
}
@@ -71,8 +71,8 @@ void OnHMIStatusNotificationFromMobile::Run() {
application_manager_.IsAppsQueriedFrom(handle);
LOGGER_DEBUG(logger_,
- "Mobile HMI state notication came for connection key:"
- << connection_key() << " and handle: " << handle);
+ "Mobile HMI state notication came for connection key:"
+ << connection_key() << " and handle: " << handle);
if (!is_apps_requested_before &&
ProtocolVersion::kV4 == app->protocol_version() && app->is_foreground()) {
@@ -85,9 +85,9 @@ void OnHMIStatusNotificationFromMobile::Run() {
if (is_apps_requested_before) {
LOGGER_DEBUG(logger_,
- "Remote apps list had been requested already "
- " for handle: "
- << handle);
+ "Remote apps list had been requested already "
+ " for handle: "
+ << handle);
if (ProtocolVersion::kV4 == app->protocol_version()) {
const ApplicationSet& accessor =
diff --git a/src/components/application_manager/src/commands/mobile/on_keyboard_input_notification.cc b/src/components/application_manager/src/commands/mobile/on_keyboard_input_notification.cc
index 356e9d7b34..f3a56201d8 100644
--- a/src/components/application_manager/src/commands/mobile/on_keyboard_input_notification.cc
+++ b/src/components/application_manager/src/commands/mobile/on_keyboard_input_notification.cc
@@ -60,7 +60,7 @@ void OnKeyBoardInputNotification::Run() {
ApplicationSharedPtr app = *it;
if (app->is_perform_interaction_active()) {
LOGGER_INFO(logger_,
- "There is application with active PerformInteraction");
+ "There is application with active PerformInteraction");
app_to_notify = app;
break;
}
diff --git a/src/components/application_manager/src/commands/mobile/on_system_request_notification.cc b/src/components/application_manager/src/commands/mobile/on_system_request_notification.cc
index f12f693e02..66a01dcdbf 100644
--- a/src/components/application_manager/src/commands/mobile/on_system_request_notification.cc
+++ b/src/components/application_manager/src/commands/mobile/on_system_request_notification.cc
@@ -58,8 +58,8 @@ void OnSystemRequestNotification::Run() {
if (!app.valid()) {
LOGGER_ERROR(logger_,
- "Application with connection key " << connection_key()
- << " is not registered.");
+ "Application with connection key " << connection_key()
+ << " is not registered.");
return;
}
@@ -70,8 +70,8 @@ void OnSystemRequestNotification::Run() {
if (!policy_handler.IsRequestTypeAllowed(app->policy_app_id(),
request_type)) {
LOGGER_WARN(logger_,
- "Request type " << request_type
- << " is not allowed by policies");
+ "Request type " << request_type
+ << " is not allowed by policies");
return;
}
diff --git a/src/components/application_manager/src/commands/mobile/on_vehicle_data_notification.cc b/src/components/application_manager/src/commands/mobile/on_vehicle_data_notification.cc
index ca94652929..74170a3d2d 100644
--- a/src/components/application_manager/src/commands/mobile/on_vehicle_data_notification.cc
+++ b/src/components/application_manager/src/commands/mobile/on_vehicle_data_notification.cc
@@ -97,9 +97,9 @@ void OnVehicleDataNotification::Run() {
for (size_t idx = 0; idx < appNotification.size(); idx++) {
LOGGER_INFO(logger_,
- "Send OnVehicleData PRNDL notification to "
- << appNotification[idx]->name().c_str()
- << " application id " << appNotification[idx]->app_id());
+ "Send OnVehicleData PRNDL notification to "
+ << appNotification[idx]->name().c_str()
+ << " application id " << appNotification[idx]->app_id());
(*message_)[strings::params][strings::connection_key] =
appNotification[idx]->app_id();
(*message_)[strings::msg_params] = appSO[idx];
diff --git a/src/components/application_manager/src/commands/mobile/perform_audio_pass_thru_request.cc b/src/components/application_manager/src/commands/mobile/perform_audio_pass_thru_request.cc
index 3607559157..d030c2c6e0 100644
--- a/src/components/application_manager/src/commands/mobile/perform_audio_pass_thru_request.cc
+++ b/src/components/application_manager/src/commands/mobile/perform_audio_pass_thru_request.cc
@@ -86,9 +86,9 @@ void PerformAudioPassThruRequest::Run() {
if (IsWhiteSpaceExist()) {
LOGGER_ERROR(logger_,
- "Incoming perform audio pass thru has contains "
- "\\t\\n \\\\t \\\\n"
- " text contains only whitespace in initialPrompt");
+ "Incoming perform audio pass thru has contains "
+ "\\t\\n \\\\t \\\\n"
+ " text contains only whitespace in initialPrompt");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
return;
}
diff --git a/src/components/application_manager/src/commands/mobile/perform_interaction_request.cc b/src/components/application_manager/src/commands/mobile/perform_interaction_request.cc
index 7b6e0ea42a..cf0dac66ba 100644
--- a/src/components/application_manager/src/commands/mobile/perform_interaction_request.cc
+++ b/src/components/application_manager/src/commands/mobile/perform_interaction_request.cc
@@ -117,8 +117,8 @@ void PerformInteractionRequest::Run() {
if ((mobile_apis::InteractionMode::VR_ONLY == interaction_mode_) &&
(mobile_apis::LayoutMode::KEYBOARD == interaction_layout)) {
LOGGER_ERROR(logger_,
- "PerformInteraction contains InteractionMode"
- "=VR_ONLY and interactionLayout=KEYBOARD");
+ "PerformInteraction contains InteractionMode"
+ "=VR_ONLY and interactionLayout=KEYBOARD");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
return;
}
@@ -130,16 +130,16 @@ void PerformInteractionRequest::Run() {
if (mobile_apis::LayoutMode::KEYBOARD == interaction_layout) {
if (mobile_apis::InteractionMode::BOTH == interaction_mode_) {
LOGGER_ERROR(logger_,
- "interactionChoiceSetIDList is empty,"
- " InteractionMode=BOTH and"
- " interactionLayout=KEYBOARD");
+ "interactionChoiceSetIDList is empty,"
+ " InteractionMode=BOTH and"
+ " interactionLayout=KEYBOARD");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
return;
}
} else {
LOGGER_ERROR(logger_,
- "interactionChoiceSetIDList is empty"
- " and interactionLayout!=KEYBOARD");
+ "interactionChoiceSetIDList is empty"
+ " and interactionLayout!=KEYBOARD");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
return;
}
@@ -151,8 +151,8 @@ void PerformInteractionRequest::Run() {
choice_set_id_list_length,
msg_params[strings::interaction_choice_set_id_list]))) {
LOGGER_ERROR(logger_,
- "PerformInteraction has choice sets with "
- "duplicated IDs or application does not have choice sets");
+ "PerformInteraction has choice sets with "
+ "duplicated IDs or application does not have choice sets");
SendResponse(false, mobile_apis::Result::INVALID_ID);
return;
}
@@ -162,7 +162,7 @@ void PerformInteractionRequest::Run() {
MessageHelper::VerifyImageVrHelpItems(
msg_params[strings::vr_help], app, application_manager_)) {
LOGGER_ERROR(logger_,
- "Verification of " << strings::vr_help << " failed.");
+ "Verification of " << strings::vr_help << " failed.");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
return;
}
@@ -170,7 +170,7 @@ void PerformInteractionRequest::Run() {
if (IsWhiteSpaceExist()) {
LOGGER_ERROR(logger_,
- "Incoming perform interaction has contains \t\n \\t \\n");
+ "Incoming perform interaction has contains \t\n \\t \\n");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
return;
}
@@ -332,8 +332,8 @@ void PerformInteractionRequest::ProcessVRResponse(
if (SUCCESS == vr_resultCode_ &&
InteractionMode::MANUAL_ONLY == interaction_mode_) {
LOGGER_DEBUG(logger_,
- "VR response SUCCESS in MANUAL_ONLY mode "
- << "Wait for UI response");
+ "VR response SUCCESS in MANUAL_ONLY mode "
+ << "Wait for UI response");
// in case MANUAL_ONLY mode VR.PI SUCCESS just return
return;
}
@@ -845,7 +845,7 @@ bool PerformInteractionRequest::IsWhiteSpaceExist() {
str = (*it_vh)[strings::image][strings::value].asCharArray();
if (!CheckSyntax(str)) {
LOGGER_ERROR(logger_,
- "Invalid vr_help image value syntax check failed");
+ "Invalid vr_help image value syntax check failed");
return true;
}
}
@@ -917,9 +917,9 @@ bool PerformInteractionRequest::CheckChoiceIDFromRequest(
choice_id_set.insert(choices_list[k][strings::choice_id].asInt());
if (!ins_res.second) {
LOGGER_ERROR(logger_,
- "Choise with ID "
- << choices_list[k][strings::choice_id].asInt()
- << " already exists");
+ "Choise with ID "
+ << choices_list[k][strings::choice_id].asInt()
+ << " already exists");
return false;
}
}
diff --git a/src/components/application_manager/src/commands/mobile/put_file_request.cc b/src/components/application_manager/src/commands/mobile/put_file_request.cc
index abd69cf36a..c15472c555 100644
--- a/src/components/application_manager/src/commands/mobile/put_file_request.cc
+++ b/src/components/application_manager/src/commands/mobile/put_file_request.cc
@@ -74,7 +74,7 @@ void PutFileRequest::Run() {
// If application is in the HMI_NONE level the quantity of allowed
// PutFile request is limited by the configuration profile
LOGGER_ERROR(logger_,
- "Too many requests from the app with HMILevel HMI_NONE ");
+ "Too many requests from the app with HMILevel HMI_NONE ");
SendResponse(false,
mobile_apis::Result::REJECTED,
"Too many requests from the app with HMILevel HMI_NONE",
@@ -178,16 +178,16 @@ void PutFileRequest::Run() {
const std::string full_path = file_path + "/" + sync_file_name_;
UNUSED(full_path);
LOGGER_DEBUG(logger_,
- "Wrtiting " << binary_data.size() << "bytes to " << full_path
- << " (current size is"
- << file_system::FileSize(full_path) << ")");
+ "Wrtiting " << binary_data.size() << "bytes to " << full_path
+ << " (current size is"
+ << file_system::FileSize(full_path) << ")");
mobile_apis::Result::eType save_result = application_manager_.SaveBinary(
binary_data, file_path, sync_file_name_, offset_);
LOGGER_DEBUG(logger_,
- "New size of " << full_path << " is "
- << file_system::FileSize(full_path) << " bytes");
+ "New size of " << full_path << " is "
+ << file_system::FileSize(full_path) << " bytes");
if (!is_system_file) {
response_params[strings::space_available] =
static_cast<uint32_t>(application->GetAvailableDiskSpace());
@@ -207,8 +207,8 @@ void PutFileRequest::Run() {
LOGGER_INFO(logger_, "New file downloading");
if (!application->AddFile(file)) {
LOGGER_INFO(logger_,
- "Couldn't add file to application (File already Exist"
- << " in application and was rewritten on FS)");
+ "Couldn't add file to application (File already Exist"
+ << " in application and was rewritten on FS)");
/* It can be first part of new big file, so we need to update
information about it's downloading status and persistence */
if (!application->UpdateFile(file)) {
@@ -237,8 +237,7 @@ void PutFileRequest::Run() {
break;
}
default:
- LOGGER_WARN(logger_,
- "PutFile is unsuccessful. Result = " << save_result);
+ LOGGER_WARN(logger_, "PutFile is unsuccessful. Result = " << save_result);
SendResponse(false, save_result, "Can't save file", &response_params);
break;
}
diff --git a/src/components/application_manager/src/commands/mobile/register_app_interface_request.cc b/src/components/application_manager/src/commands/mobile/register_app_interface_request.cc
index 1e7a666e98..49db7d7130 100644
--- a/src/components/application_manager/src/commands/mobile/register_app_interface_request.cc
+++ b/src/components/application_manager/src/commands/mobile/register_app_interface_request.cc
@@ -158,11 +158,11 @@ void RegisterAppInterfaceRequest::Run() {
while (!application_manager_.IsStopping() &&
!application_manager_.IsHMICooperating()) {
LOGGER_DEBUG(logger_,
- "Waiting for the HMI... conn_key="
- << connection_key()
- << ", correlation_id=" << correlation_id()
- << ", default_timeout=" << default_timeout()
- << ", thread=" << pthread_self());
+ "Waiting for the HMI... conn_key="
+ << connection_key()
+ << ", correlation_id=" << correlation_id()
+ << ", default_timeout=" << default_timeout()
+ << ", thread=" << pthread_self());
application_manager_.updateRequestTimeout(
connection_key(), correlation_id(), default_timeout());
sleep(1);
@@ -225,7 +225,7 @@ void RegisterAppInterfaceRequest::Run() {
if (IsWhiteSpaceExist()) {
LOGGER_INFO(logger_,
- "Incoming register app interface has contains \t\n \\t \\n");
+ "Incoming register app interface has contains \t\n \\t \\n");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
return;
}
@@ -297,8 +297,8 @@ void RegisterAppInterfaceRequest::Run() {
&dev_params.device_mac_address,
&dev_params.device_connection_type)) {
LOGGER_ERROR(logger_,
- "Failed to extract information for device "
- << application->device());
+ "Failed to extract information for device "
+ << application->device());
}
policy::DeviceInfo device_info;
device_info.AdoptDeviceType(dev_params.device_connection_type);
@@ -327,7 +327,7 @@ void RegisterAppInterfaceRequest::SendRegisterAppInterfaceResponseToMobile() {
if (!application) {
LOGGER_ERROR(logger_,
- "There is no application for such connection key" << key);
+ "There is no application for such connection key" << key);
LOGGER_DEBUG(logger_, "Need to start resume data persistent timer");
resumer.OnAppRegistrationEnd();
return;
@@ -350,8 +350,8 @@ void RegisterAppInterfaceRequest::SendRegisterAppInterfaceResponseToMobile() {
msg_params[strings::hmi_display_language_desired].asInt() !=
hmi_capabilities.active_ui_language()) {
LOGGER_WARN(logger_,
- "Wrong language on registering application "
- << application->name().c_str());
+ "Wrong language on registering application "
+ << application->name().c_str());
LOGGER_ERROR(
logger_,
@@ -509,7 +509,7 @@ void RegisterAppInterfaceRequest::SendRegisterAppInterfaceResponseToMobile() {
hash_id = (*message_)[strings::msg_params][strings::hash_id].asString();
if (!resumer.CheckApplicationHash(application, hash_id)) {
LOGGER_WARN(logger_,
- "Hash from RAI does not match to saved resume data.");
+ "Hash from RAI does not match to saved resume data.");
result_code = mobile_apis::Result::RESUME_FAILED;
add_info = "Hash from RAI does not match to saved resume data.";
need_restore_vr = false;
@@ -642,7 +642,7 @@ void RegisterAppInterfaceRequest::SendOnAppRegisteredNotificationToHMI(
session_observer.GetDataOnDeviceID(
handle, &device_name, NULL, &mac_address, &transport_type)) {
LOGGER_ERROR(logger_,
- "Failed to extract information for device " << handle);
+ "Failed to extract information for device " << handle);
}
device_info[strings::name] = device_name;
@@ -736,8 +736,7 @@ mobile_apis::Result::eType RegisterAppInterfaceRequest::CheckWithPolicyData() {
policy::StringArray::const_iterator it =
std::find_if(app_nicknames.begin(), app_nicknames.end(), compare);
if (app_nicknames.end() == it) {
- LOGGER_WARN(logger_,
- "Application name was not found in nicknames list.");
+ LOGGER_WARN(logger_, "Application name was not found in nicknames list.");
// App should be unregistered, if its name is not present in nicknames
// list
usage_statistics::AppCounter count_of_rejections_nickname_mismatch(
@@ -875,7 +874,7 @@ bool RegisterAppInterfaceRequest::IsWhiteSpaceExist() {
.asCharArray();
if (strlen(str) && !CheckSyntax(str)) {
LOGGER_ERROR(logger_,
- "Invalid ngn_media_screen_app_name syntax check failed");
+ "Invalid ngn_media_screen_app_name syntax check failed");
return true;
}
}
@@ -911,7 +910,7 @@ bool RegisterAppInterfaceRequest::IsWhiteSpaceExist() {
[strings::hardware].asCharArray();
if (strlen(str) && !CheckSyntax(str)) {
LOGGER_ERROR(logger_,
- "Invalid device_info hardware syntax check failed");
+ "Invalid device_info hardware syntax check failed");
return true;
}
}
@@ -922,7 +921,7 @@ bool RegisterAppInterfaceRequest::IsWhiteSpaceExist() {
[strings::firmware_rev].asCharArray();
if (strlen(str) && !CheckSyntax(str)) {
LOGGER_ERROR(logger_,
- "Invalid device_info firmware_rev syntax check failed");
+ "Invalid device_info firmware_rev syntax check failed");
return true;
}
}
@@ -943,7 +942,7 @@ bool RegisterAppInterfaceRequest::IsWhiteSpaceExist() {
[strings::os_version].asCharArray();
if (strlen(str) && !CheckSyntax(str)) {
LOGGER_ERROR(logger_,
- "Invalid device_info os_version syntax check failed");
+ "Invalid device_info os_version syntax check failed");
return true;
}
}
@@ -954,7 +953,7 @@ bool RegisterAppInterfaceRequest::IsWhiteSpaceExist() {
[strings::carrier].asCharArray();
if (strlen(str) && !CheckSyntax(str)) {
LOGGER_ERROR(logger_,
- "Invalid device_info carrier syntax check failed");
+ "Invalid device_info carrier syntax check failed");
return true;
}
}
@@ -979,8 +978,8 @@ void RegisterAppInterfaceRequest::CheckResponseVehicleTypeParam(
if (!vehicle_type.keyExists(param) || vehicle_type[param].empty()) {
if (!backup_value.empty()) {
LOGGER_DEBUG(logger_,
- param << " is missing."
- "Will be replaced with policy table value.");
+ param << " is missing."
+ "Will be replaced with policy table value.");
vehicle_type[param] = backup_value;
} else {
vehicle_type.erase(param);
diff --git a/src/components/application_manager/src/commands/mobile/register_app_interface_response.cc b/src/components/application_manager/src/commands/mobile/register_app_interface_response.cc
index 473fdae702..0048dca8d6 100644
--- a/src/components/application_manager/src/commands/mobile/register_app_interface_response.cc
+++ b/src/components/application_manager/src/commands/mobile/register_app_interface_response.cc
@@ -71,8 +71,8 @@ void RegisterAppInterfaceResponse::Run() {
application_manager_.application(connection_key());
if (!application) {
LOGGER_ERROR(logger_,
- "Application with connection key " << connection_key()
- << " is not registered.");
+ "Application with connection key " << connection_key()
+ << " is not registered.");
return;
}
diff --git a/src/components/application_manager/src/commands/mobile/send_location_request.cc b/src/components/application_manager/src/commands/mobile/send_location_request.cc
index 82c97f9cda..d5c4d88cfb 100644
--- a/src/components/application_manager/src/commands/mobile/send_location_request.cc
+++ b/src/components/application_manager/src/commands/mobile/send_location_request.cc
@@ -55,8 +55,8 @@ void SendLocationRequest::Run() {
if (!app) {
LOGGER_ERROR(logger_,
- "An application with connection key "
- << connection_key() << " is not registered.");
+ "An application with connection key "
+ << connection_key() << " is not registered.");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
@@ -157,13 +157,13 @@ bool SendLocationRequest::CheckFieldsCompatibility() {
if (latitude_degrees_exist ^ longitude_degrees_exist) {
LOGGER_DEBUG(logger_,
- "latitude and longitude should be provided only in pair");
+ "latitude and longitude should be provided only in pair");
return false;
}
if (!address_exist && !longitude_degrees_exist && !latitude_degrees_exist) {
LOGGER_DEBUG(logger_,
- "address or latitude/longtitude should should be provided");
+ "address or latitude/longtitude should should be provided");
return false;
}
return true;
@@ -217,7 +217,7 @@ bool SendLocationRequest::IsWhiteSpaceExist() {
const std::string& str = it->AsMBString();
if (!CheckSyntax(str, false)) {
LOGGER_ERROR(logger_,
- "string '" << str << "'' contains invalid characters");
+ "string '" << str << "'' contains invalid characters");
return true;
}
}
diff --git a/src/components/application_manager/src/commands/mobile/set_app_icon_request.cc b/src/components/application_manager/src/commands/mobile/set_app_icon_request.cc
index 2ff8b801fa..93338717b4 100644
--- a/src/components/application_manager/src/commands/mobile/set_app_icon_request.cc
+++ b/src/components/application_manager/src/commands/mobile/set_app_icon_request.cc
@@ -116,7 +116,7 @@ void SetAppIconRequest::CopyToIconStorage(
.get_settings()
.enable_protocol_4()) {
LOGGER_WARN(logger_,
- "Icon copying skipped, since protocol ver. 4 is not enabled.");
+ "Icon copying skipped, since protocol ver. 4 is not enabled.");
return;
}
@@ -134,10 +134,10 @@ void SetAppIconRequest::CopyToIconStorage(
if (storage_max_size < file_size) {
LOGGER_ERROR(logger_,
- "Icon size (" << file_size << ") is bigger, than "
- " icons storage maximum size ("
- << storage_max_size << ")."
- "Copying skipped.");
+ "Icon size (" << file_size << ") is bigger, than "
+ " icons storage maximum size ("
+ << storage_max_size << ")."
+ "Copying skipped.");
return;
}
@@ -149,8 +149,8 @@ void SetAppIconRequest::CopyToIconStorage(
if (!icons_amount) {
LOGGER_DEBUG(logger_,
- "No icons will be deleted, since amount icons to remove "
- "is zero. Icon saving skipped.");
+ "No icons will be deleted, since amount icons to remove "
+ "is zero. Icon saving skipped.");
return;
}
@@ -180,8 +180,8 @@ void SetAppIconRequest::CopyToIconStorage(
}
LOGGER_DEBUG(logger_,
- "Icon was successfully copied from :" << path_to_file << " to "
- << icon_path);
+ "Icon was successfully copied from :" << path_to_file << " to "
+ << icon_path);
return;
}
@@ -213,7 +213,7 @@ void SetAppIconRequest::RemoveOldestIcons(const std::string& storage,
}
icon_modification_time.erase(icon_modification_time.begin());
LOGGER_DEBUG(logger_,
- "Old icon " << file_path << " was deleted successfully.");
+ "Old icon " << file_path << " was deleted successfully.");
}
}
@@ -258,7 +258,7 @@ void SetAppIconRequest::on_event(const event_engine::Event& event) {
app->set_app_icon_path(path);
LOGGER_INFO(logger_,
- "Icon path was set to '" << app->app_icon_path() << "'");
+ "Icon path was set to '" << app->app_icon_path() << "'");
}
SendResponse(result, result_code, NULL, &(message[strings::msg_params]));
diff --git a/src/components/application_manager/src/commands/mobile/set_global_properties_request.cc b/src/components/application_manager/src/commands/mobile/set_global_properties_request.cc
index 02c47a73f6..2c654256c9 100644
--- a/src/components/application_manager/src/commands/mobile/set_global_properties_request.cc
+++ b/src/components/application_manager/src/commands/mobile/set_global_properties_request.cc
@@ -65,8 +65,8 @@ void SetGlobalPropertiesRequest::Run() {
if (!app) {
LOGGER_ERROR(logger_,
- "No application associated with connection key "
- << connection_key());
+ "No application associated with connection key "
+ << connection_key());
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
@@ -86,8 +86,8 @@ void SetGlobalPropertiesRequest::Run() {
app,
application_manager_);
if (mobile_apis::Result::SUCCESS != verification_result) {
- LOGGER_ERROR(
- logger_, "MessageHelper::VerifyImage return " << verification_result);
+ LOGGER_ERROR(logger_,
+ "MessageHelper::VerifyImage return " << verification_result);
SendResponse(false, verification_result);
return;
}
@@ -123,7 +123,7 @@ void SetGlobalPropertiesRequest::Run() {
// check VR params
if (is_vr_help_title_present ^ is_vr_help_present) {
LOGGER_ERROR(logger_,
- "Reject because of vr_help or vr_help_title only provided");
+ "Reject because of vr_help or vr_help_title only provided");
SendResponse(false, mobile_apis::Result::REJECTED);
return;
}
@@ -132,8 +132,8 @@ void SetGlobalPropertiesRequest::Run() {
if (!CheckVrHelpItemsOrder(msg_params[strings::vr_help])) {
LOGGER_ERROR(logger_,
- "VR Help Items contains nonsequential positions"
- << " (e.g. [1,2,4]) or not started from 1");
+ "VR Help Items contains nonsequential positions"
+ << " (e.g. [1,2,4]) or not started from 1");
SendResponse(false, mobile_apis::Result::REJECTED);
return;
}
@@ -207,8 +207,8 @@ bool SetGlobalPropertiesRequest::CheckVrHelpItemsOrder(
// Elements shall start from 1 and increment one by one
if (position != (j + 1)) {
LOGGER_ERROR(logger_,
- "VR help items order is wrong"
- << " at " << j << ", position value:" << position);
+ "VR help items order is wrong"
+ << " at " << j << ", position value:" << position);
return false;
}
}
@@ -483,7 +483,7 @@ bool SetGlobalPropertiesRequest::IsWhiteSpaceExist() {
str = (*it_vh)[strings::image][strings::value].asCharArray();
if (!CheckSyntax(str)) {
LOGGER_ERROR(logger_,
- "Invalid vr_help image value syntax check failed");
+ "Invalid vr_help image value syntax check failed");
return true;
}
} // if image exists
@@ -528,8 +528,8 @@ bool SetGlobalPropertiesRequest::IsWhiteSpaceExist() {
str = (*it_lcl).asCharArray();
if (!CheckSyntax(str)) {
LOGGER_ERROR(logger_,
- "Invalid keyboard_properties "
- "limited_character_list syntax check failed");
+ "Invalid keyboard_properties "
+ "limited_character_list syntax check failed");
return true;
}
}
@@ -543,8 +543,8 @@ bool SetGlobalPropertiesRequest::IsWhiteSpaceExist() {
if (!CheckSyntax(str)) {
LOGGER_ERROR(logger_,
- "Invalid keyboard_properties "
- "auto_complete_text syntax check failed");
+ "Invalid keyboard_properties "
+ "auto_complete_text syntax check failed");
return true;
}
}
diff --git a/src/components/application_manager/src/commands/mobile/set_icon_request.cc b/src/components/application_manager/src/commands/mobile/set_icon_request.cc
index d1f368b3f4..0e6e7de359 100644
--- a/src/components/application_manager/src/commands/mobile/set_icon_request.cc
+++ b/src/components/application_manager/src/commands/mobile/set_icon_request.cc
@@ -121,7 +121,7 @@ void SetIconRequest::on_event(const event_engine::Event& event) {
app->set_app_icon_path(path);
LOGGER_INFO(logger_,
- "Icon path was set to '" << app->app_icon_path() << "'");
+ "Icon path was set to '" << app->app_icon_path() << "'");
}
SendResponse(result, result_code, NULL, &(message[strings::msg_params]));
diff --git a/src/components/application_manager/src/commands/mobile/show_constant_tbt_request.cc b/src/components/application_manager/src/commands/mobile/show_constant_tbt_request.cc
index d898cd2b37..9d889ea137 100644
--- a/src/components/application_manager/src/commands/mobile/show_constant_tbt_request.cc
+++ b/src/components/application_manager/src/commands/mobile/show_constant_tbt_request.cc
@@ -75,7 +75,7 @@ void ShowConstantTBTRequest::Run() {
if (IsWhiteSpaceExist()) {
LOGGER_ERROR(logger_,
- "Incoming show constant TBT has contains \t\n \\t \\n");
+ "Incoming show constant TBT has contains \t\n \\t \\n");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
return;
}
@@ -230,8 +230,7 @@ bool ShowConstantTBTRequest::IsWhiteSpaceExist() {
str = (*message_)[strings::msg_params][strings::next_turn_icon]
[strings::value].asCharArray();
if (!CheckSyntax(str)) {
- LOGGER_ERROR(logger_,
- "Invalid next_turn_icon value syntax check failed");
+ LOGGER_ERROR(logger_, "Invalid next_turn_icon value syntax check failed");
return true;
}
}
@@ -241,7 +240,7 @@ bool ShowConstantTBTRequest::IsWhiteSpaceExist() {
.asCharArray();
if (strlen(str) && !CheckSyntax(str)) {
LOGGER_ERROR(logger_,
- "Invalid navigation_text_1 value syntax check failed");
+ "Invalid navigation_text_1 value syntax check failed");
return true;
}
}
@@ -251,7 +250,7 @@ bool ShowConstantTBTRequest::IsWhiteSpaceExist() {
.asCharArray();
if (strlen(str) && !CheckSyntax(str)) {
LOGGER_ERROR(logger_,
- "Invalid navigation_text_2 value syntax check failed");
+ "Invalid navigation_text_2 value syntax check failed");
return true;
}
}
@@ -268,8 +267,7 @@ bool ShowConstantTBTRequest::IsWhiteSpaceExist() {
str =
(*message_)[strings::msg_params][strings::total_distance].asCharArray();
if (strlen(str) && !CheckSyntax(str)) {
- LOGGER_ERROR(logger_,
- "Invalid total_distance value syntax check failed");
+ LOGGER_ERROR(logger_, "Invalid total_distance value syntax check failed");
return true;
}
}
@@ -280,7 +278,7 @@ bool ShowConstantTBTRequest::IsWhiteSpaceExist() {
.asCharArray();
if (strlen(str) && !CheckSyntax(str)) {
LOGGER_ERROR(logger_,
- "Invalid time_to_destination value syntax check failed");
+ "Invalid time_to_destination value syntax check failed");
return true;
}
}
diff --git a/src/components/application_manager/src/commands/mobile/show_request.cc b/src/components/application_manager/src/commands/mobile/show_request.cc
index 1a4de1450b..2066c41d23 100644
--- a/src/components/application_manager/src/commands/mobile/show_request.cc
+++ b/src/components/application_manager/src/commands/mobile/show_request.cc
@@ -335,7 +335,7 @@ bool ShowRequest::CheckStringsOfShowRequest() {
[strings::value].asCharArray();
if (!CheckSyntax(str)) {
LOGGER_ERROR(logger_,
- "Invalid secondary_graphic value syntax check failed");
+ "Invalid secondary_graphic value syntax check failed");
return false;
}
}
diff --git a/src/components/application_manager/src/commands/mobile/slider_request.cc b/src/components/application_manager/src/commands/mobile/slider_request.cc
index 5a8ddcc9eb..12d035cd88 100644
--- a/src/components/application_manager/src/commands/mobile/slider_request.cc
+++ b/src/components/application_manager/src/commands/mobile/slider_request.cc
@@ -149,8 +149,8 @@ void SliderRequest::on_event(const event_engine::Event& event) {
message[strings::params][strings::data][strings::slider_position];
} else {
LOGGER_ERROR(logger_,
- strings::slider_position << " field is absent"
- " in response.");
+ strings::slider_position << " field is absent"
+ " in response.");
response_msg_params[strings::slider_position] = 0;
}
}
diff --git a/src/components/application_manager/src/commands/mobile/speak_request.cc b/src/components/application_manager/src/commands/mobile/speak_request.cc
index 09e2c47388..09e3c80fc6 100644
--- a/src/components/application_manager/src/commands/mobile/speak_request.cc
+++ b/src/components/application_manager/src/commands/mobile/speak_request.cc
@@ -63,8 +63,8 @@ void SpeakRequest::Run() {
if (IsWhiteSpaceExist()) {
LOGGER_ERROR(logger_,
- "Incoming speak has contains \\t\\n \\\\t \\\\n "
- " text contains only whitespace in ttsChunks");
+ "Incoming speak has contains \\t\\n \\\\t \\\\n "
+ " text contains only whitespace in ttsChunks");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
return;
}
diff --git a/src/components/application_manager/src/commands/mobile/subscribe_button_request.cc b/src/components/application_manager/src/commands/mobile/subscribe_button_request.cc
index 2b4a8fb91b..f3bc03aabb 100644
--- a/src/components/application_manager/src/commands/mobile/subscribe_button_request.cc
+++ b/src/components/application_manager/src/commands/mobile/subscribe_button_request.cc
@@ -61,16 +61,15 @@ void SubscribeButtonRequest::Run() {
(*message_)[str::msg_params][str::button_name].asUInt());
if (!IsSubscriptionAllowed(app, btn_id)) {
- LOGGER_ERROR(logger_,
- "Subscribe on button " << btn_id << " isn't allowed");
+ LOGGER_ERROR(logger_, "Subscribe on button " << btn_id << " isn't allowed");
SendResponse(false, mobile_apis::Result::REJECTED);
return;
}
if (!CheckHMICapabilities(btn_id)) {
LOGGER_ERROR(logger_,
- "Subscribe on button "
- << btn_id << " isn't allowed by HMI capabilities");
+ "Subscribe on button "
+ << btn_id << " isn't allowed by HMI capabilities");
SendResponse(false, mobile_apis::Result::UNSUPPORTED_RESOURCE);
return;
}
diff --git a/src/components/application_manager/src/commands/mobile/subscribe_vehicle_data_request.cc b/src/components/application_manager/src/commands/mobile/subscribe_vehicle_data_request.cc
index dd365f055f..67c1910be2 100644
--- a/src/components/application_manager/src/commands/mobile/subscribe_vehicle_data_request.cc
+++ b/src/components/application_manager/src/commands/mobile/subscribe_vehicle_data_request.cc
@@ -134,10 +134,10 @@ void SubscribeVehicleDataRequest::Run() {
VehicleDataType key_type = it->second;
if (app->IsSubscribedToIVI(key_type)) {
LOGGER_DEBUG(logger_,
- "App with connection key "
- << connection_key()
- << " is subscribed already for VehicleDataType: "
- << key_type);
+ "App with connection key "
+ << connection_key()
+ << " is subscribed already for VehicleDataType: "
+ << key_type);
++subscribed_items;
vi_already_subscribed_by_this_app_.insert(key_type);
response_params[key_name][strings::data_type] = key_type;
@@ -148,9 +148,9 @@ void SubscribeVehicleDataRequest::Run() {
if (IsSomeoneSubscribedFor(key_type)) {
LOGGER_DEBUG(logger_,
- "There are apps subscribed already for "
- "VehicleDataType: "
- << key_type);
+ "There are apps subscribed already for "
+ "VehicleDataType: "
+ << key_type);
if (!app->SubscribeToIVI(static_cast<uint32_t>(key_type))) {
LOGGER_ERROR(
logger_,
@@ -234,8 +234,8 @@ void SubscribeVehicleDataRequest::Run() {
hmi_requests_.push_back(hmi_request);
}
}
- LOGGER_DEBUG(
- logger_, hmi_requests_.size() << " requests are going to be sent to HMI");
+ LOGGER_DEBUG(logger_,
+ hmi_requests_.size() << " requests are going to be sent to HMI");
// Send subrequests
for (HmiRequests::const_iterator it = hmi_requests_.begin();
@@ -300,9 +300,9 @@ void SubscribeVehicleDataRequest::on_event(const event_engine::Event& event) {
status = mobile_api::Result::eType::GENERIC_ERROR;
}
LOGGER_TRACE(logger_,
- "Status from HMI: " << it->status
- << ", so response status become "
- << status);
+ "Status from HMI: " << it->status
+ << ", so response status become "
+ << status);
} else {
any_arg_success = true;
}
@@ -399,11 +399,11 @@ void SubscribeVehicleDataRequest::UnsubscribeFailedSubscriptions(
if (msg_params[it->first][strings::result_code].asInt() !=
hmi_apis::Common_VehicleDataResultCode::VDRC_SUCCESS) {
LOGGER_DEBUG(logger_,
- "Subscription for VehicleDataType "
- << it->first
- << " is unsuccessfull. "
- "Unsubscribing app with connection key "
- << connection_key() << " from it.");
+ "Subscription for VehicleDataType "
+ << it->first
+ << " is unsuccessfull. "
+ "Unsubscribing app with connection key "
+ << connection_key() << " from it.");
app->UnsubscribeFromIVI(it->second);
}
}
diff --git a/src/components/application_manager/src/commands/mobile/subscribe_way_points_request.cc b/src/components/application_manager/src/commands/mobile/subscribe_way_points_request.cc
index ec7c11868a..6a15aafb8a 100644
--- a/src/components/application_manager/src/commands/mobile/subscribe_way_points_request.cc
+++ b/src/components/application_manager/src/commands/mobile/subscribe_way_points_request.cc
@@ -18,8 +18,8 @@ void SubscribeWayPointsRequest::Run() {
if (!app) {
LOGGER_ERROR(logger_,
- "An application with connection key "
- << connection_key() << " is not registered.");
+ "An application with connection key "
+ << connection_key() << " is not registered.");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
diff --git a/src/components/application_manager/src/commands/mobile/system_request.cc b/src/components/application_manager/src/commands/mobile/system_request.cc
index 189af93978..76eb92be14 100644
--- a/src/components/application_manager/src/commands/mobile/system_request.cc
+++ b/src/components/application_manager/src/commands/mobile/system_request.cc
@@ -78,8 +78,8 @@ class QueryAppsDataValidator {
LOGGER_AUTO_TRACE(logger_);
if (!data_.isValid()) {
LOGGER_ERROR(logger_,
- kQueryAppsValidationFailedPrefix
- << "QueryApps response is not valid.");
+ kQueryAppsValidationFailedPrefix
+ << "QueryApps response is not valid.");
return false;
}
if (!HasResponseKey()) {
@@ -92,9 +92,9 @@ class QueryAppsDataValidator {
bool HasResponseKey() const {
if (!data_.keyExists(json::response)) {
LOGGER_WARN(logger_,
- kQueryAppsValidationFailedPrefix
- << "QueryApps response does not contain '"
- << json::response << "' parameter.");
+ kQueryAppsValidationFailedPrefix
+ << "QueryApps response does not contain '"
+ << json::response << "' parameter.");
return false;
}
return true;
@@ -105,8 +105,8 @@ class QueryAppsDataValidator {
data_[json::response].asArray();
if (!objects_array) {
LOGGER_WARN(logger_,
- kQueryAppsValidationFailedPrefix
- << "QueryApps response is not array.");
+ kQueryAppsValidationFailedPrefix
+ << "QueryApps response is not array.");
return false;
}
const std::size_t arr_size(objects_array->size());
@@ -116,8 +116,8 @@ class QueryAppsDataValidator {
if (!app_data.isValid()) {
LOGGER_WARN(logger_,
- kQueryAppsValidationFailedPrefix
- << "Wrong application data in json file.");
+ kQueryAppsValidationFailedPrefix
+ << "Wrong application data in json file.");
return false;
}
std::set<std::string> app_ids_set;
@@ -130,8 +130,8 @@ class QueryAppsDataValidator {
os_type = json::ios;
if (!app_data[os_type].keyExists(json::urlScheme)) {
LOGGER_WARN(logger_,
- kQueryAppsValidationFailedPrefix
- << "Can't find URL scheme in json file.");
+ kQueryAppsValidationFailedPrefix
+ << "Can't find URL scheme in json file.");
return false;
}
if (app_data[os_type][json::urlScheme].asString().length() >
@@ -150,19 +150,19 @@ class QueryAppsDataValidator {
os_type = json::android;
if (!app_data[os_type].keyExists(json::packageName)) {
LOGGER_WARN(logger_,
- kQueryAppsValidationFailedPrefix
- << "Can't find package name in json file.");
+ kQueryAppsValidationFailedPrefix
+ << "Can't find package name in json file.");
return false;
}
if (app_data[json::android][json::packageName].asString().length() >
kPackageNameLengthMax) {
LOGGER_WARN(logger_,
- kQueryAppsValidationFailedPrefix
- << "Package name length ["
- << app_data[json::android][json::packageName]
- .asString()
- .length() << "] exceeds max length ["
- << kPackageNameLengthMax << "]in json file.");
+ kQueryAppsValidationFailedPrefix
+ << "Package name length ["
+ << app_data[json::android][json::packageName]
+ .asString()
+ .length() << "] exceeds max length ["
+ << kPackageNameLengthMax << "]in json file.");
return false;
}
}
@@ -170,16 +170,16 @@ class QueryAppsDataValidator {
if (os_type.empty()) {
LOGGER_WARN(logger_,
- kQueryAppsValidationFailedPrefix
- << "Can't find mobile OS type in json file.");
+ kQueryAppsValidationFailedPrefix
+ << "Can't find mobile OS type in json file.");
return false;
}
// Languages verification
if (!app_data[os_type].keyExists(json::languages)) {
LOGGER_WARN(logger_,
- kQueryAppsValidationFailedPrefix
- << "'languages' doesn't exist");
+ kQueryAppsValidationFailedPrefix
+ << "'languages' doesn't exist");
return false;
}
if (!ValidateLanguages(app_data[os_type][json::languages],
@@ -195,25 +195,25 @@ class QueryAppsDataValidator {
// Verify appid
if (!app_data.keyExists(json::appId)) {
LOGGER_WARN(logger_,
- kQueryAppsValidationFailedPrefix
- << "Can't find app ID in json file.");
+ kQueryAppsValidationFailedPrefix
+ << "Can't find app ID in json file.");
return false;
}
// Verify appid length
const std::string app_id(app_data[json::appId].asString());
if (app_id.length() > kAppIdLengthMax) {
LOGGER_WARN(logger_,
- kQueryAppsValidationFailedPrefix
- << "An Object ID length exceeds maximum allowed ["
- << app_id.length() << "]>[" << kAppIdLengthMax << "]");
+ kQueryAppsValidationFailedPrefix
+ << "An Object ID length exceeds maximum allowed ["
+ << app_id.length() << "]>[" << kAppIdLengthMax << "]");
return false;
}
// Verify that appid is unique
if (app_ids_set.find(app_id) != app_ids_set.end()) {
LOGGER_WARN(logger_,
- kQueryAppsValidationFailedPrefix
- << "An Object ID is not unigue [" << app_id << "]");
+ kQueryAppsValidationFailedPrefix
+ << "An Object ID is not unigue [" << app_id << "]");
return false;
}
app_ids_set.insert(app_id);
@@ -223,26 +223,26 @@ class QueryAppsDataValidator {
manager_.application_by_policy_id(app_id);
if (registered_app) {
LOGGER_WARN(logger_,
- kQueryAppsValidationFailedPrefix
- << "Application with the same id: " << app_id
- << " is registered already.");
+ kQueryAppsValidationFailedPrefix
+ << "Application with the same id: " << app_id
+ << " is registered already.");
return false;
}
// Verify app name exist
if (!app_data.keyExists(json::name)) {
LOGGER_WARN(logger_,
- kQueryAppsValidationFailedPrefix
- << "Can't find app name in json file.");
+ kQueryAppsValidationFailedPrefix
+ << "Can't find app name in json file.");
return false;
}
// And app name length
const std::string appName(app_data[json::name].asString());
if (appName.length() > kAppNameLengthMax) {
LOGGER_WARN(logger_,
- kQueryAppsValidationFailedPrefix
- << "Name of application exceeds maximum allowed ["
- << appName.length() << "]>[" << kAppNameLengthMax
- << "].");
+ kQueryAppsValidationFailedPrefix
+ << "Name of application exceeds maximum allowed ["
+ << appName.length() << "]>[" << kAppNameLengthMax
+ << "].");
return false;
}
return true;
@@ -254,10 +254,10 @@ class QueryAppsDataValidator {
const size_t languages_array_size = languages.length();
if (languages_array_size > kLanguageArraySizeMax) {
LOGGER_WARN(logger_,
- kQueryAppsValidationFailedPrefix
- << "'languages' array exceeds max size ["
- << languages_array_size << "]>[" << kLanguageArraySizeMax
- << "]");
+ kQueryAppsValidationFailedPrefix
+ << "'languages' array exceeds max size ["
+ << languages_array_size << "]>[" << kLanguageArraySizeMax
+ << "]");
return false;
}
// Every language has ttsname string and vrsynonyms array
@@ -265,21 +265,21 @@ class QueryAppsDataValidator {
const smart_objects::SmartObject& language = languages.getElement(idx);
if (smart_objects::SmartType_Map != language.getType()) {
LOGGER_WARN(logger_,
- kQueryAppsValidationFailedPrefix
- << "language is not a map.");
+ kQueryAppsValidationFailedPrefix
+ << "language is not a map.");
return false;
}
if (language.length() != 1) {
LOGGER_WARN(logger_,
- kQueryAppsValidationFailedPrefix
- << "language map size is not equal 1.");
+ kQueryAppsValidationFailedPrefix
+ << "language map size is not equal 1.");
return false;
}
const std::string language_name = (*language.map_begin()).first;
if (!language_name.length()) {
LOGGER_WARN(logger_,
- kQueryAppsValidationFailedPrefix
- << "language name is empty");
+ kQueryAppsValidationFailedPrefix
+ << "language name is empty");
return false;
}
// Verify default language defined
@@ -293,8 +293,8 @@ class QueryAppsDataValidator {
// ttsName verification
if (!language[language_name].keyExists(json::ttsName)) {
LOGGER_WARN(logger_,
- kQueryAppsValidationFailedPrefix
- << "'languages.ttsName' doesn't exist");
+ kQueryAppsValidationFailedPrefix
+ << "'languages.ttsName' doesn't exist");
return false;
}
const smart_objects::SmartObject& ttsNameObject =
@@ -305,16 +305,16 @@ class QueryAppsDataValidator {
language[language_name][json::ttsName].asString();
if (ttsName.length() > kTtsNameLengthMax) {
LOGGER_WARN(logger_,
- kQueryAppsValidationFailedPrefix
- << "ttsName string exceeds max length ["
- << ttsName.length() << "]>[" << kTtsNameLengthMax
- << "]");
+ kQueryAppsValidationFailedPrefix
+ << "ttsName string exceeds max length ["
+ << ttsName.length() << "]>[" << kTtsNameLengthMax
+ << "]");
return false;
}
} else {
LOGGER_WARN(logger_,
- kQueryAppsValidationFailedPrefix
- << "ttsName is not the string type.");
+ kQueryAppsValidationFailedPrefix
+ << "ttsName is not the string type.");
return false;
}
@@ -324,8 +324,8 @@ class QueryAppsDataValidator {
}
if (!default_language_found) {
LOGGER_WARN(logger_,
- kQueryAppsValidationFailedPrefix
- << " 'languages'.default' doesn't exist");
+ kQueryAppsValidationFailedPrefix
+ << " 'languages'.default' doesn't exist");
return false;
}
return true;
@@ -336,33 +336,33 @@ class QueryAppsDataValidator {
SynonymsMap& synonyms_map) const {
if (!language[language_name].keyExists(json::vrSynonyms)) {
LOGGER_WARN(logger_,
- kQueryAppsValidationFailedPrefix
- << "'languages.vrSynonyms' doesn't exist");
+ kQueryAppsValidationFailedPrefix
+ << "'languages.vrSynonyms' doesn't exist");
return false;
}
const smart_objects::SmartArray* synonyms_array =
language[language_name][json::vrSynonyms].asArray();
if (!synonyms_array) {
LOGGER_WARN(logger_,
- kQueryAppsValidationFailedPrefix
- << "vrSynonyms is not array.");
+ kQueryAppsValidationFailedPrefix
+ << "vrSynonyms is not array.");
return false;
}
const size_t synonyms_array_size = synonyms_array->size();
if (synonyms_array_size < kVrArraySizeMin) {
LOGGER_WARN(logger_,
- kQueryAppsValidationFailedPrefix
- << "vrSynomyms array has [" << synonyms_array_size
- << "] size < allowed min size [" << kVrArraySizeMin
- << "]");
+ kQueryAppsValidationFailedPrefix
+ << "vrSynomyms array has [" << synonyms_array_size
+ << "] size < allowed min size [" << kVrArraySizeMin
+ << "]");
return false;
}
if (synonyms_array_size > kVrArraySizeMax) {
LOGGER_WARN(logger_,
- kQueryAppsValidationFailedPrefix
- << "vrSynomyms array size [" << synonyms_array_size
- << "] exceeds maximum allowed size [" << kVrArraySizeMax
- << "]");
+ kQueryAppsValidationFailedPrefix
+ << "vrSynomyms array size [" << synonyms_array_size
+ << "] exceeds maximum allowed size [" << kVrArraySizeMax
+ << "]");
return false;
}
@@ -371,18 +371,18 @@ class QueryAppsDataValidator {
const std::string vrSynonym = synonym.asString();
if (vrSynonym.length() > kVrSynonymLengthMax) {
LOGGER_WARN(logger_,
- kQueryAppsValidationFailedPrefix
- << "vrSYnomym item [" << idx
- << "] exceeds max length [" << vrSynonym.length()
- << "]>[" << kVrSynonymLengthMax << "]");
+ kQueryAppsValidationFailedPrefix
+ << "vrSYnomym item [" << idx << "] exceeds max length ["
+ << vrSynonym.length() << "]>[" << kVrSynonymLengthMax
+ << "]");
return false;
}
if (vrSynonym.length() < kVrSynonymLengthMin) {
LOGGER_WARN(logger_,
- kQueryAppsValidationFailedPrefix
- << "vrSYnomym item [" << idx << "] length ["
- << vrSynonym.length() << "] is less then min length ["
- << kVrSynonymLengthMin << "] allowed.");
+ kQueryAppsValidationFailedPrefix
+ << "vrSYnomym item [" << idx << "] length ["
+ << vrSynonym.length() << "] is less then min length ["
+ << kVrSynonymLengthMin << "] allowed.");
return false;
}
// Verify duplicates
@@ -391,10 +391,10 @@ class QueryAppsDataValidator {
if (synonyms_map_iter != synonyms_map.end()) {
if (!(*synonyms_map_iter).second.insert(vrSynonym).second) {
LOGGER_WARN(logger_,
- kQueryAppsValidationFailedPrefix
- << "vrSYnomym item already defined ["
- << vrSynonym.c_str() << "] for language ["
- << language_name << "]");
+ kQueryAppsValidationFailedPrefix
+ << "vrSYnomym item already defined ["
+ << vrSynonym.c_str() << "] for language ["
+ << language_name << "]");
return false;
}
}
@@ -501,9 +501,9 @@ void SystemRequest::Run() {
app_full_file_path += file_name;
LOGGER_DEBUG(logger_,
- "Binary data is not present. Trying to find file "
- << file_name << " within previously saved app file in "
- << binary_data_folder);
+ "Binary data is not present. Trying to find file "
+ << file_name << " within previously saved app file in "
+ << binary_data_folder);
const AppFile* file = application->GetFile(app_full_file_path);
if (!file || !file->is_download_complete ||
@@ -613,15 +613,15 @@ bool SystemRequest::ValidateQueryAppData(
const smart_objects::SmartObject& data) const {
if (!data.isValid()) {
LOGGER_ERROR(logger_,
- kQueryAppsValidationFailedPrefix
- << "QueryApps response is not valid.");
+ kQueryAppsValidationFailedPrefix
+ << "QueryApps response is not valid.");
return false;
}
if (!data.keyExists(json::response)) {
LOGGER_ERROR(logger_,
- kQueryAppsValidationFailedPrefix
- << "QueryApps response does not contain '"
- << json::response << "' parameter.");
+ kQueryAppsValidationFailedPrefix
+ << "QueryApps response does not contain '"
+ << json::response << "' parameter.");
return false;
}
diff --git a/src/components/application_manager/src/commands/mobile/unsubscribe_vehicle_data_request.cc b/src/components/application_manager/src/commands/mobile/unsubscribe_vehicle_data_request.cc
index 6e7052df96..ec65377f48 100644
--- a/src/components/application_manager/src/commands/mobile/unsubscribe_vehicle_data_request.cc
+++ b/src/components/application_manager/src/commands/mobile/unsubscribe_vehicle_data_request.cc
@@ -146,24 +146,24 @@ void UnsubscribeVehicleDataRequest::Run() {
if (!app->UnsubscribeFromIVI(static_cast<uint32_t>(key_type))) {
LOGGER_ERROR(logger_,
- "Unable to unsubscribe from "
- "VehicleDataType: "
- << key_type);
+ "Unable to unsubscribe from "
+ "VehicleDataType: "
+ << key_type);
continue;
}
LOGGER_DEBUG(logger_,
- "Unsubscribed app with connection key "
- << connection_key()
- << " from VehicleDataType: " << key_type);
+ "Unsubscribed app with connection key "
+ << connection_key()
+ << " from VehicleDataType: " << key_type);
++unsubscribed_items;
if (IsSomeoneSubscribedFor(key_type)) {
LOGGER_DEBUG(logger_,
- "There are another apps still subscribed for "
- "VehicleDataType: "
- << key_type);
+ "There are another apps still subscribed for "
+ "VehicleDataType: "
+ << key_type);
vi_still_subscribed_by_another_apps_.insert(key_type);
response_params[key_name][strings::data_type] = key_type;
@@ -228,7 +228,7 @@ void UnsubscribeVehicleDataRequest::Run() {
}
}
LOGGER_INFO(logger_,
- hmi_requests_.size() << " requests are going to be sent to HMI");
+ hmi_requests_.size() << " requests are going to be sent to HMI");
// Send subrequests
for (HmiRequests::const_iterator it = hmi_requests_.begin();
@@ -285,9 +285,9 @@ void UnsubscribeVehicleDataRequest::on_event(const event_engine::Event& event) {
status = mobile_api::Result::eType::GENERIC_ERROR;
}
LOGGER_TRACE(logger_,
- "Status from HMI: " << it->status
- << ", so response status become "
- << status);
+ "Status from HMI: " << it->status
+ << ", so response status become "
+ << status);
} else {
any_arg_success = true;
}
@@ -398,8 +398,8 @@ void UnsubscribeVehicleDataRequest::UpdateHash() const {
application->UpdateHash();
} else {
LOGGER_ERROR(logger_,
- "Application with connection_key = " << connection_key()
- << " doesn't exist.");
+ "Application with connection_key = " << connection_key()
+ << " doesn't exist.");
}
application_manager_.TerminateRequest(connection_key(), correlation_id());
}
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 7148d33922..ebe687d67a 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
@@ -18,8 +18,8 @@ void UnSubscribeWayPointsRequest::Run() {
if (!app) {
LOGGER_ERROR(logger_,
- "An application with connection key "
- << connection_key() << " is not registered.");
+ "An application with connection key "
+ << connection_key() << " is not registered.");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
diff --git a/src/components/application_manager/src/commands/mobile/update_turn_list_request.cc b/src/components/application_manager/src/commands/mobile/update_turn_list_request.cc
index c615b21d59..b376f9d20f 100644
--- a/src/components/application_manager/src/commands/mobile/update_turn_list_request.cc
+++ b/src/components/application_manager/src/commands/mobile/update_turn_list_request.cc
@@ -67,7 +67,7 @@ void UpdateTurnListRequest::Run() {
if (IsWhiteSpaceExist()) {
LOGGER_ERROR(logger_,
- "Incoming update turn list has contains \t\n \\t \\n");
+ "Incoming update turn list has contains \t\n \\t \\n");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
return;
}
@@ -95,8 +95,7 @@ void UpdateTurnListRequest::Run() {
MessageHelper::VerifyImage(turn_list_array[i][strings::turn_icon],
app,
application_manager_))) {
- LOGGER_ERROR(logger_,
- "MessageHelper::VerifyImage return INVALID_DATA");
+ LOGGER_ERROR(logger_, "MessageHelper::VerifyImage return INVALID_DATA");
SendResponse(false, mobile_apis::Result::INVALID_DATA);
return;
}
@@ -219,8 +218,8 @@ bool UpdateTurnListRequest::IsWhiteSpaceExist() {
if ((*it_tl).keyExists(strings::turn_icon)) {
str = (*it_tl)[strings::turn_icon][strings::value].asCharArray();
if (!CheckSyntax(str)) {
- LOGGER_ERROR(
- logger_, "Invalid turn_list turn_icon value syntax check failed");
+ LOGGER_ERROR(logger_,
+ "Invalid turn_list turn_icon value syntax check failed");
return true;
}
}
diff --git a/src/components/application_manager/src/hmi_command_factory.cc b/src/components/application_manager/src/hmi_command_factory.cc
index 11bb8a28d9..5890a9aef0 100644
--- a/src/components/application_manager/src/hmi_command_factory.cc
+++ b/src/components/application_manager/src/hmi_command_factory.cc
@@ -280,8 +280,8 @@ CommandSharedPtr HMICommandFactory::CreateCommand(
ApplicationManager& application_manager) {
const int function_id =
(*message)[strings::params][strings::function_id].asInt();
- LOGGER_DEBUG(
- logger_, "HMICommandFactory::CreateCommand function_id: " << function_id);
+ LOGGER_DEBUG(logger_,
+ "HMICommandFactory::CreateCommand function_id: " << function_id);
CommandSharedPtr command(new application_manager::commands::CommandImpl(
message, application_manager));
diff --git a/src/components/application_manager/src/hmi_language_handler.cc b/src/components/application_manager/src/hmi_language_handler.cc
index e9b947d24f..5d07eee71a 100644
--- a/src/components/application_manager/src/hmi_language_handler.cc
+++ b/src/components/application_manager/src/hmi_language_handler.cc
@@ -77,8 +77,8 @@ void HMILanguageHandler::set_language_for(
return;
}
LOGGER_DEBUG(logger_,
- "Setting language " << language << " for interface "
- << interface);
+ "Setting language " << language << " for interface "
+ << interface);
last_state_->dictionary[LanguagesKey][key] = language;
return;
}
@@ -151,19 +151,19 @@ void HMILanguageHandler::set_handle_response_for(
using namespace helpers;
if (!request.keyExists(strings::params)) {
LOGGER_ERROR(logger_,
- "Object does not have " << strings::params << " key.");
+ "Object does not have " << strings::params << " key.");
return;
}
if (!request[strings::params].keyExists(strings::function_id)) {
LOGGER_ERROR(logger_,
- "Object does not have " << strings::function_id << " key.");
+ "Object does not have " << strings::function_id << " key.");
return;
}
if (!request[strings::params].keyExists(strings::correlation_id)) {
- LOGGER_ERROR(
- logger_, "Object does not have " << strings::correlation_id << " key.");
+ LOGGER_ERROR(logger_,
+ "Object does not have " << strings::correlation_id << " key.");
return;
}
@@ -177,7 +177,7 @@ void HMILanguageHandler::set_handle_response_for(
hmi_apis::FunctionID::VR_GetLanguage,
hmi_apis::FunctionID::TTS_GetLanguage)) {
LOGGER_ERROR(logger_,
- "Only *GetLanguage request are allowed to be subscribed.");
+ "Only *GetLanguage request are allowed to be subscribed.");
return;
}
@@ -187,8 +187,8 @@ void HMILanguageHandler::set_handle_response_for(
subscribe_on_event(function_id, correlation_id);
LOGGER_DEBUG(logger_,
- "Subscribed for function_id "
- << function_id << " and correlation_id " << correlation_id);
+ "Subscribed for function_id "
+ << function_id << " and correlation_id " << correlation_id);
}
void HMILanguageHandler::set_default_capabilities_languages(
@@ -248,13 +248,13 @@ void HMILanguageHandler::VerifyWithPersistedLanguages() {
hmi_capabilities.active_vr_language() == persisted_vr_language_ &&
hmi_capabilities.active_tts_language() == persisted_tts_language_) {
LOGGER_INFO(logger_,
- "All languages gotten from HMI match to persisted values.");
+ "All languages gotten from HMI match to persisted values.");
return;
}
LOGGER_INFO(logger_,
- "Some languages gotten from HMI have "
- "mismatch with persisted values.");
+ "Some languages gotten from HMI have "
+ "mismatch with persisted values.");
const ApplicationSet& accessor =
application_manager_.applications().GetData();
@@ -263,9 +263,9 @@ void HMILanguageHandler::VerifyWithPersistedLanguages() {
ApplicationConstSharedPtr app = *it++;
LOGGER_INFO(logger_,
- "Application with app_id "
- << app->app_id() << " will be unregistered because of "
- "HMI language(s) mismatch.");
+ "Application with app_id "
+ << app->app_id() << " will be unregistered because of "
+ "HMI language(s) mismatch.");
CheckApplication(std::make_pair(app->app_id(), false));
}
@@ -273,7 +273,7 @@ void HMILanguageHandler::VerifyWithPersistedLanguages() {
sync_primitives::AutoLock lock(apps_lock_);
if (0 == apps_.size()) {
LOGGER_DEBUG(logger_,
- "No registered apps found. Unsubscribing from all events.");
+ "No registered apps found. Unsubscribing from all events.");
unsubscribe_from_all_events();
}
}
@@ -283,15 +283,15 @@ void HMILanguageHandler::HandleWrongLanguageApp(const Apps::value_type& app) {
Apps::iterator it = apps_.find(app.first);
if (apps_.end() == it) {
LOGGER_DEBUG(logger_,
- "Application id "
- << app.first
- << " is not found within apps with wrong language.");
+ "Application id "
+ << app.first
+ << " is not found within apps with wrong language.");
return;
}
LOGGER_INFO(logger_,
- "Unregistering application with app_id "
- << app.first << " because of HMI language(s) mismatch.");
+ "Unregistering application with app_id "
+ << app.first << " because of HMI language(s) mismatch.");
SendOnLanguageChangeToMobile(app.first);
application_manager_.ManageMobileCommand(
@@ -303,8 +303,7 @@ void HMILanguageHandler::HandleWrongLanguageApp(const Apps::value_type& app) {
app.first, mobile_apis::Result::SUCCESS, false);
apps_.erase(it);
if (0 == apps_.size()) {
- LOGGER_DEBUG(logger_,
- "All apps processed. Unsubscribing from all events.");
+ LOGGER_DEBUG(logger_, "All apps processed. Unsubscribing from all events.");
unsubscribe_from_all_events();
}
}
@@ -315,8 +314,8 @@ void HMILanguageHandler::CheckApplication(const Apps::value_type app) {
Apps::iterator it = apps_.find(app.first);
if (apps_.end() == it) {
LOGGER_INFO(logger_,
- "Adding application id "
- << app.first << " Application registered: " << app.second);
+ "Adding application id "
+ << app.first << " Application registered: " << app.second);
apps_.insert(app);
return;
}
diff --git a/src/components/application_manager/src/message_helper/message_helper.cc b/src/components/application_manager/src/message_helper/message_helper.cc
index de9efec8e8..bc700b131f 100644
--- a/src/components/application_manager/src/message_helper/message_helper.cc
+++ b/src/components/application_manager/src/message_helper/message_helper.cc
@@ -1268,7 +1268,7 @@ bool MessageHelper::CreateHMIApplicationStruct(
session_observer.GetDataOnDeviceID(
app->device(), &device_name, NULL, &mac_address, &transport_type)) {
LOGGER_ERROR(logger_,
- "Failed to extract information for device " << app->device());
+ "Failed to extract information for device " << app->device());
}
message = smart_objects::SmartObject(smart_objects::SmartType_Map);
@@ -2200,7 +2200,7 @@ mobile_apis::Result::eType MessageHelper::VerifyImageFiles(
if (mobile_apis::Result::SUCCESS != verification_result) {
LOGGER_DEBUG(logger_,
- "VerifyImageFiles result:" << verification_result);
+ "VerifyImageFiles result:" << verification_result);
return verification_result; // exit point
}
} else {
@@ -2301,8 +2301,8 @@ bool MessageHelper::VerifySoftButtonString(const std::string& str) {
(std::string::npos != str.find("\\t")) ||
(std::string::npos == str.find_first_not_of(' '))) {
LOGGER_ERROR(logger_,
- "MessageHelper::VerifySoftButtonString"
- "string contains incorrect character");
+ "MessageHelper::VerifySoftButtonString"
+ "string contains incorrect character");
return false;
}
return true;
diff --git a/src/components/application_manager/src/mobile_message_handler.cc b/src/components/application_manager/src/mobile_message_handler.cc
index 2115f17249..52c171d54d 100644
--- a/src/components/application_manager/src/mobile_message_handler.cc
+++ b/src/components/application_manager/src/mobile_message_handler.cc
@@ -97,12 +97,12 @@ MobileMessageHandler::HandleIncomingMessageProtocol(
return NULL;
}
LOGGER_DEBUG(logger_,
- "Incoming RPC_INFO: " << (out_message->connection_key() >> 16)
- << ", "
- << messageTypes[out_message->type()]
- << ", " << out_message->function_id()
- << ", " << out_message->correlation_id()
- << ", " << out_message->json_message());
+ "Incoming RPC_INFO: " << (out_message->connection_key() >> 16)
+ << ", "
+ << messageTypes[out_message->type()]
+ << ", " << out_message->function_id()
+ << ", " << out_message->correlation_id()
+ << ", " << out_message->json_message());
return out_message;
}
@@ -110,11 +110,11 @@ protocol_handler::RawMessage*
MobileMessageHandler::HandleOutgoingMessageProtocol(
const MobileMessage& message) {
LOGGER_DEBUG(logger_,
- "Outgoing RPC_INFO: " << (message->connection_key() >> 16)
- << ", " << messageTypes[message->type()]
- << ", " << message->function_id() << ", "
- << message->correlation_id() << ", "
- << message->json_message());
+ "Outgoing RPC_INFO: " << (message->connection_key() >> 16)
+ << ", " << messageTypes[message->type()]
+ << ", " << message->function_id() << ", "
+ << message->correlation_id() << ", "
+ << message->json_message());
if (message->protocol_version() == application_manager::kV1) {
return MobileMessageHandler::HandleOutgoingMessageProtocolV1(message);
diff --git a/src/components/application_manager/src/policies/policy_handler.cc b/src/components/application_manager/src/policies/policy_handler.cc
index bd2656f652..6a5438ebc5 100644
--- a/src/components/application_manager/src/policies/policy_handler.cc
+++ b/src/components/application_manager/src/policies/policy_handler.cc
@@ -107,29 +107,29 @@ const policy::DeviceParams GetDeviceParams(
&device_params.device_mac_address,
&device_params.device_connection_type)) {
LOGGER_ERROR(logger_,
- "Failed to extract information for device " << device_handle);
+ "Failed to extract information for device " << device_handle);
}
device_params.device_handle = device_handle;
return device_params;
}
}
-#define POLICY_LIB_CHECK(return_value) \
- { \
- sync_primitives::AutoReadLock lock(policy_manager_lock_); \
- if (!policy_manager_) { \
+#define POLICY_LIB_CHECK(return_value) \
+ { \
+ sync_primitives::AutoReadLock lock(policy_manager_lock_); \
+ if (!policy_manager_) { \
LOGGER_DEBUG(logger_, "The shared library of policy is not loaded"); \
- return return_value; \
- } \
+ return return_value; \
+ } \
}
-#define POLICY_LIB_CHECK_VOID() \
- { \
- sync_primitives::AutoReadLock lock(policy_manager_lock_); \
- if (!policy_manager_) { \
+#define POLICY_LIB_CHECK_VOID() \
+ { \
+ sync_primitives::AutoReadLock lock(policy_manager_lock_); \
+ if (!policy_manager_) { \
LOGGER_DEBUG(logger_, "The shared library of policy is not loaded"); \
- return; \
- } \
+ return; \
+ } \
}
static const std::string kCerficateFileName = "certificate";
@@ -222,8 +222,8 @@ struct LinkAppToDevice {
void operator()(const ApplicationSharedPtr& app) {
if (!app.valid()) {
LOGGER_WARN(logger_,
- "Invalid pointer to application was passed."
- "Skip current application.");
+ "Invalid pointer to application was passed."
+ "Skip current application.");
return;
}
DeviceParams device_params = GetDeviceParams(
@@ -232,7 +232,7 @@ struct LinkAppToDevice {
const std::string app_id = app->policy_app_id();
if (device_params.device_mac_address.empty()) {
LOGGER_WARN(logger_,
- "Couldn't find device, which hosts application " << app_id);
+ "Couldn't find device, which hosts application " << app_id);
return;
}
app_to_device_link_[app_id] = device_params.device_mac_address;
@@ -301,8 +301,8 @@ bool PolicyHandler::LoadPolicyLibrary() {
sync_primitives::AutoWriteLock lock(policy_manager_lock_);
if (!PolicyEnabled()) {
LOGGER_WARN(logger_,
- "System is configured to work without policy "
- "functionality.");
+ "System is configured to work without policy "
+ "functionality.");
policy_manager_.reset();
return NULL;
}
@@ -450,8 +450,8 @@ void PolicyHandler::SendOnAppPermissionsChanged(
const AppPermissions& permissions, const std::string& policy_app_id) const {
LOGGER_AUTO_TRACE(logger_);
LOGGER_DEBUG(logger_,
- "PolicyHandler::SendOnAppPermissionsChanged for "
- << policy_app_id);
+ "PolicyHandler::SendOnAppPermissionsChanged for "
+ << policy_app_id);
ApplicationSharedPtr app =
application_manager_.application_by_policy_id(policy_app_id);
if (!app.valid()) {
@@ -525,8 +525,8 @@ void PolicyHandler::OnAppPermissionConsentInternal(
sync_primitives::AutoLock lock(app_to_device_link_lock_);
if (!app_to_device_link_.size()) {
LOGGER_WARN(logger_,
- "There are no applications previously stored for "
- "setting common permissions.");
+ "There are no applications previously stored for "
+ "setting common permissions.");
return;
}
@@ -542,8 +542,8 @@ void PolicyHandler::OnAppPermissionConsentInternal(
// permissions should be set only for coincident to registered apps
if (!app.valid()) {
LOGGER_WARN(logger_,
- "Invalid pointer to application was passed."
- "Permissions setting skipped.");
+ "Invalid pointer to application was passed."
+ "Permissions setting skipped.");
continue;
}
@@ -553,8 +553,8 @@ void PolicyHandler::OnAppPermissionConsentInternal(
if (device_params.device_mac_address != it->second) {
LOGGER_WARN(logger_,
- "Device_id of application is changed."
- "Permissions setting skipped.");
+ "Device_id of application is changed."
+ "Permissions setting skipped.");
continue;
}
@@ -632,10 +632,10 @@ void PolicyHandler::OnGetListOfPermissions(const uint32_t connection_key,
if (!app.valid()) {
LOGGER_WARN(logger_,
- "Connection key '"
- << connection_key
- << "' "
- "not found within registered applications.");
+ "Connection key '"
+ << connection_key
+ << "' "
+ "not found within registered applications.");
return;
}
@@ -680,10 +680,10 @@ std::string PolicyHandler::OnCurrentDeviceIdUpdateRequired(
if (!app.valid()) {
LOGGER_WARN(logger_,
- "Application with id '"
- << policy_app_id
- << "' "
- "not found within registered applications.");
+ "Application with id '"
+ << policy_app_id
+ << "' "
+ "not found within registered applications.");
return "";
}
DeviceParams device_params = GetDeviceParams(
@@ -733,14 +733,14 @@ void PolicyHandler::OnVehicleDataUpdated(
void PolicyHandler::OnPendingPermissionChange(
const std::string& policy_app_id) {
LOGGER_DEBUG(logger_,
- "PolicyHandler::OnPendingPermissionChange for "
- << policy_app_id);
+ "PolicyHandler::OnPendingPermissionChange for "
+ << policy_app_id);
POLICY_LIB_CHECK_VOID();
ApplicationSharedPtr app =
application_manager_.application_by_policy_id(policy_app_id);
if (!app.valid()) {
LOGGER_WARN(logger_,
- "No app found for " << policy_app_id << " policy app id.");
+ "No app found for " << policy_app_id << " policy app id.");
return;
}
@@ -828,24 +828,24 @@ bool PolicyHandler::SendMessageToSDK(const BinaryMessage& pt_string,
if (!app.valid()) {
LOGGER_WARN(logger_,
- "There is no registered application with "
- "connection key '"
- << app_id << "'");
+ "There is no registered application with "
+ "connection key '"
+ << app_id << "'");
return false;
}
const std::string& mobile_app_id = app->policy_app_id();
if (mobile_app_id.empty()) {
LOGGER_WARN(logger_,
- "Application with connection key '"
- << app_id << "'"
- " has no application id.");
+ "Application with connection key '"
+ << app_id << "'"
+ " has no application id.");
return false;
}
LOGGER_DEBUG(logger_,
- "Update url is " << url << " for application "
- "with connection key " << app_id);
+ "Update url is " << url << " for application "
+ "with connection key " << app_id);
MessageHelper::SendPolicySnapshotNotification(
app_id, pt_string, url, application_manager_);
@@ -931,7 +931,7 @@ void PolicyHandler::OnAllowSDLFunctionalityNotification(
uint32_t device_handle = 0;
if (!connection_handler.GetDeviceID(device_mac, &device_handle)) {
LOGGER_WARN(logger_,
- "Device hadle with mac " << device_mac << " wasn't found.");
+ "Device hadle with mac " << device_mac << " wasn't found.");
}
}
@@ -940,7 +940,7 @@ void PolicyHandler::OnAllowSDLFunctionalityNotification(
uint32_t device_handle = 0;
if (!connection_handler.GetDeviceID(device_mac, &device_handle)) {
LOGGER_WARN(logger_,
- "Device hadle with mac " << device_mac << " wasn't found.");
+ "Device hadle with mac " << device_mac << " wasn't found.");
}
DeviceHandles::iterator it = std::find(pending_device_handles_.begin(),
pending_device_handles_.end(),
@@ -1002,7 +1002,7 @@ void PolicyHandler::OnActivateApp(uint32_t connection_key,
void PolicyHandler::KmsChanged(int kilometers) {
LOGGER_DEBUG(logger_,
- "PolicyHandler::KmsChanged " << kilometers << " kilometers");
+ "PolicyHandler::KmsChanged " << kilometers << " kilometers");
POLICY_LIB_CHECK_VOID();
policy_manager_->KmsChanged(kilometers);
}
@@ -1038,8 +1038,8 @@ void PolicyHandler::OnPermissionsUpdated(const std::string& policy_app_id,
if (mobile_apis::HMILevel::INVALID_ENUM == hmi_level) {
LOGGER_WARN(logger_,
- "Couldn't convert default hmi level " << default_hmi
- << " to enum.");
+ "Couldn't convert default hmi level " << default_hmi
+ << " to enum.");
return;
}
if (current_hmi_level == hmi_level) {
@@ -1049,9 +1049,9 @@ void PolicyHandler::OnPermissionsUpdated(const std::string& policy_app_id,
switch (current_hmi_level) {
case mobile_apis::HMILevel::HMI_NONE: {
LOGGER_INFO(logger_,
- "Changing hmi level of application "
- << policy_app_id << " to default hmi level "
- << default_hmi);
+ "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(
@@ -1064,9 +1064,9 @@ void PolicyHandler::OnPermissionsUpdated(const std::string& policy_app_id,
}
default:
LOGGER_WARN(logger_,
- "Application " << policy_app_id
- << " is running."
- "HMI level won't be changed.");
+ "Application " << policy_app_id
+ << " is running."
+ "HMI level won't be changed.");
break;
}
}
@@ -1087,9 +1087,8 @@ void PolicyHandler::OnPermissionsUpdated(const std::string& policy_app_id,
app->app_id(), permissions, application_manager_);
LOGGER_DEBUG(logger_,
- "Notification sent for application_id:"
- << policy_app_id << " and connection_key "
- << app->app_id());
+ "Notification sent for application_id:"
+ << policy_app_id << " and connection_key " << app->app_id());
}
bool PolicyHandler::SaveSnapshot(const BinaryMessage& pt_string,
diff --git a/src/components/application_manager/src/policies/policy_retry_sequence.cc b/src/components/application_manager/src/policies/policy_retry_sequence.cc
index 9f7e1d1a84..e8e38f41ab 100644
--- a/src/components/application_manager/src/policies/policy_retry_sequence.cc
+++ b/src/components/application_manager/src/policies/policy_retry_sequence.cc
@@ -60,7 +60,7 @@ void RetrySequence::StartNextRetry() {
const int timeout = policy_handler_->TimeoutExchange();
const int seconds = policy_handler_->NextRetryTimeout();
LOGGER_DEBUG(logger_,
- "Timeout response: " << timeout << " Next try: " << seconds);
+ "Timeout response: " << timeout << " Next try: " << seconds);
if (timeout > 0) {
sleep(timeout);
policy_handler_->OnExceededTimeout();
diff --git a/src/components/application_manager/src/policies/pt_exchange_handler_ext.cc b/src/components/application_manager/src/policies/pt_exchange_handler_ext.cc
index b5a49f608d..35de4511b6 100644
--- a/src/components/application_manager/src/policies/pt_exchange_handler_ext.cc
+++ b/src/components/application_manager/src/policies/pt_exchange_handler_ext.cc
@@ -73,8 +73,8 @@ void PTExchangeHandlerExt::Start() {
policy_handler_->RetrySequenceDelaysSeconds());
} else {
LOGGER_ERROR(logger_,
- "Failed to write snapshot file to "
- << policy_snapshot_file_name);
+ "Failed to write snapshot file to "
+ << policy_snapshot_file_name);
}
} else {
LOGGER_ERROR(logger_, "Failed to obtain policy table snapshot");
diff --git a/src/components/application_manager/src/request_controller.cc b/src/components/application_manager/src/request_controller.cc
index 04455f6d72..0fc718e2b0 100644
--- a/src/components/application_manager/src/request_controller.cc
+++ b/src/components/application_manager/src/request_controller.cc
@@ -144,9 +144,9 @@ bool RequestController::CheckPendingRequestsAmount(
pending_requests_amount > pending_requests_size;
if (!available_to_add) {
LOGGER_WARN(logger_,
- "Pending requests count " << pending_requests_size
- << " exceed application limit "
- << pending_requests_amount);
+ "Pending requests count " << pending_requests_size
+ << " exceed application limit "
+ << pending_requests_amount);
}
return available_to_add;
}
@@ -171,7 +171,7 @@ RequestController::TResult RequestController::addMobileRequest(
AutoLock auto_lock_list(mobile_request_list_lock_);
mobile_request_list_.push_back(request);
LOGGER_DEBUG(logger_,
- "Waiting for execution: " << mobile_request_list_.size());
+ "Waiting for execution: " << mobile_request_list_.size());
// wake up one thread that is waiting for a task to be available
}
cond_var_.NotifyOne();
@@ -195,12 +195,12 @@ RequestController::TResult RequestController::addHMIRequest(
if (0 == timeout_in_mseconds) {
LOGGER_DEBUG(logger_,
- "Default timeout was set to 0."
- "RequestController will not track timeout of this request.");
+ "Default timeout was set to 0."
+ "RequestController will not track timeout of this request.");
}
waiting_for_response_.Add(request_info_ptr);
LOGGER_DEBUG(logger_,
- "Waiting for response count:" << waiting_for_response_.Size());
+ "Waiting for response count:" << waiting_for_response_.Size());
UpdateTimer();
return RequestController::SUCCESS;
@@ -232,9 +232,9 @@ void RequestController::terminateRequest(const uint32_t& correlation_id,
bool force_terminate) {
LOGGER_AUTO_TRACE(logger_);
LOGGER_DEBUG(logger_,
- "correlation_id = "
- << correlation_id << " connection_key = " << connection_key
- << " force_terminate = " << force_terminate);
+ "correlation_id = " << correlation_id
+ << " connection_key = " << connection_key
+ << " force_terminate = " << force_terminate);
RequestInfoPtr request =
waiting_for_response_.Find(connection_key, correlation_id);
if (request) {
@@ -264,8 +264,8 @@ void RequestController::terminateWaitingForExecutionAppRequests(
const uint32_t& app_id) {
LOGGER_AUTO_TRACE(logger_);
LOGGER_DEBUG(logger_,
- "app_id: " << app_id << "Waiting for execution"
- << mobile_request_list_.size());
+ "app_id: " << app_id << "Waiting for execution"
+ << mobile_request_list_.size());
AutoLock auto_lock(mobile_request_list_lock_);
std::list<RequestPtr>::iterator request_it = mobile_request_list_.begin();
while (mobile_request_list_.end() != request_it) {
@@ -277,25 +277,25 @@ void RequestController::terminateWaitingForExecutionAppRequests(
}
}
LOGGER_DEBUG(logger_,
- "Waiting for execution " << mobile_request_list_.size());
+ "Waiting for execution " << mobile_request_list_.size());
}
void RequestController::terminateWaitingForResponseAppRequests(
const uint32_t& app_id) {
LOGGER_AUTO_TRACE(logger_);
waiting_for_response_.RemoveByConnectionKey(app_id);
- LOGGER_DEBUG(
- logger_, "Waiting for response count : " << waiting_for_response_.Size());
+ LOGGER_DEBUG(logger_,
+ "Waiting for response count : " << waiting_for_response_.Size());
}
void RequestController::terminateAppRequests(const uint32_t& app_id) {
LOGGER_AUTO_TRACE(logger_);
LOGGER_DEBUG(logger_,
- "app_id : " << app_id
- << "Requests waiting for execution count : "
- << mobile_request_list_.size()
- << "Requests waiting for response count : "
- << waiting_for_response_.Size());
+ "app_id : " << app_id
+ << "Requests waiting for execution count : "
+ << mobile_request_list_.size()
+ << "Requests waiting for response count : "
+ << waiting_for_response_.Size());
terminateWaitingForExecutionAppRequests(app_id);
terminateWaitingForResponseAppRequests(app_id);
@@ -323,12 +323,12 @@ void RequestController::updateRequestTimeout(const uint32_t& app_id,
LOGGER_AUTO_TRACE(logger_);
LOGGER_DEBUG(logger_,
- "app_id : " << app_id
- << " mobile_correlation_id : " << correlation_id
- << " new_timeout : " << new_timeout);
+ "app_id : " << app_id
+ << " mobile_correlation_id : " << correlation_id
+ << " new_timeout : " << new_timeout);
LOGGER_DEBUG(logger_,
- "New_timeout is NULL. RequestCtrl will "
- "not manage this request any more");
+ "New_timeout is NULL. RequestCtrl will "
+ "not manage this request any more");
RequestInfoPtr request_info =
waiting_for_response_.Find(app_id, correlation_id);
@@ -338,14 +338,14 @@ void RequestController::updateRequestTimeout(const uint32_t& app_id,
waiting_for_response_.Add(request_info);
UpdateTimer();
LOGGER_INFO(logger_,
- "Timeout updated for "
- << " app_id: " << app_id << " correlation_id: "
- << correlation_id << " new_timeout (ms): " << new_timeout);
+ "Timeout updated for "
+ << " app_id: " << app_id << " correlation_id: "
+ << correlation_id << " new_timeout (ms): " << new_timeout);
} else {
LOGGER_ERROR(logger_,
- "Can't find request with "
- << " app_id: " << app_id
- << " correlation_id: " << correlation_id);
+ "Can't find request with "
+ << " app_id: " << app_id
+ << " correlation_id: " << correlation_id);
}
}
@@ -376,21 +376,21 @@ void RequestController::onTimer() {
waiting_for_response_.FrontWithNotNullTimeout();
while (probably_expired && probably_expired->isExpired()) {
LOGGER_INFO(logger_,
- "Timeout for "
- << (RequestInfo::HMIRequest ==
- probably_expired->requst_type()
- ? "HMI"
- : "Mobile")
- << " request id: " << probably_expired->requestId()
- << " connection_key: " << probably_expired->app_id()
- << " is expired");
+ "Timeout for "
+ << (RequestInfo::HMIRequest ==
+ probably_expired->requst_type()
+ ? "HMI"
+ : "Mobile")
+ << " request id: " << probably_expired->requestId()
+ << " connection_key: " << probably_expired->app_id()
+ << " is expired");
const uint32_t experied_request_id = probably_expired->requestId();
const uint32_t experied_app_id = probably_expired->app_id();
probably_expired->request()->onTimeOut();
if (RequestInfo::HmiConnectoinKey == probably_expired->app_id()) {
LOGGER_DEBUG(logger_,
- "Erase HMI request: " << probably_expired->requestId());
+ "Erase HMI request: " << probably_expired->requestId());
waiting_for_response_.RemoveRequest(probably_expired);
}
probably_expired = waiting_for_response_.FrontWithNotNullTimeout();
@@ -456,9 +456,9 @@ void RequestController::Worker::threadMain() {
request_controller_->UpdateTimer();
} else {
LOGGER_DEBUG(logger_,
- "Default timeout was set to 0. "
- "RequestController will not track timeout "
- "of this request.");
+ "Default timeout was set to 0. "
+ "RequestController will not track timeout "
+ "of this request.");
}
AutoUnlock unlock(auto_lock);
@@ -467,9 +467,9 @@ void RequestController::Worker::threadMain() {
if ((false == request_controller_->IsLowVoltage()) &&
request_ptr->CheckPermissions() && init_res) {
LOGGER_DEBUG(logger_,
- "Execute MobileRequest corr_id = "
- << request_info_ptr->requestId()
- << " with timeout: " << timeout_in_mseconds);
+ "Execute MobileRequest corr_id = "
+ << request_info_ptr->requestId()
+ << " with timeout: " << timeout_in_mseconds);
request_ptr->Run();
}
}
diff --git a/src/components/application_manager/src/request_info.cc b/src/components/application_manager/src/request_info.cc
index 1bd6d16117..70faf096ed 100644
--- a/src/components/application_manager/src/request_info.cc
+++ b/src/components/application_manager/src/request_info.cc
@@ -138,9 +138,9 @@ bool RequestInfoSet::Add(RequestInfoPtr request_info) {
return true;
} else {
LOGGER_ERROR(logger_,
- "Request with app_id = "
- << request_info->app_id() << "; corr_id "
- << request_info->requestId() << " Already exist ");
+ "Request with app_id = "
+ << request_info->app_id() << "; corr_id "
+ << request_info->requestId() << " Already exist ");
}
CheckSetSizes();
return false;
@@ -285,9 +285,9 @@ bool RequestInfoSet::CheckTimeScaleMaxRequest(
scale);
if (count >= max_request_per_time_scale) {
LOGGER_WARN(logger_,
- "Processing requests count " << count
- << " exceed application limit "
- << max_request_per_time_scale);
+ "Processing requests count " << count
+ << " exceed application limit "
+ << max_request_per_time_scale);
return false;
}
LOGGER_DEBUG(logger_, "Requests count " << count);
@@ -315,10 +315,10 @@ bool RequestInfoSet::CheckHMILevelTimeScaleMaxRequest(
scale);
if (count >= max_request_per_time_scale) {
LOGGER_WARN(logger_,
- "Processing requests count "
- << count << " exceed application limit "
- << max_request_per_time_scale << " in hmi level "
- << hmi_level);
+ "Processing requests count "
+ << count << " exceed application limit "
+ << max_request_per_time_scale << " in hmi level "
+ << hmi_level);
return false;
}
LOGGER_DEBUG(logger_, "Requests count " << count);
diff --git a/src/components/application_manager/src/resumption/resume_ctrl.cc b/src/components/application_manager/src/resumption/resume_ctrl.cc
index b06813fff0..336ca5daad 100644
--- a/src/components/application_manager/src/resumption/resume_ctrl.cc
+++ b/src/components/application_manager/src/resumption/resume_ctrl.cc
@@ -89,8 +89,8 @@ bool ResumeCtrl::Init(resumption::LastState& last_state) {
if (!db->IsDBVersionActual()) {
LOGGER_INFO(logger_,
- "DB version had been changed. "
- "Rebuilding resumption DB.");
+ "DB version had been changed. "
+ "Rebuilding resumption DB.");
smart_objects::SmartObject data;
db->GetAllData(data);
@@ -131,8 +131,8 @@ void ResumeCtrl::SaveApplication(ApplicationSharedPtr application) {
LOGGER_AUTO_TRACE(logger_);
DCHECK_OR_RETURN_VOID(application);
LOGGER_INFO(logger_,
- "application with appID " << application->app_id()
- << " will be saved");
+ "application with appID " << application->app_id()
+ << " will be saved");
resumption_storage_->SaveApplication(application);
}
@@ -145,8 +145,8 @@ bool ResumeCtrl::RestoreAppHMIState(ApplicationSharedPtr application) {
LOGGER_AUTO_TRACE(logger_);
DCHECK_OR_RETURN(application, false);
LOGGER_DEBUG(logger_,
- "app_id : " << application->app_id() << "; policy_app_id : "
- << application->policy_app_id());
+ "app_id : " << application->app_id() << "; policy_app_id : "
+ << application->policy_app_id());
const std::string& device_mac = application->mac_address();
smart_objects::SmartObject saved_app(smart_objects::SmartType_Map);
bool result = resumption_storage_->GetSavedApplication(
@@ -215,9 +215,9 @@ bool ResumeCtrl::SetAppHMIState(ApplicationSharedPtr application,
LOGGER_AUTO_TRACE(logger_);
DCHECK_OR_RETURN(application, false);
LOGGER_TRACE(logger_,
- " app_id : " << application->app_id()
- << ", hmi_level : " << hmi_level
- << ", check_policy : " << check_policy);
+ " app_id : " << application->app_id()
+ << ", hmi_level : " << hmi_level
+ << ", check_policy : " << check_policy);
const std::string& device_mac = application->mac_address();
if (check_policy &&
application_manager_.GetUserConsentForDevice(device_mac) !=
@@ -230,8 +230,8 @@ bool ResumeCtrl::SetAppHMIState(ApplicationSharedPtr application,
application_manager_.state_controller().SetRegularState(application,
hmi_level);
LOGGER_INFO(logger_,
- "Application with policy id " << application->policy_app_id()
- << " got HMI level " << hmi_level);
+ "Application with policy id " << application->policy_app_id()
+ << " got HMI level " << hmi_level);
return true;
}
@@ -321,10 +321,10 @@ bool ResumeCtrl::StartResumptionOnlyHMILevel(ApplicationSharedPtr application) {
return false;
}
LOGGER_DEBUG(logger_,
- "HMI level resumption requested for application id "
- << application->app_id() << "with hmi_app_id "
- << application->hmi_app_id() << ", policy_app_id "
- << application->policy_app_id());
+ "HMI level resumption requested for application id "
+ << application->app_id() << "with hmi_app_id "
+ << application->hmi_app_id() << ", policy_app_id "
+ << application->policy_app_id());
SetupDefaultHMILevel(application);
const std::string& device_mac = application->mac_address();
smart_objects::SmartObject saved_app;
@@ -353,14 +353,13 @@ void ResumeCtrl::StartAppHmiStateResumption(ApplicationSharedPtr application) {
CheckAppRestrictions(application, saved_app) &&
((0 == ign_off_count) || CheckIgnCycleRestrictions(saved_app));
if (restore_data_allowed) {
- LOGGER_INFO(logger_,
- "Resume application " << application->policy_app_id());
+ LOGGER_INFO(logger_, "Resume application " << application->policy_app_id());
RestoreAppHMIState(application);
RemoveApplicationFromSaved(application);
} else {
LOGGER_INFO(logger_,
- "Do not need to resume application "
- << application->policy_app_id());
+ "Do not need to resume application "
+ << application->policy_app_id());
}
}
@@ -374,8 +373,8 @@ bool ResumeCtrl::CheckPersistenceFilesForResumption(
LOGGER_AUTO_TRACE(logger_);
DCHECK_OR_RETURN(application, false);
LOGGER_DEBUG(logger_,
- " Resume app_id = " << application->app_id() << " policy_id = "
- << application->policy_app_id());
+ " Resume app_id = " << application->app_id() << " policy_id = "
+ << application->policy_app_id());
smart_objects::SmartObject saved_app;
const std::string& device_mac = application->mac_address();
bool result = resumption_storage_->GetSavedApplication(
@@ -396,7 +395,7 @@ bool ResumeCtrl::CheckApplicationHash(ApplicationSharedPtr application,
LOGGER_AUTO_TRACE(logger_);
DCHECK_OR_RETURN(application, false);
LOGGER_DEBUG(logger_,
- "app_id : " << application->app_id() << " hash : " << hash);
+ "app_id : " << application->app_id() << " hash : " << hash);
smart_objects::SmartObject saved_app;
const std::string& device_mac = application->mac_address();
bool result = resumption_storage_->GetSavedApplication(
@@ -450,7 +449,7 @@ bool ResumeCtrl::RestoreApplicationData(ApplicationSharedPtr application) {
result = true;
} else {
LOGGER_WARN(logger_,
- "Saved data of application does not contain grammar_id");
+ "Saved data of application does not contain grammar_id");
result = false;
}
} else {
@@ -660,8 +659,8 @@ bool ResumeCtrl::CheckAppRestrictions(
? true
: false;
LOGGER_DEBUG(logger_,
- "is_media_app " << is_media_app << "; hmi_level " << hmi_level
- << " result " << result);
+ "is_media_app " << is_media_app << "; hmi_level " << hmi_level
+ << " result " << result);
return result;
}
@@ -683,10 +682,10 @@ bool ResumeCtrl::CheckDelayAfterIgnOn() {
const uint32_t wait_time =
application_manager_.get_settings().resumption_delay_after_ign();
LOGGER_DEBUG(logger_,
- "curr_time " << curr_time << "; sdl_launch_time "
- << sdl_launch_time << "; seconds_from_sdl_start "
- << seconds_from_sdl_start << "; wait_time "
- << wait_time);
+ "curr_time " << curr_time << "; sdl_launch_time "
+ << sdl_launch_time << "; seconds_from_sdl_start "
+ << seconds_from_sdl_start << "; wait_time "
+ << wait_time);
return seconds_from_sdl_start <= wait_time;
}
@@ -733,8 +732,8 @@ void ResumeCtrl::AddToResumptionTimerQueue(const uint32_t app_id) {
waiting_for_timer_.push_back(app_id);
queue_lock_.Release();
LOGGER_DEBUG(logger_,
- "Application ID " << app_id << " have been added"
- " to resumption queue.");
+ "Application ID " << app_id << " have been added"
+ " to resumption queue.");
if (!is_resumption_active_) {
is_resumption_active_ = true;
restore_hmi_level_timer_.Start(
@@ -754,9 +753,9 @@ void ResumeCtrl::LoadResumeData() {
const std::string app_id = application[strings::app_id].asString();
LOGGER_INFO(logger_, "Data resumption is expired.");
LOGGER_DEBUG(logger_,
- "Resumption data for application "
- << app_id << " and device id " << device_id
- << " will be dropped.");
+ "Resumption data for application "
+ << app_id << " and device id " << device_id
+ << " will be dropped.");
resumption_storage_->DropAppDataResumption(device_id, app_id);
continue;
}
diff --git a/src/components/application_manager/src/resumption/resumption_data_db.cc b/src/components/application_manager/src/resumption/resumption_data_db.cc
index dbb109779b..60125abc96 100644
--- a/src/components/application_manager/src/resumption/resumption_data_db.cc
+++ b/src/components/application_manager/src/resumption/resumption_data_db.cc
@@ -81,7 +81,7 @@ bool ResumptionDataDB::Init() {
.open_attempt_timeout_ms_resumption_db();
const useconds_t sleep_interval_mcsec = open_attempt_timeout_ms * 1000;
LOGGER_DEBUG(logger_,
- "Open attempt timeout(ms) is: " << open_attempt_timeout_ms);
+ "Open attempt timeout(ms) is: " << open_attempt_timeout_ms);
for (int i = 0; i < attempts; ++i) {
usleep(sleep_interval_mcsec);
LOGGER_INFO(logger_, "Attempt: " << i + 1);
@@ -93,10 +93,10 @@ bool ResumptionDataDB::Init() {
}
if (!is_opened) {
LOGGER_ERROR(logger_,
- "Open retry sequence failed. Tried "
- << attempts << " attempts with "
- << open_attempt_timeout_ms
- << " open timeout(ms) for each.");
+ "Open retry sequence failed. Tried "
+ << attempts << " attempts with "
+ << open_attempt_timeout_ms
+ << " open timeout(ms) for each.");
return false;
}
}
@@ -117,8 +117,8 @@ bool ResumptionDataDB::Init() {
if (!query_checks_resumption.Prepare(kChecksResumptionData) ||
!query_checks_resumption.Exec()) {
LOGGER_ERROR(logger_,
- "Failed verification or execution query kChecksResumptionData"
- << query_checks_resumption.LastError().text());
+ "Failed verification or execution query kChecksResumptionData"
+ << query_checks_resumption.LastError().text());
return false;
}
if (0 == query_checks_resumption.GetInteger(0)) {
@@ -126,8 +126,8 @@ bool ResumptionDataDB::Init() {
if (!query_insert_resumption.Prepare(kInsertInitData) ||
!query_insert_resumption.Exec()) {
LOGGER_ERROR(logger_,
- "Failed insert init data to database: "
- << query_insert_resumption.LastError().text());
+ "Failed insert init data to database: "
+ << query_insert_resumption.LastError().text());
return false;
}
}
@@ -145,8 +145,8 @@ void ResumptionDataDB::SaveApplication(
const std::string& policy_app_id = application->policy_app_id();
const std::string& device_mac = application->mac_address();
LOGGER_INFO(logger_,
- "app_id : " << application->app_id() << " policy_app_id : "
- << policy_app_id << " device_id : " << device_mac);
+ "app_id : " << application->app_id() << " policy_app_id : "
+ << policy_app_id << " device_id : " << device_mac);
if (!CheckExistenceApplication(
policy_app_id, device_mac, application_exist)) {
@@ -196,9 +196,9 @@ int32_t ResumptionDataDB::GetStoredHMILevel(
int hmi_level;
if (SelectHMILevel(policy_app_id, device_id, hmi_level)) {
LOGGER_INFO(logger_,
- "Application with policy application id = "
- << policy_app_id << " and device id = " << device_id
- << "has hmi level = " << hmi_level);
+ "Application with policy application id = "
+ << policy_app_id << " and device id = " << device_id
+ << "has hmi level = " << hmi_level);
return hmi_level;
}
LOGGER_FATAL(logger_, "HMI level doesn't exists in saved data");
@@ -218,13 +218,13 @@ bool ResumptionDataDB::CheckSavedApplication(const std::string& policy_app_id,
if (!CheckExistenceApplication(policy_app_id, device_id, application_exist) ||
!application_exist) {
LOGGER_WARN(logger_,
- "Problem with access to DB or application does not exist");
+ "Problem with access to DB or application does not exist");
return false;
}
LOGGER_INFO(logger_,
- "Application with policy_app_id = "
- << policy_app_id << " and device_id = " << device_id
- << " does exist");
+ "Application with policy_app_id = "
+ << policy_app_id << " and device_id = " << device_id
+ << " does exist");
return true;
}
@@ -250,16 +250,15 @@ void ResumptionDataDB::OnSuspend() {
if (DeleteAppWithIgnCount(application_lifes)) {
LOGGER_INFO(logger_,
- "Saved application with ign_off_count = " << application_lifes
- << " was deleted");
+ "Saved application with ign_off_count = " << application_lifes
+ << " was deleted");
} else {
LOGGER_WARN(logger_, "Problem with removing applications");
}
if (query_update_suspend_data.Prepare(kUpdateSuspendData)) {
if (query_update_suspend_data.Exec()) {
- LOGGER_INFO(logger_,
- "Data ign_off_count and suspend_count were updated");
+ LOGGER_INFO(logger_, "Data ign_off_count and suspend_count were updated");
}
}
@@ -279,8 +278,8 @@ bool ResumptionDataDB::DeleteAppWithIgnCount(const int application_lifes) {
if (!select_apps_for_removing.Prepare(kSelectApplicationsIgnOffCount) ||
!count_app.Prepare(kCountApplicationsIgnOff)) {
LOGGER_WARN(logger_,
- "Problem with verification query select_apps_for_removing or"
- " query count_app");
+ "Problem with verification query select_apps_for_removing or"
+ " query count_app");
return false;
}
/* Positions of binding data for "query count_app" :
@@ -332,13 +331,13 @@ bool ResumptionDataDB::GetSavedApplication(
if (!CheckExistenceApplication(policy_app_id, device_id, application_exist) ||
!application_exist) {
LOGGER_ERROR(logger_,
- "Problem with access to DB or application does not exists");
+ "Problem with access to DB or application does not exists");
return false;
}
if (!SelectDataFromAppTable(policy_app_id, device_id, saved_app)) {
LOGGER_ERROR(logger_,
- "Problem with restoring of data from application table");
+ "Problem with restoring of data from application table");
return false;
}
@@ -372,7 +371,7 @@ bool ResumptionDataDB::GetSavedApplication(
return false;
}
LOGGER_INFO(logger_,
- "Application data were successfully fetched from data base");
+ "Application data were successfully fetched from data base");
return true;
}
@@ -383,8 +382,8 @@ bool ResumptionDataDB::RemoveApplicationFromSaved(
if (!CheckExistenceApplication(policy_app_id, device_id, application_exist) ||
!application_exist) {
LOGGER_ERROR(logger_,
- "Problem with access to DB or application does not"
- " exist");
+ "Problem with access to DB or application does not"
+ " exist");
return false;
}
bool result = false;
@@ -457,7 +456,7 @@ bool ResumptionDataDB::CheckExistenceHMIId(uint32_t hmi_app_id) const {
}
}
LOGGER_FATAL(logger_,
- "HMI appID = " << hmi_app_id << " doesn't exist in saved data");
+ "HMI appID = " << hmi_app_id << " doesn't exist in saved data");
return false;
}
@@ -487,9 +486,9 @@ void ResumptionDataDB::SelectHMIId(const std::string& policy_app_id,
}
}
LOGGER_FATAL(logger_,
- "Saved data doesn't have application with "
- "device id = "
- << device_id << " and policy appID = " << policy_app_id);
+ "Saved data doesn't have application with "
+ "device id = "
+ << device_id << " and policy appID = " << policy_app_id);
}
bool ResumptionDataDB::SelectHashId(const std::string& policy_app_id,
@@ -500,8 +499,8 @@ bool ResumptionDataDB::SelectHashId(const std::string& policy_app_id,
utils::dbms::SQLQuery select_hash(db());
if (!select_hash.Prepare(kSelectHashId) || !count.Prepare(kCountHashId)) {
LOGGER_WARN(logger_,
- "Problem with verification count query or"
- " select_hash query");
+ "Problem with verification count query or"
+ " select_hash query");
return false;
}
/* Positions of binding data for "count" and "select_hash" :
@@ -519,10 +518,10 @@ bool ResumptionDataDB::SelectHashId(const std::string& policy_app_id,
return true;
}
LOGGER_WARN(logger_,
- "Saved data doesn't have application with "
- "device id = "
- << device_id << " and policy appID = " << policy_app_id
- << "or hashID");
+ "Saved data doesn't have application with "
+ "device id = "
+ << device_id << " and policy appID = " << policy_app_id
+ << "or hashID");
return false;
}
@@ -561,8 +560,8 @@ bool ResumptionDataDB::CheckExistenceApplication(
amount of application = 0 */
if (result && query.GetInteger(0)) {
LOGGER_INFO(logger_,
- "Saved data has application with policy appID = "
- << policy_app_id << " and deviceID = " << device_id);
+ "Saved data has application with policy appID = "
+ << policy_app_id << " and deviceID = " << device_id);
application_exist = true;
} else if (result) {
LOGGER_INFO(logger_, "Saved data does not contain application");
@@ -584,15 +583,15 @@ void ResumptionDataDB::SelectDataForLoadResumeData(
if (!select_data.Prepare(kSelectDataForLoadResumeData) ||
!count_application.Prepare(kCountApplications)) {
LOGGER_WARN(logger_,
- "Problem with verification select_data query"
- " or count application");
+ "Problem with verification select_data query"
+ " or count application");
return;
}
if (!count_application.Exec() || !count_application.GetInteger(0)) {
LOGGER_WARN(logger_,
- "Problem with execution count_application query"
- " or appliction table does not contain data");
+ "Problem with execution count_application query"
+ " or appliction table does not contain data");
return;
}
SmartObject so_array_data(SmartType_Array);
@@ -631,9 +630,9 @@ void ResumptionDataDB::UpdateHmiLevel(const std::string& policy_app_id,
query.Bind(2, policy_app_id);
if (query.Exec()) {
LOGGER_INFO(logger_,
- "Saved data has application with policy appID = "
- << policy_app_id << " and deviceID = " << device_id
- << " has new HMI level = " << hmi_level);
+ "Saved data has application with policy appID = "
+ << policy_app_id << " and deviceID = " << device_id
+ << " has new HMI level = " << hmi_level);
WriteDb();
}
}
@@ -647,7 +646,7 @@ bool ResumptionDataDB::RefreshDB() const {
utils::dbms::SQLQuery query(db());
if (!query.Exec(resumption::kDropSchema)) {
LOGGER_WARN(logger_,
- "Failed dropping database: " << query.LastError().text());
+ "Failed dropping database: " << query.LastError().text());
return false;
}
if (!query.Exec(resumption::kCreateSchema)) {
@@ -711,16 +710,16 @@ bool ResumptionDataDB::IsDBVersionActual() const {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(resumption::kSelectDBVersion) || !query.Exec()) {
LOGGER_ERROR(logger_,
- "Failed to get DB version: " << query.LastError().text());
+ "Failed to get DB version: " << query.LastError().text());
return false;
}
const int32_t saved_db_version = query.GetInteger(0);
const int32_t current_db_version = GetDBVersion();
LOGGER_DEBUG(logger_,
- "Saved DB version is: " << saved_db_version
- << ". Current DB vesion is: "
- << current_db_version);
+ "Saved DB version is: " << saved_db_version
+ << ". Current DB vesion is: "
+ << current_db_version);
return current_db_version == saved_db_version;
}
@@ -739,7 +738,7 @@ bool ResumptionDataDB::UpdateDBVersion() const {
if (!query.Exec()) {
LOGGER_ERROR(logger_,
- "DB version update failed: " << query.LastError().text());
+ "DB version update failed: " << query.LastError().text());
return false;
}
@@ -1135,8 +1134,7 @@ bool ResumptionDataDB::SelectGlobalPropertiesData(
SmartObject(SmartType_Map);
if (0 == count_item) {
- LOGGER_INFO(logger_,
- "Application does not contain global properties data");
+ LOGGER_INFO(logger_, "Application does not contain global properties data");
return true;
}
utils::dbms::SQLQuery select_globalproperties(db());
@@ -1425,8 +1423,7 @@ bool ResumptionDataDB::SelectDataFromAppTable(
saved_app[strings::is_media_application] = query.GetBoolean(9);
saved_app[strings::subscribed_for_way_points] = query.GetBoolean(10);
- LOGGER_INFO(logger_,
- "Data from application table was restored successfully");
+ LOGGER_INFO(logger_, "Data from application table was restored successfully");
return true;
}
@@ -1527,7 +1524,7 @@ bool ResumptionDataDB::DeleteSavedSubscriptions(
if (!ExecQueryToDeleteData(
policy_app_id, device_id, kDeleteApplicationSubscribtionsArray)) {
LOGGER_WARN(logger_,
- "Incorrect delete from applicationSubscribtionsArray.");
+ "Incorrect delete from applicationSubscribtionsArray.");
return false;
}
return true;
@@ -1716,7 +1713,7 @@ bool ResumptionDataDB::ExecInsertImage(
}
if (!result) {
LOGGER_WARN(logger_,
- "Problem with preparing or execution count_image_query.");
+ "Problem with preparing or execution count_image_query.");
return false;
}
if (count_image) {
@@ -1730,8 +1727,8 @@ bool ResumptionDataDB::ExecInsertImage(
}
if (!result) {
LOGGER_WARN(logger_,
- "Problem with preparing or execution "
- "query for select primary key of image");
+ "Problem with preparing or execution "
+ "query for select primary key of image");
}
} else {
result = query.Prepare(kInsertImage);
@@ -1745,8 +1742,8 @@ bool ResumptionDataDB::ExecInsertImage(
}
if (!result) {
LOGGER_WARN(logger_,
- "Problem with preparing or execution "
- "query for insert image to image table");
+ "Problem with preparing or execution "
+ "query for insert image to image table");
}
}
return result;
@@ -2008,7 +2005,7 @@ bool ResumptionDataDB::InsertFilesData(const smart_objects::SmartObject& files,
if (!query_insert_file.Prepare(kInsertToFile)) {
LOGGER_WARN(logger_,
- "Problem with verification queries for insertion files");
+ "Problem with verification queries for insertion files");
return false;
}
/* Positions of binding data for "query_insert_file":
@@ -2056,7 +2053,7 @@ bool ResumptionDataDB::InsertSubMenuData(
if (!query_insert_submenu.Prepare(kInsertToSubMenu)) {
LOGGER_WARN(logger_,
- "Problem with verification queries for insertion submenu");
+ "Problem with verification queries for insertion submenu");
return false;
}
/* Positions of binding data for "query_insert_submenu":
@@ -2103,7 +2100,7 @@ bool ResumptionDataDB::InsertCommandsData(
if (!query_insert_command.Prepare(kInsertToCommand)) {
LOGGER_WARN(logger_,
- "Problem with verification queries for insertion commands");
+ "Problem with verification queries for insertion commands");
return false;
}
/* Positions of binding data for "query_insert_command":
@@ -2151,8 +2148,7 @@ bool ResumptionDataDB::InsertCommandsData(
command_primary_key,
kInsertApplicationCommandArray)) ||
!query_insert_command.Reset()) {
- LOGGER_WARN(logger_,
- "Incorrect insertion to application commands array");
+ LOGGER_WARN(logger_, "Incorrect insertion to application commands array");
return false;
}
}
@@ -2235,8 +2231,8 @@ bool ResumptionDataDB::InsertChoiceSetData(
application_primary_key,
kInsertApplicationChoiceSetArray)) {
LOGGER_WARN(logger_,
- "Problem with insertion data to"
- " applicationChoiceSetArray table");
+ "Problem with insertion data to"
+ " applicationChoiceSetArray table");
return false;
}
}
@@ -2253,8 +2249,8 @@ bool ResumptionDataDB::ExecInsertApplicationChoiceSet(
utils::dbms::SQLQuery insert_application_choice_set(db());
if (!insert_application_choice_set.Prepare(kInsertApplicationChoiceSet)) {
LOGGER_WARN(logger_,
- "Problem with preparation insert "
- "application choice set query");
+ "Problem with preparation insert "
+ "application choice set query");
return false;
}
/* Positions of binding data for "insert_application_choice_set":
@@ -2267,7 +2263,7 @@ bool ResumptionDataDB::ExecInsertApplicationChoiceSet(
if (!insert_application_choice_set.Exec()) {
LOGGER_WARN(logger_,
- "Problem with execution insert application choice set query");
+ "Problem with execution insert application choice set query");
return false;
}
choice_set_primary_key = insert_application_choice_set.LastInsertId();
@@ -2300,8 +2296,8 @@ bool ResumptionDataDB::InsertGlobalPropertiesData(
utils::dbms::SQLQuery insert_global_properties(db());
if (!insert_global_properties.Prepare(kInsertGlobalProperties)) {
LOGGER_WARN(logger_,
- "Problem with preparation query "
- "insert_global_properties");
+ "Problem with preparation query "
+ "insert_global_properties");
return false;
}
/* Positions of binding data for "insert_global_properties":
@@ -2349,8 +2345,7 @@ bool ResumptionDataDB::InsertGlobalPropertiesData(
strings::auto_complete_text, kb_prop, insert_global_properties, 6);
}
if (!insert_global_properties.Exec()) {
- LOGGER_WARN(logger_,
- "Problem with insert data to global properties table");
+ LOGGER_WARN(logger_, "Problem with insert data to global properties table");
return false;
}
@@ -2364,7 +2359,7 @@ bool ResumptionDataDB::InsertGlobalPropertiesData(
global_properties[strings::keyboard_properties]
[strings::limited_character_list])) {
LOGGER_WARN(logger_,
- "Problem with insert data to limited_character table");
+ "Problem with insert data to limited_character table");
return false;
}
}
@@ -2380,7 +2375,7 @@ bool ResumptionDataDB::InsertGlobalPropertiesData(
if (!ExecInsertHelpTimeoutArray(global_properties, global_properties_key)) {
LOGGER_WARN(logger_,
- "Problem with insert data to HelpTimeoutPromptArray table");
+ "Problem with insert data to HelpTimeoutPromptArray table");
return false;
}
@@ -2408,7 +2403,7 @@ bool ResumptionDataDB::ExecInsertHelpTimeoutArray(
}
if (0 == timeout_prompt_length && 0 == help_prompt_length) {
LOGGER_INFO(logger_,
- "Application doesn't HelpPrompt and timoutPrompt data");
+ "Application doesn't HelpPrompt and timoutPrompt data");
return true;
}
@@ -2416,7 +2411,7 @@ bool ResumptionDataDB::ExecInsertHelpTimeoutArray(
if (!insert_help_prompt_array.Prepare(kInsertHelpTimeoutPromptArray)) {
LOGGER_WARN(logger_,
- "Problem with verification query insert_help_prompt_array");
+ "Problem with verification query insert_help_prompt_array");
return false;
}
int64_t tts_chunk_key = 0;
@@ -2433,8 +2428,7 @@ bool ResumptionDataDB::ExecInsertHelpTimeoutArray(
if (i < timeout_prompt_length) {
if (!ExecInsertTTSChunks(global_properties[strings::timeout_prompt][i],
tts_chunk_key)) {
- LOGGER_WARN(logger_,
- "Problem with insertion timeoutPrompt's ttsChunk");
+ LOGGER_WARN(logger_, "Problem with insertion timeoutPrompt's ttsChunk");
return false;
}
insert_help_prompt_array.Bind(1, tts_chunk_key);
@@ -2494,8 +2488,8 @@ bool ResumptionDataDB::ExecInsertLimitedCharacters(
utils::dbms::SQLQuery insert_characters(db());
if (!insert_characters.Prepare(kInsertTableLimitedCharacter)) {
LOGGER_WARN(logger_,
- "Problem with preparation query "
- "insert_characters");
+ "Problem with preparation query "
+ "insert_characters");
return false;
}
size_t length_characters_array = characters_array.length();
@@ -2506,7 +2500,7 @@ bool ResumptionDataDB::ExecInsertLimitedCharacters(
if (!insert_characters.Exec()) {
LOGGER_WARN(logger_,
- "Problem with insert data to limited_character table");
+ "Problem with insert data to limited_character table");
return false;
}
if ((!ExecInsertDataToArray(global_properties_key,
@@ -2518,7 +2512,7 @@ bool ResumptionDataDB::ExecInsertLimitedCharacters(
}
}
LOGGER_INFO(logger_,
- "Data were saved successfully to limited_character table");
+ "Data were saved successfully to limited_character table");
return true;
}
@@ -2561,13 +2555,12 @@ bool ResumptionDataDB::ExecInsertVRHelpItem(
insert_vrhelp_item.LastInsertId(),
kInsertVRHelpItemArray)) ||
(!insert_vrhelp_item.Reset())) {
- LOGGER_WARN(logger_,
- "Problem with insert data to vrHelpItemArray table");
+ LOGGER_WARN(logger_, "Problem with insert data to vrHelpItemArray table");
return false;
}
}
LOGGER_INFO(logger_,
- "Data were saved successfully to vrHelpItem array table");
+ "Data were saved successfully to vrHelpItem array table");
return true;
}
@@ -2607,8 +2600,8 @@ bool ResumptionDataDB::InsertApplicationData(
if (!query.Prepare(kInsertApplication)) {
LOGGER_WARN(logger_,
- "Problem with verification query "
- "for insert to table application");
+ "Problem with verification query "
+ "for insert to table application");
return false;
}
@@ -2700,7 +2693,7 @@ void ResumptionDataDB::UpdateDataOnAwake() {
if (query.Prepare(kUpdateIgnOffCount)) {
if (query.Exec()) {
LOGGER_INFO(logger_,
- "Values of ignition off counts were updated successfully");
+ "Values of ignition off counts were updated successfully");
WriteDb();
}
}
@@ -2719,8 +2712,8 @@ bool ResumptionDataDB::UpdateApplicationData(
if (!query.Prepare(kUpdateApplicationData)) {
LOGGER_WARN(logger_,
- "Problem with verification query "
- "for updating some application data");
+ "Problem with verification query "
+ "for updating some application data");
return false;
}
@@ -2756,7 +2749,7 @@ bool ResumptionDataDB::UpdateGrammarID(const std::string& policy_app_id,
if (!query.Prepare(kUpdateGrammarID)) {
LOGGER_WARN(logger_,
- "Problem with verification query for updating grammar id.");
+ "Problem with verification query for updating grammar id.");
return false;
}
diff --git a/src/components/application_manager/src/resumption/resumption_data_json.cc b/src/components/application_manager/src/resumption/resumption_data_json.cc
index 15d8e8c7a5..8c8cc8c161 100644
--- a/src/components/application_manager/src/resumption/resumption_data_json.cc
+++ b/src/components/application_manager/src/resumption/resumption_data_json.cc
@@ -58,8 +58,8 @@ void ResumptionDataJson::SaveApplication(
const std::string& policy_app_id = application->policy_app_id();
LOGGER_DEBUG(logger_,
- "app_id : " << application->app_id()
- << " policy_app_id : " << policy_app_id);
+ "app_id : " << application->app_id()
+ << " policy_app_id : " << policy_app_id);
const std::string hash = application->curHash();
const uint32_t grammar_id = application->get_grammar_id();
const uint32_t time_stamp = (uint32_t)time(NULL);
@@ -245,7 +245,7 @@ bool ResumptionDataJson::GetHashId(const std::string& policy_app_id,
const Json::Value& json_app = GetSavedApplications()[idx];
LOGGER_DEBUG(logger_,
- "Saved_application_data: " << json_app.toStyledString());
+ "Saved_application_data: " << json_app.toStyledString());
if (json_app.isMember(strings::hash_id) &&
json_app.isMember(strings::time_stamp)) {
hash_id = json_app[strings::hash_id].asString();
@@ -386,8 +386,8 @@ void ResumptionDataJson::UpdateHmiLevel(
int idx = GetObjectIndex(policy_app_id, device_id);
if (-1 == idx) {
LOGGER_WARN(logger_,
- "Application isn't saved with mobile_app_id = "
- << policy_app_id << " device_id = " << device_id);
+ "Application isn't saved with mobile_app_id = "
+ << policy_app_id << " device_id = " << device_id);
return;
}
GetSavedApplications()[idx][strings::hmi_level] = hmi_level;
@@ -504,8 +504,8 @@ bool ResumptionDataJson::DropAppDataResumption(const std::string& device_id,
Json::Value& application = GetFromSavedOrAppend(app_id, device_id);
if (application.isNull()) {
LOGGER_DEBUG(logger_,
- "Application " << app_id << " with device_id " << device_id
- << " hasn't been found in resumption data.");
+ "Application " << app_id << " with device_id " << device_id
+ << " hasn't been found in resumption data.");
return false;
}
application[strings::application_commands].clear();
@@ -516,9 +516,9 @@ bool ResumptionDataJson::DropAppDataResumption(const std::string& device_id,
application[strings::application_files].clear();
application.removeMember(strings::grammar_id);
LOGGER_DEBUG(logger_,
- "Resumption data for application "
- << app_id << " with device_id " << device_id
- << " has been dropped.");
+ "Resumption data for application "
+ << app_id << " with device_id " << device_id
+ << " has been dropped.");
return true;
}
diff --git a/src/components/application_manager/src/state_controller_impl.cc b/src/components/application_manager/src/state_controller_impl.cc
index 158317905d..c0f545cfd4 100644
--- a/src/components/application_manager/src/state_controller_impl.cc
+++ b/src/components/application_manager/src/state_controller_impl.cc
@@ -300,9 +300,9 @@ void StateControllerImpl::HmiLevelConflictResolver::operator()(
if (cur_state->hmi_level() != result_hmi_level) {
LOGGER_DEBUG(logger_,
- "Application " << to_resolve->app_id()
- << " will change HMI level to "
- << result_hmi_level);
+ "Application " << to_resolve->app_id()
+ << " will change HMI level to "
+ << result_hmi_level);
state_ctrl_->SetupRegularHmiState(to_resolve,
result_hmi_level,
result_hmi_level == HMILevel::HMI_LIMITED
@@ -310,8 +310,8 @@ void StateControllerImpl::HmiLevelConflictResolver::operator()(
: AudioStreamingState::NOT_AUDIBLE);
} else {
LOGGER_DEBUG(logger_,
- "Application " << to_resolve->app_id()
- << " will not change HMI level");
+ "Application " << to_resolve->app_id()
+ << " will not change HMI level");
}
}
@@ -321,10 +321,10 @@ HmiStatePtr StateControllerImpl::ResolveHmiState(ApplicationSharedPtr app,
using namespace helpers;
LOGGER_AUTO_TRACE(logger_);
LOGGER_DEBUG(logger_,
- "State to resolve: hmi_level "
- << state->hmi_level() << ", audio_state "
- << state->audio_streaming_state() << ", system_context "
- << state->system_context());
+ "State to resolve: hmi_level "
+ << state->hmi_level() << ", audio_state "
+ << state->audio_streaming_state() << ", system_context "
+ << state->system_context());
HmiStatePtr available_state =
CreateHmiState(app->app_id(), HmiState::StateID::STATE_ID_REGULAR);
@@ -359,16 +359,16 @@ bool StateControllerImpl::IsResumptionAllowed(ApplicationSharedPtr app,
if (IsTempStateActive(HmiState::StateID::STATE_ID_AUDIO_SOURCE) &&
app->is_media_application()) {
LOGGER_DEBUG(logger_,
- "Resumption for media app is not allowed. "
- << "AUDIO_SOURCE event is active");
+ "Resumption for media app is not allowed. "
+ << "AUDIO_SOURCE event is active");
return false;
}
if (IsTempStateActive(HmiState::StateID::STATE_ID_EMBEDDED_NAVI) &&
app->is_navi()) {
LOGGER_DEBUG(logger_,
- "Resumption for navi app is not allowed. "
- << "EMBEDDED_NAVI event is active");
+ "Resumption for navi app is not allowed. "
+ << "EMBEDDED_NAVI event is active");
return false;
}
@@ -406,14 +406,14 @@ mobile_apis::HMILevel::eType StateControllerImpl::GetAvailableHmiLevel(
} else if (app->is_navi() &&
IsTempStateActive(HmiState::StateID::STATE_ID_AUDIO_SOURCE)) {
LOGGER_DEBUG(logger_,
- "Navigation app will be resumed to LIMITED, "
- "because of AUDIO_SOURCE ia active.");
+ "Navigation app will be resumed to LIMITED, "
+ "because of AUDIO_SOURCE ia active.");
result = mobile_apis::HMILevel::HMI_LIMITED;
} else if (app->is_media_application() &&
IsTempStateActive(HmiState::StateID::STATE_ID_EMBEDDED_NAVI)) {
LOGGER_DEBUG(logger_,
- "Media app will be resumed to LIMITED, "
- "because of EMBEDDED_NAVI is active.");
+ "Media app will be resumed to LIMITED, "
+ "because of EMBEDDED_NAVI is active.");
result = mobile_apis::HMILevel::HMI_LIMITED;
}
} else if (is_active_app_exist) {
@@ -429,10 +429,10 @@ bool StateControllerImpl::IsStateAvailable(ApplicationSharedPtr app,
using namespace helpers;
LOGGER_AUTO_TRACE(logger_);
LOGGER_DEBUG(logger_,
- "Checking state: hmi_level "
- << state->hmi_level() << ", audio_state "
- << state->audio_streaming_state() << ", system_context "
- << state->system_context());
+ "Checking state: hmi_level "
+ << state->hmi_level() << ", audio_state "
+ << state->audio_streaming_state() << ", system_context "
+ << state->system_context());
if (app->is_resuming()) {
return IsStateAvailableForResumption(app, state);
@@ -442,8 +442,8 @@ bool StateControllerImpl::IsStateAvailable(ApplicationSharedPtr app,
IsTempStateActive(HmiState::StateID::STATE_ID_EMBEDDED_NAVI)) {
if (HMILevel::HMI_FULL == state->hmi_level()) {
LOGGER_DEBUG(logger_,
- "AUDIO_SOURCE or EMBEDDED_NAVI is active."
- << " Requested state is not available");
+ "AUDIO_SOURCE or EMBEDDED_NAVI is active."
+ << " Requested state is not available");
return false;
}
}
@@ -462,29 +462,29 @@ bool StateControllerImpl::IsStateAvailableForResumption(
!Compare<HMILevel::eType, EQ, ONE>(
state->hmi_level(), HMILevel::HMI_FULL, HMILevel::HMI_LIMITED)) {
LOGGER_DEBUG(logger_,
- "Application is not in resuming mode."
- << " Requested state is available");
+ "Application is not in resuming mode."
+ << " Requested state is available");
return true;
}
if (IsTempStateActive(HmiState::StateID::STATE_ID_VR_SESSION) ||
IsTempStateActive(HmiState::StateID::STATE_ID_SAFETY_MODE)) {
LOGGER_DEBUG(logger_,
- "Requested state is not available. "
- << "VR session or emergency event is active");
+ "Requested state is not available. "
+ << "VR session or emergency event is active");
return false;
}
if (IsTempStateActive(HmiState::StateID::STATE_ID_PHONE_CALL) &&
app->is_media_application()) {
LOGGER_DEBUG(logger_,
- "Requested state for media application "
- << "is not available. Phone call is active");
+ "Requested state for media application "
+ << "is not available. Phone call is active");
return false;
}
if (IsTempStateActive(HmiState::StateID::STATE_ID_DEACTIVATE_HMI)) {
LOGGER_DEBUG(logger_,
- "Requested state is not available. "
- << "Deactivate HMI event is active");
+ "Requested state is not available. "
+ << "Deactivate HMI event is active");
return false;
}
@@ -499,9 +499,9 @@ void StateControllerImpl::SetupRegularHmiState(ApplicationSharedPtr app,
LOGGER_AUTO_TRACE(logger_);
DCHECK_OR_RETURN_VOID(state);
LOGGER_DEBUG(logger_,
- "hmi_level " << state->hmi_level() << ", audio_state "
- << state->audio_streaming_state()
- << ", system_context " << state->system_context());
+ "hmi_level " << state->hmi_level() << ", audio_state "
+ << state->audio_streaming_state()
+ << ", system_context " << state->system_context());
HmiStatePtr curr_state = app->CurrentHmiState();
HmiStatePtr old_state =
CreateHmiState(app->app_id(), HmiState::StateID::STATE_ID_REGULAR);
@@ -513,8 +513,8 @@ void StateControllerImpl::SetupRegularHmiState(ApplicationSharedPtr app,
if (HMILevel::HMI_LIMITED == state->hmi_level() && app->is_resuming()) {
LOGGER_DEBUG(logger_,
- "Resuming to LIMITED level. "
- << "Send OnResumeAudioSource notification");
+ "Resuming to LIMITED level. "
+ << "Send OnResumeAudioSource notification");
MessageHelper::SendOnResumeAudioSourceToHMI(app->app_id(), app_mngr_);
}
app->set_is_resuming(false);
@@ -670,15 +670,15 @@ void StateControllerImpl::OnStateChanged(ApplicationSharedPtr app,
DCHECK_OR_RETURN_VOID(old_state);
DCHECK_OR_RETURN_VOID(new_state);
LOGGER_DEBUG(logger_,
- "old: hmi_level " << old_state->hmi_level() << ", audio_state "
- << old_state->audio_streaming_state()
- << ", system_context "
- << old_state->system_context());
+ "old: hmi_level " << old_state->hmi_level() << ", audio_state "
+ << old_state->audio_streaming_state()
+ << ", system_context "
+ << old_state->system_context());
LOGGER_DEBUG(logger_,
- "new: hmi_level " << new_state->hmi_level() << ", audio_state "
- << new_state->audio_streaming_state()
- << ", system_context "
- << new_state->system_context());
+ "new: hmi_level " << new_state->hmi_level() << ", audio_state "
+ << new_state->audio_streaming_state()
+ << ", system_context "
+ << new_state->system_context());
if (IsStatusChanged(old_state, new_state)) {
app_mngr_.SendHMIStatusNotification(app);
if (new_state->hmi_level() == mobile_apis::HMILevel::HMI_NONE) {
diff --git a/src/components/config_profile/src/profile.cc b/src/components/config_profile/src/profile.cc
index 664ef8a706..dd045a905d 100644
--- a/src/components/config_profile/src/profile.cc
+++ b/src/components/config_profile/src/profile.cc
@@ -48,19 +48,19 @@
#endif // ENABLE_SECURITY
namespace {
-#define LOG_UPDATED_VALUE(value, key, section) \
- { \
+#define LOG_UPDATED_VALUE(value, key, section) \
+ { \
LOGGER_INFO(logger_, \
- "Setting value '" << value << "' for key '" << key \
- << "' in section '" << section << "'."); \
+ "Setting value '" << value << "' for key '" << key \
+ << "' in section '" << section << "'."); \
}
-#define LOG_UPDATED_BOOL_VALUE(value, key, section) \
- { \
+#define LOG_UPDATED_BOOL_VALUE(value, key, section) \
+ { \
LOGGER_INFO(logger_, \
- "Setting value '" << std::boolalpha << value << "' for key '" \
- << key << "' in section '" << section \
- << "'."); \
+ "Setting value '" << std::boolalpha << value << "' for key '" \
+ << key << "' in section '" << section \
+ << "'."); \
}
const char* kDefaultConfigFileName = "smartDeviceLink.ini";
diff --git a/src/components/connection_handler/src/connection.cc b/src/components/connection_handler/src/connection.cc
index 43fabded32..5fd302654a 100644
--- a/src/components/connection_handler/src/connection.cc
+++ b/src/components/connection_handler/src/connection.cc
@@ -162,16 +162,16 @@ bool Connection::AddNewService(uint8_t session_id,
#ifdef ENABLE_SECURITY
if (!request_protection) {
LOGGER_WARN(logger_,
- "Session " << static_cast<int>(session_id)
- << " already has unprotected service "
- << static_cast<int>(service_type));
+ "Session " << static_cast<int>(session_id)
+ << " already has unprotected service "
+ << static_cast<int>(service_type));
return false;
}
if (service->is_protected_) {
LOGGER_WARN(logger_,
- "Session " << static_cast<int>(session_id)
- << " already has protected service "
- << static_cast<int>(service_type));
+ "Session " << static_cast<int>(session_id)
+ << " already has protected service "
+ << static_cast<int>(service_type));
return false;
}
// For unproteced service could be start protection
@@ -203,7 +203,7 @@ bool Connection::RemoveService(uint8_t session_id,
// Ignore wrong and required for Session services
if (is_incorrect_for_remove_service(service_type)) {
LOGGER_WARN(logger_,
- "Could not remove service " << static_cast<int>(service_type));
+ "Could not remove service " << static_cast<int>(service_type));
return false;
}
sync_primitives::AutoLock lock(session_map_lock_);
@@ -219,8 +219,8 @@ bool Connection::RemoveService(uint8_t session_id,
find(service_list.begin(), service_list.end(), service_type);
if (service_list.end() == service_it) {
LOGGER_WARN(logger_,
- "Session " << session_id << " didn't established"
- " service " << service_type);
+ "Session " << session_id << " didn't established"
+ " service " << service_type);
return false;
}
service_list.erase(service_it);
diff --git a/src/components/connection_handler/src/connection_handler_impl.cc b/src/components/connection_handler/src/connection_handler_impl.cc
index 9a1a41560f..a52b7643aa 100644
--- a/src/components/connection_handler/src/connection_handler_impl.cc
+++ b/src/components/connection_handler/src/connection_handler_impl.cc
@@ -87,8 +87,8 @@ void ConnectionHandlerImpl::Stop() {
void ConnectionHandlerImpl::set_connection_handler_observer(
ConnectionHandlerObserver* observer) {
LOGGER_DEBUG(logger_,
- "ConnectionHandlerImpl::set_connection_handler_observer() "
- << observer);
+ "ConnectionHandlerImpl::set_connection_handler_observer() "
+ << observer);
sync_primitives::AutoWriteLock write_lock(connection_handler_observer_lock_);
if (!observer) {
LOGGER_WARN(logger_, "Set Null pointer to observer.");
@@ -99,8 +99,8 @@ void ConnectionHandlerImpl::set_connection_handler_observer(
void ConnectionHandlerImpl::set_protocol_handler(
protocol_handler::ProtocolHandler* protocol_handler) {
LOGGER_DEBUG(logger_,
- "ConnectionHandlerImpl::set_protocol_handler()"
- << protocol_handler);
+ "ConnectionHandlerImpl::set_protocol_handler()"
+ << protocol_handler);
if (!protocol_handler) {
LOGGER_WARN(logger_, "Set Null pointer to protocol handler.");
}
@@ -195,8 +195,7 @@ void ConnectionHandlerImpl::OnConnectionEstablished(
LOGGER_ERROR(logger_, "Unknown device!");
return;
}
- LOGGER_DEBUG(logger_,
- "Add Connection #" << connection_id << " to the list.");
+ LOGGER_DEBUG(logger_, "Add Connection #" << connection_id << " to the list.");
sync_primitives::AutoWriteLock lock(connection_list_lock_);
connection_list_.insert(ConnectionList::value_type(
connection_id,
@@ -268,12 +267,12 @@ bool AllowProtection(const ConnectionHandlerSettings& settings,
force_unprotected_list.end(),
service_type) != force_unprotected_list.end()) {
LOGGER_ERROR(logger_,
- "Service " << static_cast<int>(service_type)
- << " shall be protected");
+ "Service " << static_cast<int>(service_type)
+ << " shall be protected");
return false;
}
LOGGER_DEBUG(logger_,
- "Service " << static_cast<int>(service_type) << " allowed");
+ "Service " << static_cast<int>(service_type) << " allowed");
return true;
}
#endif // ENABLE_SECURITY
@@ -315,12 +314,12 @@ uint32_t ConnectionHandlerImpl::OnSessionStartedCallback(
} else { // Could be create new service or protected exists one
if (!connection->AddNewService(session_id, service_type, is_protected)) {
LOGGER_ERROR(logger_,
- "Couldn't establish "
+ "Couldn't establish "
#ifdef ENABLE_SECURITY
- << (is_protected ? "protected" : "non-protected")
+ << (is_protected ? "protected" : "non-protected")
#endif // ENABLE_SECURITY
- << " service " << static_cast<int>(service_type)
- << " for session " << static_cast<int>(session_id));
+ << " service " << static_cast<int>(service_type)
+ << " for session " << static_cast<int>(session_id));
return 0;
}
new_session_id = session_id;
@@ -335,7 +334,7 @@ uint32_t ConnectionHandlerImpl::OnSessionStartedCallback(
connection->connection_device_handle(), session_key, service_type);
if (!success) {
LOGGER_WARN(logger_,
- "Service starting forbidden by connection_handler_observer");
+ "Service starting forbidden by connection_handler_observer");
if (protocol_handler::kRpc == service_type) {
connection->RemoveSession(new_session_id);
} else {
@@ -398,32 +397,32 @@ uint32_t ConnectionHandlerImpl::OnSessionEndedCallback(
if (protocol_handler::kRpc == service_type) {
LOGGER_INFO(logger_,
- "Session " << static_cast<uint32_t>(session_id)
- << " to be removed");
+ "Session " << static_cast<uint32_t>(session_id)
+ << " to be removed");
// old version of protocol doesn't support hash
if (protocol_handler::HASH_ID_NOT_SUPPORTED != hashCode) {
if (protocol_handler::HASH_ID_WRONG == hashCode ||
session_key != hashCode) {
LOGGER_WARN(logger_,
- "Wrong hash_id for session "
- << static_cast<uint32_t>(session_id));
+ "Wrong hash_id for session "
+ << static_cast<uint32_t>(session_id));
return 0;
}
}
if (!connection->RemoveSession(session_id)) {
LOGGER_WARN(logger_,
- "Couldn't remove session "
- << static_cast<uint32_t>(session_id));
+ "Couldn't remove session "
+ << static_cast<uint32_t>(session_id));
return 0;
}
} else {
LOGGER_INFO(logger_,
- "Service " << static_cast<uint32_t>(service_type)
- << " to be removed");
+ "Service " << static_cast<uint32_t>(service_type)
+ << " to be removed");
if (!connection->RemoveService(session_id, service_type)) {
LOGGER_WARN(logger_,
- "Couldn't remove service "
- << static_cast<uint32_t>(service_type));
+ "Couldn't remove service "
+ << static_cast<uint32_t>(service_type));
return 0;
}
}
@@ -441,14 +440,14 @@ uint32_t ConnectionHandlerImpl::KeyFromPair(
uint8_t session_id) const {
const uint32_t key = connection_handle | (session_id << 16);
LOGGER_DEBUG(logger_,
- "Key for ConnectionHandle:"
- << static_cast<uint32_t>(connection_handle)
- << " Session:" << static_cast<uint32_t>(session_id)
- << " is: " << static_cast<uint32_t>(key));
+ "Key for ConnectionHandle:"
+ << static_cast<uint32_t>(connection_handle)
+ << " Session:" << static_cast<uint32_t>(session_id)
+ << " is: " << static_cast<uint32_t>(key));
if (protocol_handler::HASH_ID_WRONG == key) {
LOGGER_ERROR(logger_,
- "Connection key is WRONG_HASH_ID "
- "(session id shall be greater 0)");
+ "Connection key is WRONG_HASH_ID "
+ "(session id shall be greater 0)");
}
return key;
}
@@ -488,8 +487,8 @@ int32_t ConnectionHandlerImpl::GetDataOnSessionKey(
const SessionMap session_map = connection.session_map();
if (0 == session_id || session_map.end() == session_map.find(session_id)) {
LOGGER_ERROR(logger_,
- "Session not found in connection: "
- << static_cast<int32_t>(conn_handle));
+ "Session not found in connection: "
+ << static_cast<int32_t>(conn_handle));
return error_result;
}
@@ -509,8 +508,8 @@ int32_t ConnectionHandlerImpl::GetDataOnSessionKey(
}
LOGGER_INFO(logger_,
- "Connection " << static_cast<int32_t>(conn_handle) << " has "
- << session_map.size() << " sessions.");
+ "Connection " << static_cast<int32_t>(conn_handle) << " has "
+ << session_map.size() << " sessions.");
return 0;
}
@@ -788,7 +787,7 @@ void ConnectionHandlerImpl::CloseSession(ConnectionHandle connection_handle,
connection_list_itr->second->RemoveSession(session_id);
} else {
LOGGER_ERROR(logger_,
- "Connection with id: " << connection_id << " not found");
+ "Connection with id: " << connection_id << " not found");
return;
}
}
@@ -819,8 +818,8 @@ void ConnectionHandlerImpl::CloseSession(ConnectionHandle connection_handle,
}
LOGGER_DEBUG(logger_,
- "Session with id: " << session_id
- << " has been closed successfully");
+ "Session with id: " << session_id
+ << " has been closed successfully");
}
void ConnectionHandlerImpl::CloseConnectionSessions(
@@ -850,7 +849,7 @@ void ConnectionHandlerImpl::CloseConnectionSessions(
}
} else {
LOGGER_ERROR(logger_,
- "Connection with id: " << connection_id << " not found");
+ "Connection with id: " << connection_id << " not found");
return;
}
}
@@ -861,8 +860,8 @@ void ConnectionHandlerImpl::CloseConnectionSessions(
session_id_vector.clear();
LOGGER_DEBUG(logger_,
- "All sessions for connection with id: "
- << connection_id << " have been closed successfully");
+ "All sessions for connection with id: "
+ << connection_id << " have been closed successfully");
}
void ConnectionHandlerImpl::SendEndService(uint32_t key, uint8_t service_type) {
@@ -923,8 +922,8 @@ void ConnectionHandlerImpl::KeepConnectionAlive(uint32_t connection_key,
void ConnectionHandlerImpl::OnConnectionEnded(
const transport_manager::ConnectionUID connection_id) {
LOGGER_INFO(logger_,
- "Delete Connection: " << static_cast<int32_t>(connection_id)
- << " from the list.");
+ "Delete Connection: " << static_cast<int32_t>(connection_id)
+ << " from the list.");
connection_list_lock_.AcquireForWriting();
ConnectionList::iterator itr = connection_list_.find(connection_id);
if (connection_list_.end() == itr) {
diff --git a/src/components/connection_handler/src/device.cc b/src/components/connection_handler/src/device.cc
index 4f0c5c84d1..bd4fab5c4e 100644
--- a/src/components/connection_handler/src/device.cc
+++ b/src/components/connection_handler/src/device.cc
@@ -55,8 +55,8 @@ Device::Device(DeviceHandle device_handle,
, connection_type_(connection_type) {
mac_address_ = encryption::MakeHash(mac_address);
LOGGER_DEBUG(logger_,
- "Device: MAC address - " << mac_address << ", hash - "
- << mac_address_);
+ "Device: MAC address - " << mac_address << ", hash - "
+ << mac_address_);
}
DeviceHandle Device::device_handle() const {
diff --git a/src/components/connection_handler/src/heartbeat_monitor.cc b/src/components/connection_handler/src/heartbeat_monitor.cc
index 292cdf26b4..6851f6e2ce 100644
--- a/src/components/connection_handler/src/heartbeat_monitor.cc
+++ b/src/components/connection_handler/src/heartbeat_monitor.cc
@@ -67,8 +67,8 @@ void HeartBeatMonitor::Process() {
continue;
} else {
LOGGER_DEBUG(logger_,
- "Send heart beat into session with id "
- << static_cast<int32_t>(session_id));
+ "Send heart beat into session with id "
+ << static_cast<int32_t>(session_id));
state.PrepareToClose();
connection_->SendHeartBeat(it->first);
}
@@ -81,8 +81,8 @@ void HeartBeatMonitor::Process() {
void HeartBeatMonitor::threadMain() {
AutoLock main_lock(main_thread_lock_);
LOGGER_DEBUG(logger_,
- "Start heart beat monitor. Timeout is "
- << default_heartbeat_timeout_);
+ "Start heart beat monitor. Timeout is "
+ << default_heartbeat_timeout_);
while (run_) {
heartbeat_monitor_.WaitFor(main_lock, kDefaultCycleTimeout);
Process();
@@ -91,12 +91,12 @@ void HeartBeatMonitor::threadMain() {
void HeartBeatMonitor::AddSession(uint8_t session_id) {
LOGGER_DEBUG(logger_,
- "Add session with id " << static_cast<int32_t>(session_id));
+ "Add session with id " << static_cast<int32_t>(session_id));
AutoLock auto_lock(sessions_list_lock_);
if (sessions_.end() != sessions_.find(session_id)) {
LOGGER_WARN(logger_,
- "Session with id " << static_cast<int32_t>(session_id)
- << " already exists");
+ "Session with id " << static_cast<int32_t>(session_id)
+ << " already exists");
return;
}
sessions_.insert(
@@ -109,12 +109,12 @@ void HeartBeatMonitor::RemoveSession(uint8_t session_id) {
AutoLock auto_lock(sessions_list_lock_);
LOGGER_DEBUG(logger_,
- "Remove session with id " << static_cast<int>(session_id));
+ "Remove session with id " << static_cast<int>(session_id));
if (sessions_.erase(session_id) == 0) {
LOGGER_WARN(logger_,
- "Remove session with id " << static_cast<int>(session_id)
- << " was unsuccessful");
+ "Remove session with id " << static_cast<int>(session_id)
+ << " was unsuccessful");
}
}
@@ -124,8 +124,8 @@ void HeartBeatMonitor::KeepAlive(uint8_t session_id) {
if (sessions_.end() != sessions_.find(session_id)) {
LOGGER_INFO(logger_,
- "Resetting heart beat timer for session with id "
- << static_cast<int32_t>(session_id));
+ "Resetting heart beat timer for session with id "
+ << static_cast<int32_t>(session_id));
sessions_[session_id].KeepAlive();
}
@@ -144,8 +144,8 @@ void HeartBeatMonitor::exitThreadMain() {
void HeartBeatMonitor::set_heartbeat_timeout_milliseconds(uint32_t timeout,
uint8_t session_id) {
LOGGER_DEBUG(logger_,
- "Set new heart beat timeout " << timeout
- << "For session: " << session_id);
+ "Set new heart beat timeout " << timeout
+ << "For session: " << session_id);
AutoLock session_locker(sessions_list_lock_);
if (sessions_.end() != sessions_.find(session_id)) {
@@ -172,7 +172,7 @@ void HeartBeatMonitor::SessionState::RefreshExpiration() {
void HeartBeatMonitor::SessionState::UpdateTimeout(
uint32_t heartbeat_timeout_mseconds) {
LOGGER_DEBUG(logger_,
- "Update timout with value " << heartbeat_timeout_mseconds_);
+ "Update timout with value " << heartbeat_timeout_mseconds_);
heartbeat_timeout_mseconds_ = heartbeat_timeout_mseconds;
RefreshExpiration();
}
diff --git a/src/components/dbus/src/dbus_adapter.cc b/src/components/dbus/src/dbus_adapter.cc
index 9a8976c8b0..c3dc0f712b 100644
--- a/src/components/dbus/src/dbus_adapter.cc
+++ b/src/components/dbus/src/dbus_adapter.cc
@@ -97,8 +97,8 @@ bool DBusAdapter::Init() {
}
if (DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER != ret) {
LOGGER_ERROR(logger_,
- "DBus: Service '" << sdl_service_name_
- << "' is already running");
+ "DBus: Service '" << sdl_service_name_
+ << "' is already running");
return false;
}
@@ -432,10 +432,10 @@ bool DBusAdapter::ProcessError(DBusMessage* msg,
obj[sos::S_PARAMS]["data"]["method"] = method.first + "." + method.second;
LOGGER_WARN(logger_,
- "DBus: Call of method " << method.first << "." << method.second
- << " returned error " << name.asInt()
- << ": "
- << description[rule.name].asString());
+ "DBus: Call of method " << method.first << "." << method.second
+ << " returned error " << name.asInt()
+ << ": "
+ << description[rule.name].asString());
} else {
LOGGER_ERROR(logger_, "DBus: Type message isn't error");
}
@@ -497,7 +497,7 @@ bool DBusAdapter::SetOneArgument(DBusMessageIter* iter,
return SetValue(iter, rules, param);
} else {
LOGGER_WARN(logger_,
- "DBus: Argument '" << rules->name << "' is obligatory!");
+ "DBus: Argument '" << rules->name << "' is obligatory!");
return false;
}
} else {
@@ -753,8 +753,7 @@ bool DBusAdapter::GetValue(
dbus_message_iter_get_basic(iter, &integerValue);
smart_objects::SmartObject value(integerValue);
param = value;
- LOGGER_DEBUG(logger_,
- "DBus: " << rules->name << " = " << integerValue);
+ LOGGER_DEBUG(logger_, "DBus: " << rules->name << " = " << integerValue);
} else {
LOGGER_ERROR(logger_, "DBus: Not expected type of argument");
return false;
@@ -779,8 +778,8 @@ bool DBusAdapter::GetValue(
smart_objects::SmartObject value(static_cast<bool>(booleanValue));
param = value;
LOGGER_DEBUG(logger_,
- "DBus: " << rules->name << " = " << std::boolalpha
- << booleanValue);
+ "DBus: " << rules->name << " = " << std::boolalpha
+ << booleanValue);
} else {
LOGGER_ERROR(logger_, "DBus: Not expected type of argument");
return false;
@@ -794,7 +793,7 @@ bool DBusAdapter::GetValue(
smart_objects::SmartObject value(strValue);
param = value;
LOGGER_DEBUG(logger_,
- "DBus: " << rules->name << " = \"" << strValue << "\"");
+ "DBus: " << rules->name << " = \"" << strValue << "\"");
} else {
LOGGER_ERROR(logger_, "DBus: Not expected type of argument");
return false;
diff --git a/src/components/hmi_message_handler/src/mqueue_adapter.cc b/src/components/hmi_message_handler/src/mqueue_adapter.cc
index 882abae167..2db158a3c4 100644
--- a/src/components/hmi_message_handler/src/mqueue_adapter.cc
+++ b/src/components/hmi_message_handler/src/mqueue_adapter.cc
@@ -86,16 +86,16 @@ MqueueAdapter::MqueueAdapter(HMIMessageHandler* hmi_message_handler)
mq_open(kSdlToHmiQueue, O_CREAT | O_RDWR, S_IRWXU, &mq_attributes);
if (-1 == sdl_to_hmi_mqueue_) {
LOGGER_ERROR(logger_,
- "Could not open message queue " << kSdlToHmiQueue
- << ", error " << errno);
+ "Could not open message queue " << kSdlToHmiQueue << ", error "
+ << errno);
return;
}
hmi_to_sdl_mqueue_ =
mq_open(kHmiToSdlQueue, O_CREAT | O_RDWR, S_IRWXU, &mq_attributes);
if (-1 == hmi_to_sdl_mqueue_) {
LOGGER_ERROR(logger_,
- "Could not open message queue " << kHmiToSdlQueue
- << ", error " << errno);
+ "Could not open message queue " << kHmiToSdlQueue << ", error "
+ << errno);
return;
}
receiver_thread_delegate_ =
diff --git a/src/components/include/utils/logger.h b/src/components/include/utils/logger.h
index 370b582e1e..347f2f5cb8 100644
--- a/src/components/include/utils/logger.h
+++ b/src/components/include/utils/logger.h
@@ -85,7 +85,7 @@ log4cxx_time_t time_now();
logLevel, \
accumulator.str(), \
time_now(), \
- LOGGER_LOCATION, \
+ LOGGER_LOCATION, \
::log4cxx::spi::LoggingEvent::getCurrentThreadName()); \
} \
} \
@@ -123,13 +123,13 @@ log4cxx_time_t time_now();
#define LOGGER_ERROR_WITH_ERRNO(loggerPtr, message) \
LOGGER_ERROR(loggerPtr, \
- message << ", error code " << errno << " (" << strerror(errno) \
- << ")")
+ message << ", error code " << errno << " (" << strerror(errno) \
+ << ")")
#define LOGGER_WARN_WITH_ERRNO(loggerPtr, message) \
LOGGER_WARN(loggerPtr, \
- message << ", error code " << errno << " (" << strerror(errno) \
- << ")")
+ message << ", error code " << errno << " (" << strerror(errno) \
+ << ")")
#else // ENABLE_LOG is OFF
diff --git a/src/components/include/utils/macro.h b/src/components/include/utils/macro.h
index 8dbffbaf0f..f5da2bc086 100644
--- a/src/components/include/utils/macro.h
+++ b/src/components/include/utils/macro.h
@@ -74,43 +74,43 @@
__FUNCTION__)
#endif
-#define DCHECK(condition) \
- if (!(condition)) { \
- CREATE_LOGGERPTR_LOCAL(logger_, "Utils"); \
+#define DCHECK(condition) \
+ if (!(condition)) { \
+ CREATE_LOGGERPTR_LOCAL(logger_, "Utils"); \
LOGGER_FATAL(logger_, \
- "DCHECK failed with \"" << #condition << "\" [" \
- << __FUNCTION__ << "][" << __FILE__ \
- << ':' << __LINE__ << ']'); \
- ASSERT((condition)); \
+ "DCHECK failed with \"" << #condition << "\" [" \
+ << __FUNCTION__ << "][" << __FILE__ \
+ << ':' << __LINE__ << ']'); \
+ ASSERT((condition)); \
}
/*
* Will cauch assert on debug version,
* Will return return_value in release build
*/
-#define DCHECK_OR_RETURN(condition, return_value) \
- if (!(condition)) { \
- CREATE_LOGGERPTR_LOCAL(logger_, "Utils"); \
+#define DCHECK_OR_RETURN(condition, return_value) \
+ if (!(condition)) { \
+ CREATE_LOGGERPTR_LOCAL(logger_, "Utils"); \
LOGGER_FATAL(logger_, \
- "DCHECK failed with \"" << #condition << "\" [" \
- << __FUNCTION__ << "][" << __FILE__ \
- << ':' << __LINE__ << ']'); \
- ASSERT((condition)); \
- return (return_value); \
+ "DCHECK failed with \"" << #condition << "\" [" \
+ << __FUNCTION__ << "][" << __FILE__ \
+ << ':' << __LINE__ << ']'); \
+ ASSERT((condition)); \
+ return (return_value); \
}
/*
* Will cauch assert on debug version,
* Will return return_value in release build
*/
-#define DCHECK_OR_RETURN_VOID(condition) \
- if (!(condition)) { \
- CREATE_LOGGERPTR_LOCAL(logger_, "Utils"); \
+#define DCHECK_OR_RETURN_VOID(condition) \
+ if (!(condition)) { \
+ CREATE_LOGGERPTR_LOCAL(logger_, "Utils"); \
LOGGER_FATAL(logger_, \
- "DCHECK failed with \"" << #condition << "\" [" \
- << __FUNCTION__ << "][" << __FILE__ \
- << ':' << __LINE__ << ']'); \
- ASSERT((condition)); \
- return; \
+ "DCHECK failed with \"" << #condition << "\" [" \
+ << __FUNCTION__ << "][" << __FILE__ \
+ << ':' << __LINE__ << ']'); \
+ ASSERT((condition)); \
+ return; \
}
#define NOTREACHED() DCHECK(!"Unreachable code")
diff --git a/src/components/media_manager/src/audio/a2dp_source_player_adapter.cc b/src/components/media_manager/src/audio/a2dp_source_player_adapter.cc
index 134b4ade7c..6f38743d03 100644
--- a/src/components/media_manager/src/audio/a2dp_source_player_adapter.cc
+++ b/src/components/media_manager/src/audio/a2dp_source_player_adapter.cc
@@ -86,8 +86,8 @@ A2DPSourcePlayerAdapter::~A2DPSourcePlayerAdapter() {
void A2DPSourcePlayerAdapter::StartActivity(int32_t application_key) {
LOGGER_INFO(logger_,
- "Starting a2dp playing music for " << application_key
- << " application.");
+ "Starting a2dp playing music for " << application_key
+ << " application.");
if (application_key != current_application_) {
current_application_ = application_key;
@@ -114,8 +114,8 @@ void A2DPSourcePlayerAdapter::StartActivity(int32_t application_key) {
void A2DPSourcePlayerAdapter::StopActivity(int32_t application_key) {
LOGGER_INFO(logger_,
- "Stopping 2dp playing for " << application_key
- << " application.");
+ "Stopping 2dp playing for " << application_key
+ << " application.");
if (application_key != current_application_) {
return;
}
@@ -214,7 +214,7 @@ void A2DPSourcePlayerAdapter::A2DPSourcePlayerThread::threadMain() {
if ((latency = pa_simple_get_latency(s_in, &error)) == (pa_usec_t)-1) {
LOGGER_ERROR(logger_,
- "pa_simple_get_latency() failed: " << pa_strerror(error));
+ "pa_simple_get_latency() failed: " << pa_strerror(error));
break;
}
@@ -222,7 +222,7 @@ void A2DPSourcePlayerAdapter::A2DPSourcePlayerThread::threadMain() {
if ((latency = pa_simple_get_latency(s_out, &error)) == (pa_usec_t)-1) {
LOGGER_ERROR(logger_,
- "pa_simple_get_latency() failed: " << pa_strerror(error));
+ "pa_simple_get_latency() failed: " << pa_strerror(error));
break;
}
@@ -235,8 +235,7 @@ void A2DPSourcePlayerAdapter::A2DPSourcePlayerThread::threadMain() {
/* ... and play it */
if (pa_simple_write(s_out, buf, sizeof(buf), &error) < 0) {
- LOGGER_ERROR(logger_,
- "pa_simple_write() failed: " << pa_strerror(error));
+ LOGGER_ERROR(logger_, "pa_simple_write() failed: " << pa_strerror(error));
break;
}
diff --git a/src/components/media_manager/src/audio/from_mic_recorder_adapter.cc b/src/components/media_manager/src/audio/from_mic_recorder_adapter.cc
index 9278267f5c..28776a2153 100644
--- a/src/components/media_manager/src/audio/from_mic_recorder_adapter.cc
+++ b/src/components/media_manager/src/audio/from_mic_recorder_adapter.cc
@@ -59,7 +59,7 @@ void FromMicRecorderAdapter::StartActivity(int32_t application_key) {
LOGGER_DEBUG(logger_, "Start with app " << application_key);
if (application_key == current_application_) {
LOGGER_WARN(logger_,
- "Running recording from mic for " << current_application_);
+ "Running recording from mic for " << current_application_);
return;
}
@@ -78,10 +78,10 @@ void FromMicRecorderAdapter::StartActivity(int32_t application_key) {
void FromMicRecorderAdapter::StopActivity(int32_t application_key) {
LOGGER_INFO(logger_,
- "FromMicRecorderAdapter::StopActivity " << application_key);
+ "FromMicRecorderAdapter::StopActivity " << application_key);
if (application_key != current_application_) {
LOGGER_WARN(logger_,
- "Running activity on other app key " << current_application_);
+ "Running activity on other app key " << current_application_);
return;
}
diff --git a/src/components/media_manager/src/audio/from_mic_recorder_listener.cc b/src/components/media_manager/src/audio/from_mic_recorder_listener.cc
index 2d147466a2..f18176f7fd 100644
--- a/src/components/media_manager/src/audio/from_mic_recorder_listener.cc
+++ b/src/components/media_manager/src/audio/from_mic_recorder_listener.cc
@@ -61,8 +61,7 @@ void FromMicRecorderListener::OnErrorReceived(int32_t application_key,
void FromMicRecorderListener::OnActivityStarted(int32_t application_key) {
LOGGER_INFO(logger_,
- "FromMicRecorderListener::OnActivityStarted "
- << application_key);
+ "FromMicRecorderListener::OnActivityStarted " << application_key);
if (application_key == current_application_) {
return;
}
@@ -79,11 +78,11 @@ void FromMicRecorderListener::OnActivityStarted(int32_t application_key) {
void FromMicRecorderListener::OnActivityEnded(int32_t application_key) {
LOGGER_INFO(logger_,
- "FromMicRecorderListener::OnActivityEnded " << application_key);
+ "FromMicRecorderListener::OnActivityEnded " << application_key);
if (application_key != current_application_) {
LOGGER_WARN(logger_,
- "Not performing activity on " << application_key << " but on "
- << current_application_);
+ "Not performing activity on " << application_key << " but on "
+ << current_application_);
return;
}
if (reader_) {
diff --git a/src/components/media_manager/src/media_manager_impl.cc b/src/components/media_manager/src/media_manager_impl.cc
index d77b5a3a9b..3a99675a53 100644
--- a/src/components/media_manager/src/media_manager_impl.cc
+++ b/src/components/media_manager/src/media_manager_impl.cc
@@ -173,7 +173,7 @@ void MediaManagerImpl::StartMicrophoneRecording(int32_t application_key,
const std::string& output_file,
int32_t duration) {
LOGGER_INFO(logger_,
- "MediaManagerImpl::StartMicrophoneRecording to " << output_file);
+ "MediaManagerImpl::StartMicrophoneRecording to " << output_file);
application_manager::ApplicationSharedPtr app =
application_manager_.application(application_key);
std::string file_path = settings().app_storage_folder();
@@ -206,8 +206,8 @@ void MediaManagerImpl::StartMicrophoneRecording(int32_t application_key,
if (file_system::ReadBinaryFile(record_file_source, buf)) {
if (file_system::Write(file_path, buf)) {
LOGGER_INFO(logger_,
- "File " << record_file_source << " copied to "
- << output_file);
+ "File " << record_file_source << " copied to "
+ << output_file);
} else {
LOGGER_WARN(logger_, "Could not write to file " << output_file);
}
@@ -277,7 +277,7 @@ void MediaManagerImpl::OnMessageReceived(
if (!application_manager_.CanAppStream(streaming_app_id, service_type)) {
application_manager_.ForbidStreaming(streaming_app_id);
LOGGER_ERROR(logger_,
- "The application trying to stream when it should not.");
+ "The application trying to stream when it should not.");
return;
}
diff --git a/src/components/media_manager/src/pipe_streamer_adapter.cc b/src/components/media_manager/src/pipe_streamer_adapter.cc
index 73ca733dc7..bb353c6480 100644
--- a/src/components/media_manager/src/pipe_streamer_adapter.cc
+++ b/src/components/media_manager/src/pipe_streamer_adapter.cc
@@ -59,7 +59,7 @@ PipeStreamerAdapter::PipeStreamer::PipeStreamer(
, pipe_fd_(0) {
if (!file_system::CreateDirectoryRecursively(app_storage_folder_)) {
LOGGER_ERROR(logger_,
- "Cannot create app storage folder " << app_storage_folder_);
+ "Cannot create app storage folder " << app_storage_folder_);
return;
}
if ((mkfifo(named_pipe_path_.c_str(), S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH) <
@@ -68,7 +68,7 @@ PipeStreamerAdapter::PipeStreamer::PipeStreamer(
LOGGER_ERROR(logger_, "Cannot create pipe " << named_pipe_path_);
} else {
LOGGER_INFO(logger_,
- "Pipe " << named_pipe_path_ << " was successfully created");
+ "Pipe " << named_pipe_path_ << " was successfully created");
}
}
PipeStreamerAdapter::PipeStreamer::~PipeStreamer() {
@@ -89,8 +89,8 @@ bool PipeStreamerAdapter::PipeStreamer::Connect() {
}
LOGGER_INFO(logger_,
- "Pipe " << named_pipe_path_
- << " was successfuly opened for writing");
+ "Pipe " << named_pipe_path_
+ << " was successfuly opened for writing");
return true;
}
@@ -114,7 +114,7 @@ bool PipeStreamerAdapter::PipeStreamer::Send(
if (static_cast<uint32_t>(ret) != msg->data_size()) {
LOGGER_WARN(logger_,
- "Couldn't write all the data to pipe " << named_pipe_path_);
+ "Couldn't write all the data to pipe " << named_pipe_path_);
}
LOGGER_INFO(logger_, "Streamer::sent " << msg->data_size());
diff --git a/src/components/media_manager/src/socket_streamer_adapter.cc b/src/components/media_manager/src/socket_streamer_adapter.cc
index 7fe7f9c2a2..c366f12c6b 100644
--- a/src/components/media_manager/src/socket_streamer_adapter.cc
+++ b/src/components/media_manager/src/socket_streamer_adapter.cc
@@ -139,7 +139,7 @@ bool SocketStreamerAdapter::SocketStreamer::Send(
if (static_cast<uint32_t>(ret) != msg->data_size()) {
LOGGER_WARN(logger,
- "Couldn't send all the data to socket " << send_socket_fd_);
+ "Couldn't send all the data to socket " << send_socket_fd_);
}
LOGGER_INFO(logger, "Streamer::sent " << msg->data_size());
diff --git a/src/components/media_manager/src/streamer_adapter.cc b/src/components/media_manager/src/streamer_adapter.cc
index 2766c86587..ddff0dbcf2 100644
--- a/src/components/media_manager/src/streamer_adapter.cc
+++ b/src/components/media_manager/src/streamer_adapter.cc
@@ -53,8 +53,8 @@ void StreamerAdapter::StartActivity(int32_t application_key) {
LOGGER_AUTO_TRACE(logger);
if (is_app_performing_activity(application_key)) {
LOGGER_WARN(logger,
- "Activity for application: " << application_key
- << " has been already started");
+ "Activity for application: " << application_key
+ << " has been already started");
return;
}
messages_.Reset();
@@ -75,8 +75,8 @@ void StreamerAdapter::StopActivity(int32_t application_key) {
LOGGER_AUTO_TRACE(logger);
if (!is_app_performing_activity(application_key)) {
LOGGER_WARN(logger,
- "Activity for application: " << application_key
- << " has not been started");
+ "Activity for application: " << application_key
+ << " has not been started");
return;
}
@@ -96,8 +96,8 @@ void StreamerAdapter::SendData(int32_t application_key,
LOGGER_AUTO_TRACE(logger);
if (!is_app_performing_activity(application_key)) {
LOGGER_ERROR(logger,
- "Activity for application: " << application_key
- << " has not been started");
+ "Activity for application: " << application_key
+ << " has not been started");
return;
}
messages_.push(msg);
@@ -147,9 +147,9 @@ void StreamerAdapter::Streamer::threadMain() {
++messages_for_session;
LOGGER_DEBUG(logger,
- "Handling map streaming message. This is "
- << messages_for_session << " message for "
- << adapter_->current_application_);
+ "Handling map streaming message. This is "
+ << messages_for_session << " message for "
+ << adapter_->current_application_);
std::set<MediaListenerPtr>::iterator it =
adapter_->media_listeners_.begin();
for (; adapter_->media_listeners_.end() != it; ++it) {
diff --git a/src/components/media_manager/src/streamer_listener.cc b/src/components/media_manager/src/streamer_listener.cc
index 77f945296e..73ea608e82 100644
--- a/src/components/media_manager/src/streamer_listener.cc
+++ b/src/components/media_manager/src/streamer_listener.cc
@@ -58,8 +58,7 @@ void StreamerListener::OnErrorReceived(int32_t application_key,
void StreamerListener::OnActivityStarted(int32_t application_key) {
LOGGER_AUTO_TRACE(logger_);
if (current_application_ == application_key) {
- LOGGER_WARN(logger_,
- "Already performing activity for " << application_key);
+ LOGGER_WARN(logger_, "Already performing activity for " << application_key);
return;
}
current_application_ = application_key;
@@ -69,7 +68,7 @@ void StreamerListener::OnActivityEnded(int32_t application_key) {
LOGGER_AUTO_TRACE(logger_);
if (current_application_ != application_key) {
LOGGER_WARN(logger_,
- "Already not performing activity for " << application_key);
+ "Already not performing activity for " << application_key);
return;
}
current_application_ = 0;
diff --git a/src/components/media_manager/src/video/video_stream_to_file_adapter.cc b/src/components/media_manager/src/video/video_stream_to_file_adapter.cc
index 2e6b0be8f0..1d4495c3dd 100644
--- a/src/components/media_manager/src/video/video_stream_to_file_adapter.cc
+++ b/src/components/media_manager/src/video/video_stream_to_file_adapter.cc
@@ -68,8 +68,7 @@ void VideoStreamToFileAdapter::Init() {
void VideoStreamToFileAdapter::SendData(
int32_t application_key, const ::protocol_handler::RawMessagePtr message) {
- LOGGER_INFO(logger,
- "VideoStreamToFileAdapter::SendData " << application_key);
+ LOGGER_INFO(logger, "VideoStreamToFileAdapter::SendData " << application_key);
if (application_key != current_application_) {
LOGGER_WARN(logger, "Wrong application " << application_key);
@@ -83,10 +82,10 @@ void VideoStreamToFileAdapter::SendData(
void VideoStreamToFileAdapter::StartActivity(int32_t application_key) {
LOGGER_INFO(logger,
- "VideoStreamToFileAdapter::StartActivity " << application_key);
+ "VideoStreamToFileAdapter::StartActivity " << application_key);
if (application_key == current_application_) {
- LOGGER_WARN(
- logger, "Already running video stream to file for " << application_key);
+ LOGGER_WARN(logger,
+ "Already running video stream to file for " << application_key);
return;
}
@@ -102,10 +101,10 @@ void VideoStreamToFileAdapter::StartActivity(int32_t application_key) {
void VideoStreamToFileAdapter::StopActivity(int32_t application_key) {
LOGGER_INFO(logger,
- "VideoStreamToFileAdapter::StopActivity " << application_key);
+ "VideoStreamToFileAdapter::StopActivity " << application_key);
if (application_key != current_application_) {
- LOGGER_WARN(
- logger, "Performing activity for another key " << current_application_);
+ LOGGER_WARN(logger,
+ "Performing activity for another key " << current_application_);
return;
}
diff --git a/src/components/policy/src/policy/policy_table/table_struct/validation.cc b/src/components/policy/src/policy/policy_table/table_struct/validation.cc
index 2ca8a4c682..9794377975 100644
--- a/src/components/policy/src/policy/policy_table/table_struct/validation.cc
+++ b/src/components/policy/src/policy/policy_table/table_struct/validation.cc
@@ -47,7 +47,7 @@ bool ApplicationPoliciesSection::Validate() const {
if (!it_default_policy->second.RequestType.is_valid()) {
LOGGER_WARN(logger_,
- "Default policy RequestTypes are not valid. Will be cleaned.");
+ "Default policy RequestTypes are not valid. Will be cleaned.");
RemoveInvalidTypes(*it_default_policy->second.RequestType);
// If preloaded does not have valid default types - validation fails
// Otherwise default will be empty, i.e. all types allowed
@@ -73,7 +73,7 @@ bool ApplicationPoliciesSection::Validate() const {
if (PT_PRELOADED == pt_type) {
if (!is_request_type_valid) {
LOGGER_WARN(logger_,
- "App policy RequestTypes are not valid. Will be cleaned.");
+ "App policy RequestTypes are not valid. Will be cleaned.");
RemoveInvalidTypes(*app_params.RequestType);
if (app_params.RequestType->empty()) {
LOGGER_ERROR(
@@ -85,20 +85,20 @@ bool ApplicationPoliciesSection::Validate() const {
} else {
if (is_request_type_ommited) {
LOGGER_WARN(logger_,
- "App policy RequestTypes ommited."
- " Will be replaced with default.");
+ "App policy RequestTypes ommited."
+ " Will be replaced with default.");
app_params.RequestType = apps[kDefaultApp].RequestType;
++iter;
continue;
}
if (!is_request_type_valid) {
LOGGER_WARN(logger_,
- "App policy RequestTypes are invalid. Will be cleaned.");
+ "App policy RequestTypes are invalid. Will be cleaned.");
RemoveInvalidTypes(*app_params.RequestType);
if (app_params.RequestType->empty()) {
LOGGER_WARN(logger_,
- "App policy RequestTypes empty after clean-up."
- " Will be replaced with default.");
+ "App policy RequestTypes empty after clean-up."
+ " Will be replaced with default.");
app_params.RequestType = apps[kDefaultApp].RequestType;
++iter;
continue;
diff --git a/src/components/policy/src/policy/src/cache_manager.cc b/src/components/policy/src/policy/src/cache_manager.cc
index 9f698d55e7..a5c7802b91 100644
--- a/src/components/policy/src/policy/src/cache_manager.cc
+++ b/src/components/policy/src/policy/src/cache_manager.cc
@@ -55,20 +55,20 @@ namespace policy {
CREATE_LOGGERPTR_GLOBAL(logger_, "Policy")
-#define CACHE_MANAGER_CHECK(return_value) \
- { \
- if (!pt_) { \
+#define CACHE_MANAGER_CHECK(return_value) \
+ { \
+ if (!pt_) { \
LOGGER_WARN(logger_, "The cache manager is not initialized"); \
- return return_value; \
- } \
+ return return_value; \
+ } \
}
-#define CACHE_MANAGER_CHECK_VOID() \
- { \
- if (!pt_) { \
+#define CACHE_MANAGER_CHECK_VOID() \
+ { \
+ if (!pt_) { \
LOGGER_WARN(logger_, "The cache manager is not initialized"); \
- return; \
- } \
+ return; \
+ } \
}
struct LanguageFinder {
@@ -405,8 +405,8 @@ void CacheManager::CheckPermissions(const PTString& app_id,
if (pt_->policy_table.app_policies_section.apps.end() ==
pt_->policy_table.app_policies_section.apps.find(app_id)) {
- LOGGER_ERROR(
- logger_, "Application id " << app_id << " was not found in policy DB.");
+ LOGGER_ERROR(logger_,
+ "Application id " << app_id << " was not found in policy DB.");
return;
}
@@ -575,9 +575,9 @@ std::vector<UserFriendlyMessage> CacheManager::GetUserFriendlyMsg(
if (msg_languages.languages.end() == it_language) {
LOGGER_WARN(logger_,
- "Language "
- << language
- << " haven't been found for message code: " << *it);
+ "Language "
+ << language
+ << " haven't been found for message code: " << *it);
LanguageFinder fallback_language_finder("en-us");
@@ -588,7 +588,7 @@ std::vector<UserFriendlyMessage> CacheManager::GetUserFriendlyMsg(
if (msg_languages.languages.end() == it_fallback_language) {
LOGGER_ERROR(logger_,
- "No fallback language found for message code: " << *it);
+ "No fallback language found for message code: " << *it);
continue;
}
@@ -700,7 +700,7 @@ void CacheManager::CheckSnapshotInitialization() {
rpc::Optional<policy_table::Messages>();
} else {
LOGGER_WARN(logger_,
- "policy_table.consumer_friendly_messages is not initialized");
+ "policy_table.consumer_friendly_messages is not initialized");
}
/* policy_table.usage_and_error_counts are required for PTS and
@@ -776,7 +776,7 @@ void CacheManager::CheckSnapshotInitialization() {
}
} else {
LOGGER_WARN(logger_,
- "usage_and_error_counts or app_level is not initialized");
+ "usage_and_error_counts or app_level is not initialized");
}
}
@@ -845,8 +845,8 @@ void CacheManager::AddCalculatedPermissions(const std::string& device_id,
const std::string& policy_app_id,
const Permissions& permissions) {
LOGGER_DEBUG(logger_,
- "AddCalculatedPermissions for device: "
- << device_id << " and app: " << policy_app_id);
+ "AddCalculatedPermissions for device: "
+ << device_id << " and app: " << policy_app_id);
sync_primitives::AutoLock lock(calculated_permissions_lock_);
calculated_permissions_[device_id][policy_app_id] = permissions;
}
@@ -855,8 +855,8 @@ bool CacheManager::IsPermissionsCalculated(const std::string& device_id,
const std::string& policy_app_id,
Permissions& permission) {
LOGGER_DEBUG(logger_,
- "IsPermissionsCalculated for device: "
- << device_id << " and app: " << policy_app_id);
+ "IsPermissionsCalculated for device: "
+ << device_id << " and app: " << policy_app_id);
sync_primitives::AutoLock lock(calculated_permissions_lock_);
CalculatedPermissions::const_iterator it =
calculated_permissions_.find(device_id);
@@ -1116,8 +1116,8 @@ bool CacheManager::SetPredataPolicy(const std::string& app_id) {
if (pt_->policy_table.app_policies_section.apps.end() == iter) {
LOGGER_ERROR(logger_,
- "Could not set " << kPreDataConsentId
- << " permissions for app " << app_id);
+ "Could not set " << kPreDataConsentId
+ << " permissions for app " << app_id);
return false;
}
@@ -1159,8 +1159,8 @@ bool CacheManager::SetUnpairedDevice(const std::string& device_id,
pt_->policy_table.device_data->find(device_id);
if (!result) {
LOGGER_DEBUG(logger_,
- "Couldn't set unpaired flag for device id "
- << device_id << " , since it wasn't found.");
+ "Couldn't set unpaired flag for device id "
+ << device_id << " , since it wasn't found.");
return false;
}
@@ -1171,7 +1171,7 @@ bool CacheManager::SetUnpairedDevice(const std::string& device_id,
} else {
is_unpaired_.erase(device_id);
LOGGER_DEBUG(logger_,
- "Unpaired flag was removed for device id " << device_id);
+ "Unpaired flag was removed for device id " << device_id);
}
return result;
}
@@ -1224,7 +1224,7 @@ bool CacheManager::Init(const std::string& file_name,
utils::SharedPtr<policy_table::Table> snapshot = GenerateSnapshot();
result &= snapshot->is_valid();
LOGGER_DEBUG(logger_,
- "Check if snapshot is valid: " << std::boolalpha << result);
+ "Check if snapshot is valid: " << std::boolalpha << result);
if (!result) {
rpc::ValidationReport report("policy_table");
snapshot->ReportErrors(&report);
@@ -1287,7 +1287,7 @@ bool CacheManager::LoadFromFile(const std::string& file_name,
rpc::ValidationReport report("policy_table");
table.ReportErrors(&report);
LOGGER_FATAL(logger_,
- "Parsed table is not valid " << rpc::PrettyFormat(report));
+ "Parsed table is not valid " << rpc::PrettyFormat(report));
return false;
}
return true;
@@ -1333,7 +1333,7 @@ void CacheManager::GetAppRequestTypes(
pt_->policy_table.app_policies_section.apps.find(policy_app_id);
if (pt_->policy_table.app_policies_section.apps.end() == policy_iter) {
LOGGER_DEBUG(logger_,
- "Can't find request types for app_id " << policy_app_id);
+ "Can't find request types for app_id " << policy_app_id);
return;
}
policy_table::RequestTypes::iterator it_request_type =
diff --git a/src/components/policy/src/policy/src/policy_helper.cc b/src/components/policy/src/policy/src/policy_helper.cc
index f87e25b552..cacf8a0083 100644
--- a/src/components/policy/src/policy/src/policy_helper.cc
+++ b/src/components/policy/src/policy/src/policy_helper.cc
@@ -273,7 +273,7 @@ void CheckAppPolicy::SendPermissionsToApp(
const std::string device_id = pm_->GetCurrentDeviceId(app_id);
if (device_id.empty()) {
LOGGER_WARN(logger_,
- "Couldn't find device info for application id: " << app_id);
+ "Couldn't find device info for application id: " << app_id);
return;
}
std::vector<FunctionalGroupPermission> group_permissons;
@@ -324,7 +324,7 @@ bool CheckAppPolicy::operator()(const AppPoliciesValueType& app_policy) {
if (!IsKnownAppication(app_id)) {
LOGGER_WARN(logger_,
- "Application:" << app_id << " is not present in snapshot.");
+ "Application:" << app_id << " is not present in snapshot.");
return true;
}
@@ -347,14 +347,13 @@ bool CheckAppPolicy::operator()(const AppPoliciesValueType& app_policy) {
}
if (RESULT_NO_CHANGES == result) {
LOGGER_INFO(logger_,
- "Permissions for application:" << app_id
- << " wasn't changed.");
+ "Permissions for application:" << app_id << " wasn't changed.");
return true;
}
LOGGER_INFO(logger_,
- "Permissions for application:" << app_id
- << " have been changed.");
+ "Permissions for application:" << app_id
+ << " have been changed.");
if (!IsPredefinedApp(app_policy) && RESULT_CONSENT_NOT_REQIURED != result) {
SetPendingPermissions(app_policy, result);
@@ -793,8 +792,8 @@ bool UnwrapAppPolicies(policy_table::ApplicationPolicies& app_policies) {
it->second.set_to_string(kDefaultId);
} else {
LOGGER_ERROR(logger_,
- "There is no default application policy was "
- "found in PTU.");
+ "There is no default application policy was "
+ "found in PTU.");
return false;
}
}
diff --git a/src/components/policy/src/policy/src/policy_manager_impl.cc b/src/components/policy/src/policy/src/policy_manager_impl.cc
index 20a410ca70..84b3c18c2d 100644
--- a/src/components/policy/src/policy/src/policy_manager_impl.cc
+++ b/src/components/policy/src/policy/src/policy_manager_impl.cc
@@ -124,9 +124,9 @@ void PolicyManagerImpl::CheckTriggers() {
const bool exceed_days = ExceededDays();
LOGGER_DEBUG(logger_,
- "\nDays exceeded: " << std::boolalpha << exceed_ignition_cycles
- << "\nStatusUpdateRequired: "
- << std::boolalpha << exceed_days);
+ "\nDays exceeded: " << std::boolalpha << exceed_ignition_cycles
+ << "\nStatusUpdateRequired: "
+ << std::boolalpha << exceed_days);
if (exceed_ignition_cycles || exceed_days) {
update_status_manager_.ScheduleUpdate();
@@ -287,16 +287,16 @@ void PolicyManagerImpl::StartPTExchange() {
if (update_status_manager_.IsAppsSearchInProgress()) {
update_status_manager_.ScheduleUpdate();
LOGGER_INFO(logger_,
- "Starting exchange skipped, since applications "
- "search is in progress.");
+ "Starting exchange skipped, since applications "
+ "search is in progress.");
return;
}
if (update_status_manager_.IsUpdatePending()) {
update_status_manager_.ScheduleUpdate();
LOGGER_INFO(logger_,
- "Starting exchange skipped, since another exchange "
- "is in progress.");
+ "Starting exchange skipped, since another exchange "
+ "is in progress.");
return;
}
@@ -345,8 +345,8 @@ void PolicyManagerImpl::CheckPermissions(const PTString& app_id,
const RPCParams& rpc_params,
CheckPermissionResult& result) {
LOGGER_INFO(logger_,
- "CheckPermissions for " << app_id << " and rpc " << rpc
- << " for " << hmi_level << " level.");
+ "CheckPermissions for " << app_id << " and rpc " << rpc << " for "
+ << hmi_level << " level.");
cache_->CheckPermissions(app_id, hmi_level, rpc, result);
}
@@ -363,8 +363,8 @@ void PolicyManagerImpl::SendNotificationOnPermissionsUpdated(
const std::string device_id = GetCurrentDeviceId(application_id);
if (device_id.empty()) {
LOGGER_WARN(logger_,
- "Couldn't find device info for application id "
- "'" << application_id << "'");
+ "Couldn't find device info for application id "
+ "'" << application_id << "'");
return;
}
@@ -390,7 +390,7 @@ void PolicyManagerImpl::SendNotificationOnPermissionsUpdated(
notification_data);
LOGGER_INFO(logger_,
- "Send notification for application_id:" << application_id);
+ "Send notification for application_id:" << application_id);
std::string default_hmi;
default_hmi = "NONE";
@@ -571,7 +571,7 @@ void PolicyManagerImpl::GetUserConsentForApp(
FunctionalIdType group_types;
if (!cache_->GetPermissionsForApp(device_id, policy_app_id, group_types)) {
LOGGER_WARN(logger_,
- "Can't get user permissions for app " << policy_app_id);
+ "Can't get user permissions for app " << policy_app_id);
return;
}
@@ -630,7 +630,7 @@ void PolicyManagerImpl::GetPermissionsForApp(
FunctionalIdType group_types;
if (!cache_->GetPermissionsForApp(device_id, app_id_to_check, group_types)) {
LOGGER_WARN(logger_,
- "Can't get user permissions for app " << policy_app_id);
+ "Can't get user permissions for app " << policy_app_id);
return;
}
@@ -801,7 +801,7 @@ void PolicyManagerImpl::OnExceededTimeout() {
void PolicyManagerImpl::OnUpdateStarted() {
int update_timeout = TimeoutExchange();
LOGGER_DEBUG(logger_,
- "Update timeout will be set to (sec): " << update_timeout);
+ "Update timeout will be set to (sec): " << update_timeout);
update_status_manager_.OnUpdateSentOut(update_timeout);
cache_->SaveUpdateRequired(true);
}
@@ -950,14 +950,14 @@ bool PolicyManagerImpl::CheckAppStorageFolder() const {
LOGGER_DEBUG(logger_, "AppStorageFolder " << app_storage_folder);
if (!file_system::DirectoryExists(app_storage_folder)) {
LOGGER_WARN(logger_,
- "Storage directory doesn't exist " << app_storage_folder);
+ "Storage directory doesn't exist " << app_storage_folder);
return false;
}
if (!(file_system::IsWritingAllowed(app_storage_folder) &&
file_system::IsReadingAllowed(app_storage_folder))) {
LOGGER_WARN(logger_,
- "Storage directory doesn't have read/write permissions "
- << app_storage_folder);
+ "Storage directory doesn't have read/write permissions "
+ << app_storage_folder);
return false;
}
return true;
diff --git a/src/components/policy/src/policy/src/sql_pt_ext_representation.cc b/src/components/policy/src/policy/src/sql_pt_ext_representation.cc
index cd1378023f..5de625312e 100644
--- a/src/components/policy/src/policy/src/sql_pt_ext_representation.cc
+++ b/src/components/policy/src/policy/src/sql_pt_ext_representation.cc
@@ -295,7 +295,7 @@ bool SQLPTExtRepresentation::SetUserPermissionsForDevice(
// TODO(AOleynik): Get this info from external data
if (!query.Exec() || !query.Reset()) {
LOGGER_WARN(logger_,
- "Failed update of device allowed consented groups.");
+ "Failed update of device allowed consented groups.");
return false;
}
}
@@ -312,7 +312,7 @@ bool SQLPTExtRepresentation::SetUserPermissionsForDevice(
query.Bind(3, *it_disallowed_groups);
if (!query.Exec() || !query.Reset()) {
LOGGER_WARN(logger_,
- "Failed update of device disallowed consented groups.");
+ "Failed update of device disallowed consented groups.");
return false;
}
}
@@ -323,7 +323,7 @@ bool SQLPTExtRepresentation::SetUserPermissionsForDevice(
// Insert new values
if (!query.Prepare(sql_pt_ext::kInsertDeviceConsentedGroup)) {
LOGGER_WARN(logger_,
- "Incorrect statement of inserting to device consented groups");
+ "Incorrect statement of inserting to device consented groups");
return false;
}
@@ -337,8 +337,7 @@ bool SQLPTExtRepresentation::SetUserPermissionsForDevice(
// TODO(AOleynik): Get this info from external data
query.Bind(3, std::string("GUI"));
if (!query.Exec() || !query.Reset()) {
- LOGGER_WARN(logger_,
- "Failed insert to device allowed consented groups.");
+ LOGGER_WARN(logger_, "Failed insert to device allowed consented groups.");
return false;
}
}
@@ -354,7 +353,7 @@ bool SQLPTExtRepresentation::SetUserPermissionsForDevice(
query.Bind(3);
if (!query.Exec() || !query.Reset()) {
LOGGER_WARN(logger_,
- "Failed insert to device disallowed consented groups.");
+ "Failed insert to device disallowed consented groups.");
return false;
}
}
@@ -373,14 +372,14 @@ bool SQLPTExtRepresentation::ReactOnUserDevConsentForApp(
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt_ext::kHasAppPreloadedGroups)) {
LOGGER_WARN(logger_,
- "Incorrect statement for has app preloaded groups");
+ "Incorrect statement for has app preloaded groups");
return false;
}
query.Bind(0, app_id);
query.Bind(1, kPreDataConsentId);
if (!query.Exec()) {
LOGGER_WARN(logger_,
- "Incorrect select for app has predataconsted groups");
+ "Incorrect select for app has predataconsted groups");
return false;
}
if (query.GetInteger(0) > 0) {
@@ -449,8 +448,8 @@ bool SQLPTExtRepresentation::SetUserPermissionsForApp(
if (!query.Exec() || !query.Reset()) {
LOGGER_WARN(logger_,
- "Incorrect update on user defined permissions "
- "for app groups.");
+ "Incorrect update on user defined permissions "
+ "for app groups.");
return false;
}
continue;
@@ -459,7 +458,7 @@ bool SQLPTExtRepresentation::SetUserPermissionsForApp(
// Insert new consent record
if (!query.Prepare(sql_pt_ext::kInsertConsentGroups)) {
LOGGER_WARN(logger_,
- "Incorrect statement for update app group permissions.");
+ "Incorrect statement for update app group permissions.");
return false;
}
@@ -475,8 +474,8 @@ bool SQLPTExtRepresentation::SetUserPermissionsForApp(
if (!query.Exec() || !query.Reset()) {
LOGGER_WARN(logger_,
- "Incorrect insert to user defined permissions "
- "for app groups.");
+ "Incorrect insert to user defined permissions "
+ "for app groups.");
return false;
}
continue;
@@ -524,8 +523,8 @@ std::vector<UserFriendlyMessage> SQLPTExtRepresentation::GetUserFriendlyMsg(
if (!query.Reset()) {
LOGGER_WARN(logger_,
- "Failed reset statement for selecting friendly "
- "messages.");
+ "Failed reset statement for selecting friendly "
+ "messages.");
return result;
}
}
@@ -768,7 +767,7 @@ bool policy::SQLPTExtRepresentation::SaveDevicePolicy(
dbms::SQLQuery app_query(db());
if (!app_query.Prepare(sql_pt_ext::kInsertApplication)) {
LOGGER_WARN(logger_,
- "Incorrect insert statement into application (device).");
+ "Incorrect insert statement into application (device).");
return false;
}
app_query.Bind(0, kDeviceId);
@@ -904,8 +903,8 @@ bool SQLPTExtRepresentation::GatherAppLevels(
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt_ext::kSelectAppLevels)) {
LOGGER_INFO(logger_,
- "Failed select from app_level. SQLError = "
- << query.LastError().text());
+ "Failed select from app_level. SQLError = "
+ << query.LastError().text());
return false;
}
while (query.Next()) {
@@ -964,7 +963,7 @@ void SQLPTExtRepresentation::GatherConsentGroup(
// Fill data for device
if (!query.Prepare(sql_pt_ext::kSelectDeviceConsentedGroup)) {
LOGGER_WARN(logger_,
- "Incorrect select statement for device consented groups.");
+ "Incorrect select statement for device consented groups.");
return;
}
@@ -991,7 +990,7 @@ void SQLPTExtRepresentation::GatherConsentGroup(
// Fill data for applications
if (!query.Prepare(sql_pt_ext::kSelectConsentGroup)) {
LOGGER_WARN(logger_,
- "Incorrect select statement for app consented groups.");
+ "Incorrect select statement for app consented groups.");
return;
}
@@ -1087,7 +1086,7 @@ bool SQLPTExtRepresentation::SaveConsentGroup(
if (kDeviceId == it->first) {
if (!query.Prepare(sql_pt_ext::kInsertDeviceConsentedGroup)) {
LOGGER_WARN(logger_,
- "Incorrect insert statement for device consent group.");
+ "Incorrect insert statement for device consent group.");
return false;
}
query.Bind(0, device_id);
@@ -1098,15 +1097,14 @@ bool SQLPTExtRepresentation::SaveConsentGroup(
std::string(policy_table::EnumToJsonString(*(it->second.input))));
query.Bind(4, std::string(*(it->second.time_stamp)));
LOGGER_INFO(logger_,
- "Device:"
- << "time stamp "
- << std::string(*(it->second.time_stamp)) << " group "
- << it_groups->first << " consent "
- << it_groups->second);
+ "Device:"
+ << "time stamp "
+ << std::string(*(it->second.time_stamp)) << " group "
+ << it_groups->first << " consent "
+ << it_groups->second);
} else {
if (!query.Prepare(sql_pt_ext::kInsertConsentGroups)) {
- LOGGER_WARN(logger_,
- "Incorrect insert statement for consent group.");
+ LOGGER_WARN(logger_, "Incorrect insert statement for consent group.");
return false;
}
query.Bind(0, device_id);
@@ -1118,11 +1116,11 @@ bool SQLPTExtRepresentation::SaveConsentGroup(
std::string(policy_table::EnumToJsonString(*(it->second.input))));
query.Bind(5, std::string(*(it->second.time_stamp)));
LOGGER_INFO(logger_,
- "Device:"
- << "time stamp "
- << std::string(*(it->second.time_stamp)) << " group "
- << it_groups->first << " consent "
- << it_groups->second);
+ "Device:"
+ << "time stamp "
+ << std::string(*(it->second.time_stamp)) << " group "
+ << it_groups->first << " consent "
+ << it_groups->second);
}
if (!query.Exec() || !query.Reset()) {
@@ -1245,7 +1243,7 @@ bool SQLPTExtRepresentation::GetPreconsentedGroups(
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt_ext::kSelectPreconsentedGroupsId)) {
LOGGER_WARN(logger_,
- "Incorrect statement for select preconsented groups id.");
+ "Incorrect statement for select preconsented groups id.");
return false;
}
@@ -1264,7 +1262,7 @@ bool SQLPTExtRepresentation::GetFunctionalGroupNames(
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt_ext::kSelectFunctionalGroupNames)) {
LOGGER_WARN(logger_,
- "Incorrect statement for select functional groups names.");
+ "Incorrect statement for select functional groups names.");
return false;
}
@@ -1649,7 +1647,7 @@ bool SQLPTExtRepresentation::SetDefaultPolicy(const std::string& app_id) {
bool SQLPTExtRepresentation::SetPredataPolicy(const std::string& app_id) {
LOGGER_INFO(logger_,
- "SQLPTExtRepresentation::SetPredataPolicy for " << app_id);
+ "SQLPTExtRepresentation::SetPredataPolicy for " << app_id);
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kDeleteAppGroupByApplicationId)) {
LOGGER_ERROR(logger_, "Incorrect statement to delete from app_group.");
diff --git a/src/components/policy/src/policy/src/sql_pt_representation.cc b/src/components/policy/src/policy/src/sql_pt_representation.cc
index 32052aaf2b..3738955d79 100644
--- a/src/components/policy/src/policy/src/sql_pt_representation.cc
+++ b/src/components/policy/src/policy/src/sql_pt_representation.cc
@@ -81,8 +81,8 @@ void SQLPTRepresentation::CheckPermissions(const PTString& app_id,
if (!query.Prepare(sql_pt::kSelectRpc)) {
LOGGER_WARN(logger_,
- "Incorrect select statement from rpcs"
- << query.LastError().text());
+ "Incorrect select statement from rpcs"
+ << query.LastError().text());
return;
}
query.Bind(0, app_id);
@@ -92,9 +92,9 @@ void SQLPTRepresentation::CheckPermissions(const PTString& app_id,
bool ret = query.Next();
result.hmi_level_permitted = ret ? kRpcAllowed : kRpcDisallowed;
LOGGER_INFO(logger_,
- "Level is " << (result.hmi_level_permitted == kRpcAllowed
- ? "permitted"
- : "not permitted"));
+ "Level is " << (result.hmi_level_permitted == kRpcAllowed
+ ? "permitted"
+ : "not permitted"));
std::string parameter;
while (ret) {
if (!query.IsNull(0)) {
@@ -149,7 +149,7 @@ bool SQLPTRepresentation::SetCountersPassedForSuccessfulUpdate(
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kUpdateCountersSuccessfulUpdate)) {
LOGGER_WARN(logger_,
- "Wrong update query for counters on successful update.");
+ "Wrong update query for counters on successful update.");
return false;
}
query.Bind(0, kilometers);
@@ -196,7 +196,7 @@ bool SQLPTRepresentation::SecondsBetweenRetries(std::vector<int>* seconds) {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectSecondsBetweenRetries)) {
LOGGER_INFO(logger_,
- "Incorrect select statement from seconds between retries");
+ "Incorrect select statement from seconds between retries");
return false;
}
while (query.Next()) {
@@ -220,7 +220,7 @@ std::vector<UserFriendlyMessage> SQLPTRepresentation::GetUserFriendlyMsg(
EndpointUrls SQLPTRepresentation::GetUpdateUrls(int service_type) {
LOGGER_INFO(logger_,
- "SQLPTRepresentation::GetUpdateUrls for " << service_type);
+ "SQLPTRepresentation::GetUpdateUrls for " << service_type);
utils::dbms::SQLQuery query(db());
EndpointUrls ret;
if (query.Prepare(sql_pt::kSelectEndpoint)) {
@@ -267,8 +267,8 @@ int SQLPTRepresentation::GetNotificationsNumber(const std::string& priority) {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectNotificationsPerPriority)) {
LOGGER_WARN(logger_,
- "Incorrect select statement for priority "
- "notification number.");
+ "Incorrect select statement for priority "
+ "notification number.");
return 0;
}
query.Bind(0, priority);
@@ -330,7 +330,7 @@ InitResult SQLPTRepresentation::Init(const PolicySettings* settings) {
get_settings().open_attempt_timeout_ms();
const useconds_t sleep_interval_mcsec = open_attempt_timeout_ms * 1000;
LOGGER_DEBUG(logger_,
- "Open attempt timeout(ms) is: " << open_attempt_timeout_ms);
+ "Open attempt timeout(ms) is: " << open_attempt_timeout_ms);
for (int i = 0; i < attempts; ++i) {
usleep(sleep_interval_mcsec);
LOGGER_INFO(logger_, "Attempt: " << i + 1);
@@ -345,10 +345,10 @@ InitResult SQLPTRepresentation::Init(const PolicySettings* settings) {
}
if (!is_opened) {
LOGGER_ERROR(logger_,
- "Open retry sequence failed. Tried "
- << attempts << " attempts with "
- << open_attempt_timeout_ms
- << " open timeout(ms) for each.");
+ "Open retry sequence failed. Tried "
+ << attempts << " attempts with "
+ << open_attempt_timeout_ms
+ << " open timeout(ms) for each.");
return InitResult::FAIL;
}
}
@@ -374,8 +374,8 @@ InitResult SQLPTRepresentation::Init(const PolicySettings* settings) {
if (check_first_run.Prepare(sql_pt::kIsFirstRun) &&
check_first_run.Next()) {
LOGGER_INFO(logger_,
- "Selecting is first run "
- << check_first_run.GetBoolean(0));
+ "Selecting is first run "
+ << check_first_run.GetBoolean(0));
if (check_first_run.GetBoolean(0)) {
utils::dbms::SQLQuery set_not_first_run(db());
set_not_first_run.Exec(sql_pt::kSetNotFirstRun);
@@ -387,7 +387,7 @@ InitResult SQLPTRepresentation::Init(const PolicySettings* settings) {
return InitResult::EXISTS;
} else {
LOGGER_ERROR(logger_,
- "Existing policy table representation is invlaid.");
+ "Existing policy table representation is invlaid.");
// TODO(PV): add handle
return InitResult::FAIL;
}
@@ -430,7 +430,7 @@ bool SQLPTRepresentation::Drop() {
utils::dbms::SQLQuery query(db());
if (!query.Exec(sql_pt::kDropSchema)) {
LOGGER_WARN(logger_,
- "Failed dropping database: " << query.LastError().text());
+ "Failed dropping database: " << query.LastError().text());
return false;
}
return true;
@@ -444,7 +444,7 @@ bool SQLPTRepresentation::Clear() {
utils::dbms::SQLQuery query(db());
if (!query.Exec(sql_pt::kDeleteData)) {
LOGGER_ERROR(logger_,
- "Failed clearing database: " << query.LastError().text());
+ "Failed clearing database: " << query.LastError().text());
return false;
}
if (!query.Exec(sql_pt::kInsertInitData)) {
@@ -460,7 +460,7 @@ bool SQLPTRepresentation::RefreshDB() {
utils::dbms::SQLQuery query(db());
if (!query.Exec(sql_pt::kDropSchema)) {
LOGGER_WARN(logger_,
- "Failed dropping database: " << query.LastError().text());
+ "Failed dropping database: " << query.LastError().text());
return false;
}
if (!query.Exec(sql_pt::kCreateSchema)) {
@@ -543,7 +543,7 @@ void SQLPTRepresentation::GatherModuleConfig(
utils::dbms::SQLQuery seconds(db());
if (!seconds.Prepare(sql_pt::kSelectSecondsBetweenRetries)) {
LOGGER_INFO(logger_,
- "Incorrect select statement from seconds between retries");
+ "Incorrect select statement from seconds between retries");
} else {
while (seconds.Next()) {
config->seconds_between_retries.push_back(seconds.GetInteger(0));
@@ -883,7 +883,7 @@ bool SQLPTRepresentation::SaveSpecificAppPolicy(
utils::dbms::SQLQuery app_query(db());
if (!app_query.Prepare(sql_pt::kInsertApplication)) {
LOGGER_WARN(logger_,
- "Incorrect insert statement into application (device).");
+ "Incorrect insert statement into application (device).");
return false;
}
@@ -968,8 +968,8 @@ bool SQLPTRepresentation::SaveAppGroup(
query.Bind(1, *it);
if (!query.Exec() || !query.Reset()) {
LOGGER_WARN(logger_,
- "Incorrect insert into app group."
- << query.LastError().text());
+ "Incorrect insert into app group."
+ << query.LastError().text());
return false;
}
}
@@ -1224,7 +1224,7 @@ bool SQLPTRepresentation::SaveSecondsBetweenRetries(
}
if (!query.Prepare(sql_pt::kInsertSecondsBetweenRetry)) {
LOGGER_WARN(logger_,
- "Incorrect insert statement for seconds between retries.");
+ "Incorrect insert statement for seconds between retries.");
return false;
}
@@ -1245,7 +1245,7 @@ bool SQLPTRepresentation::SaveNumberOfNotificationsPerMinute(
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kInsertNotificationsByPriority)) {
LOGGER_WARN(logger_,
- "Incorrect insert statement for notifications by priority.");
+ "Incorrect insert statement for notifications by priority.");
return false;
}
@@ -1326,8 +1326,7 @@ void SQLPTRepresentation::ResetIgnitionCycles() {
bool SQLPTRepresentation::UpdateRequired() const {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectFlagUpdateRequired) || !query.Exec()) {
- LOGGER_WARN(logger_,
- "Failed select update required flag from module meta");
+ LOGGER_WARN(logger_, "Failed select update required flag from module meta");
return false;
}
return query.GetBoolean(0);
@@ -1339,8 +1338,8 @@ void SQLPTRepresentation::SaveUpdateRequired(bool value) {
if (!query.Prepare(/*sql_pt::kUpdateFlagUpdateRequired*/
"UPDATE `module_meta` SET `flag_update_required` = ?")) {
LOGGER_WARN(logger_,
- "Incorrect update into module meta (update_required): "
- << strerror(errno));
+ "Incorrect update into module meta (update_required): "
+ << strerror(errno));
return;
}
query.Bind(0, value);
@@ -1577,16 +1576,16 @@ bool SQLPTRepresentation::IsDBVersionActual() const {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kSelectDBVersion) || !query.Exec()) {
LOGGER_ERROR(logger_,
- "Failed to get DB version: " << query.LastError().text());
+ "Failed to get DB version: " << query.LastError().text());
return false;
}
const int32_t saved_db_version = query.GetInteger(0);
const int32_t current_db_version = GetDBVersion();
LOGGER_DEBUG(logger_,
- "Saved DB version is: " << saved_db_version
- << ". Current DB vesion is: "
- << current_db_version);
+ "Saved DB version is: " << saved_db_version
+ << ". Current DB vesion is: "
+ << current_db_version);
return current_db_version == saved_db_version;
}
@@ -1596,7 +1595,7 @@ bool SQLPTRepresentation::UpdateDBVersion() const {
utils::dbms::SQLQuery query(db());
if (!query.Prepare(sql_pt::kUpdateDBVersion)) {
LOGGER_ERROR(logger_,
- "Incorrect DB version query: " << query.LastError().text());
+ "Incorrect DB version query: " << query.LastError().text());
return false;
}
@@ -1606,7 +1605,7 @@ bool SQLPTRepresentation::UpdateDBVersion() const {
if (!query.Exec()) {
LOGGER_ERROR(logger_,
- "DB version getting failed: " << query.LastError().text());
+ "DB version getting failed: " << query.LastError().text());
return false;
}
diff --git a/src/components/policy/src/policy/src/update_status_manager.cc b/src/components/policy/src/policy/src/update_status_manager.cc
index 0dd0ae8927..6946953ac4 100644
--- a/src/components/policy/src/policy/src/update_status_manager.cc
+++ b/src/components/policy/src/policy/src/update_status_manager.cc
@@ -199,15 +199,14 @@ void UpdateStatusManager::CheckUpdateStatus() {
void UpdateStatusManager::set_exchange_in_progress(bool value) {
sync_primitives::AutoLock lock(exchange_in_progress_lock_);
LOGGER_INFO(logger_,
- "Exchange in progress value is:" << std::boolalpha << value);
+ "Exchange in progress value is:" << std::boolalpha << value);
exchange_in_progress_ = value;
CheckUpdateStatus();
}
void UpdateStatusManager::set_exchange_pending(bool value) {
sync_primitives::AutoLock lock(exchange_pending_lock_);
- LOGGER_INFO(logger_,
- "Exchange pending value is:" << std::boolalpha << value);
+ LOGGER_INFO(logger_, "Exchange pending value is:" << std::boolalpha << value);
exchange_pending_ = value;
CheckUpdateStatus();
}
diff --git a/src/components/protocol_handler/src/incoming_data_handler.cc b/src/components/protocol_handler/src/incoming_data_handler.cc
index 39bafc3073..801aa78730 100644
--- a/src/components/protocol_handler/src/incoming_data_handler.cc
+++ b/src/components/protocol_handler/src/incoming_data_handler.cc
@@ -65,8 +65,8 @@ ProtocolFramePtrList IncomingDataHandler::ProcessData(
return ProtocolFramePtrList();
}
LOGGER_INFO(logger_,
- "Processing incoming data of size "
- << tm_message_size << " for connection " << connection_id);
+ "Processing incoming data of size "
+ << tm_message_size << " for connection " << connection_id);
ConnectionsDataMap::iterator it = connections_data_.find(connection_id);
if (connections_data_.end() == it) {
LOGGER_WARN(logger_, "ProcessData requested for unknown connection");
@@ -76,18 +76,18 @@ ProtocolFramePtrList IncomingDataHandler::ProcessData(
std::vector<uint8_t>& connection_data = it->second;
connection_data.insert(connection_data.end(), data, data + tm_message_size);
LOGGER_DEBUG(logger_,
- "Total data size for connection " << connection_id << " is "
- << connection_data.size());
+ "Total data size for connection " << connection_id << " is "
+ << connection_data.size());
ProtocolFramePtrList out_frames;
*malformed_occurrence = 0;
*result = CreateFrame(
connection_data, out_frames, *malformed_occurrence, connection_id);
LOGGER_DEBUG(logger_,
- "New data size for connection " << connection_id << " is "
- << connection_data.size());
+ "New data size for connection " << connection_id << " is "
+ << connection_data.size());
if (!out_frames.empty()) {
LOGGER_INFO(logger_,
- "Created and passed " << out_frames.size() << " packets");
+ "Created and passed " << out_frames.size() << " packets");
} else {
if (RESULT_DEFERRED == *result) {
LOGGER_DEBUG(
@@ -129,7 +129,7 @@ uint32_t IncomingDataHandler::GetPacketSize(
return header.dataSize + PROTOCOL_HEADER_V2_SIZE;
default:
LOGGER_WARN(logger_,
- "Unknown version: " << static_cast<int>(header.version));
+ "Unknown version: " << static_cast<int>(header.version));
break;
}
return 0u;
@@ -154,14 +154,14 @@ RESULT_CODE IncomingDataHandler::CreateFrame(
if (!last_portion_of_data_was_malformed_) {
++malformed_occurrence;
LOGGER_DEBUG(logger_,
- "Malformed message found " << malformed_occurrence);
+ "Malformed message found " << malformed_occurrence);
}
last_portion_of_data_was_malformed_ = true;
++data_it;
--data_size;
LOGGER_DEBUG(logger_,
- "Moved to the next byte "
- << std::hex << static_cast<const void*>(&*data_it));
+ "Moved to the next byte "
+ << std::hex << static_cast<const void*>(&*data_it));
continue;
}
LOGGER_DEBUG(logger_, "Payload size " << header_.dataSize);
@@ -171,8 +171,8 @@ RESULT_CODE IncomingDataHandler::CreateFrame(
++data_it;
--data_size;
LOGGER_DEBUG(logger_,
- "Moved to the next byte "
- << std::hex << static_cast<const void*>(&*data_it));
+ "Moved to the next byte "
+ << std::hex << static_cast<const void*>(&*data_it));
continue;
}
if (data_size < packet_size) {
@@ -193,8 +193,8 @@ RESULT_CODE IncomingDataHandler::CreateFrame(
out_frames.push_back(frame);
last_portion_of_data_was_malformed_ = false;
LOGGER_DEBUG(logger_,
- "Frame added. "
- << "Connection ID " << connection_id);
+ "Frame added. "
+ << "Connection ID " << connection_id);
data_it += packet_size;
data_size -= packet_size;
diff --git a/src/components/protocol_handler/src/multiframe_builder.cc b/src/components/protocol_handler/src/multiframe_builder.cc
index fe3c31cca1..36cbb55991 100644
--- a/src/components/protocol_handler/src/multiframe_builder.cc
+++ b/src/components/protocol_handler/src/multiframe_builder.cc
@@ -53,7 +53,7 @@ void MultiFrameBuilder::set_waiting_timeout(
LOGGER_WARN(logger_, "Waiting timout disabled");
} else {
LOGGER_DEBUG(logger_,
- "Waiting time in msec: " << consecutive_frame_wait_msecs_);
+ "Waiting time in msec: " << consecutive_frame_wait_msecs_);
}
}
@@ -81,8 +81,8 @@ bool MultiFrameBuilder::RemoveConnection(const ConnectionID connection_id) {
if (!session_to_frame_map.empty()) {
// FIXME(EZamakhov): Ask ReqManager - do we need to send GenericError
LOGGER_WARN(logger_,
- "For connection_id: " << connection_id
- << " waiting: " << multiframes_map_);
+ "For connection_id: " << connection_id
+ << " waiting: " << multiframes_map_);
}
multiframes_map_.erase(it);
return true;
@@ -186,18 +186,18 @@ RESULT_CODE MultiFrameBuilder::HandleFirstFrame(const ProtocolFramePtr packet) {
MessageIDToFrameMap::iterator messageId_it = messageId_map.find(message_id);
if (messageId_it != messageId_map.end()) {
LOGGER_ERROR(logger_,
- "Already waiting message for connection_id: "
- << connection_id
- << ", session_id: " << static_cast<int>(session_id)
- << ", message_id: " << message_id);
+ "Already waiting message for connection_id: "
+ << connection_id
+ << ", session_id: " << static_cast<int>(session_id)
+ << ", message_id: " << message_id);
return RESULT_FAIL;
}
LOGGER_DEBUG(logger_,
- "Start waiting frames for connection_id: "
- << connection_id
- << ", session_id: " << static_cast<int>(session_id)
- << ", message_id: " << message_id);
+ "Start waiting frames for connection_id: "
+ << connection_id
+ << ", session_id: " << static_cast<int>(session_id)
+ << ", message_id: " << message_id);
messageId_map[message_id] = {packet, date_time::DateTime::getCurrentTime()};
return RESULT_OK;
}
@@ -223,10 +223,10 @@ RESULT_CODE MultiFrameBuilder::HandleConsecutiveFrame(
MessageIDToFrameMap::iterator messageId_it = messageId_map.find(message_id);
if (messageId_it == messageId_map.end()) {
LOGGER_ERROR(logger_,
- "No waiting message for connection_id: "
- << connection_id
- << ", session_id: " << static_cast<int>(session_id)
- << ", message_id: " << message_id);
+ "No waiting message for connection_id: "
+ << connection_id
+ << ", session_id: " << static_cast<int>(session_id)
+ << ", message_id: " << message_id);
return RESULT_FAIL;
}
@@ -250,11 +250,11 @@ RESULT_CODE MultiFrameBuilder::HandleConsecutiveFrame(
// The next frame data is bigger at 1
if (new_frame_data != (previous_frame_data + 1)) {
LOGGER_ERROR(logger_,
- "Unexpected CONSECUTIVE frame for connection_id: "
- << connection_id
- << ", session_id: " << static_cast<int>(session_id)
- << ", message_id: " << message_id
- << ", frame: " << packet);
+ "Unexpected CONSECUTIVE frame for connection_id: "
+ << connection_id
+ << ", session_id: " << static_cast<int>(session_id)
+ << ", message_id: " << message_id
+ << ", frame: " << packet);
return RESULT_FAIL;
}
}
@@ -262,12 +262,12 @@ RESULT_CODE MultiFrameBuilder::HandleConsecutiveFrame(
assembling_frame->set_frame_data(new_frame_data);
LOGGER_DEBUG(logger_,
- "Appending " << packet->data_size() << " bytes "
- << "; frame_data "
- << static_cast<int>(new_frame_data)
- << "; for connection_id: " << connection_id
- << ", session_id: " << static_cast<int>(session_id)
- << ", message_id: " << message_id);
+ "Appending " << packet->data_size() << " bytes "
+ << "; frame_data "
+ << static_cast<int>(new_frame_data)
+ << "; for connection_id: " << connection_id
+ << ", session_id: " << static_cast<int>(session_id)
+ << ", message_id: " << message_id);
if (assembling_frame->appendData(packet->data(), packet->data_size()) !=
RESULT_OK) {
@@ -275,8 +275,8 @@ RESULT_CODE MultiFrameBuilder::HandleConsecutiveFrame(
return RESULT_FAIL;
}
LOGGER_INFO(logger_,
- "Assembled frame with payload size: "
- << assembling_frame->payload_size());
+ "Assembled frame with payload size: "
+ << assembling_frame->payload_size());
frame_data.append_time = date_time::DateTime::getCurrentTime();
return RESULT_OK;
}
diff --git a/src/components/protocol_handler/src/protocol_handler_impl.cc b/src/components/protocol_handler/src/protocol_handler_impl.cc
index c39a820f8c..34c90da340 100644
--- a/src/components/protocol_handler/src/protocol_handler_impl.cc
+++ b/src/components/protocol_handler/src/protocol_handler_impl.cc
@@ -95,9 +95,9 @@ ProtocolHandlerImpl::ProtocolHandlerImpl(
if (message_frequency_time > 0u && message_frequency_count > 0u) {
message_meter_.set_time_range(message_frequency_time);
LOGGER_DEBUG(logger_,
- "Frequency meter is enabled ( "
- << message_frequency_count << " per "
- << message_frequency_time << " mSecond)");
+ "Frequency meter is enabled ( "
+ << message_frequency_count << " per "
+ << message_frequency_time << " mSecond)");
} else {
LOGGER_WARN(logger_, "Frequency meter is disabled");
}
@@ -111,9 +111,9 @@ ProtocolHandlerImpl::ProtocolHandlerImpl(
if (malformed_frequency_time > 0u && malformed_frequency_count > 0u) {
malformed_message_meter_.set_time_range(malformed_frequency_time);
LOGGER_DEBUG(logger_,
- "Malformed frequency meter is enabled ( "
- << malformed_frequency_count << " per "
- << malformed_frequency_time << " mSecond)");
+ "Malformed frequency meter is enabled ( "
+ << malformed_frequency_count << " per "
+ << malformed_frequency_time << " mSecond)");
} else {
LOGGER_WARN(logger_, "Malformed frequency meter is disabled");
}
@@ -131,8 +131,8 @@ ProtocolHandlerImpl::~ProtocolHandlerImpl() {
sync_primitives::AutoLock lock(protocol_observers_lock_);
if (!protocol_observers_.empty()) {
LOGGER_WARN(logger_,
- "Not all observers have unsubscribed"
- " from ProtocolHandlerImpl");
+ "Not all observers have unsubscribed"
+ " from ProtocolHandlerImpl");
}
}
@@ -161,12 +161,12 @@ void set_hash_id(uint32_t hash_id, protocol_handler::ProtocolPacket& packet) {
}
if (packet.protocol_version() < PROTOCOL_VERSION_2) {
LOGGER_DEBUG(logger_,
- "Packet needs no hash data (protocol version less 2)");
+ "Packet needs no hash data (protocol version less 2)");
return;
}
LOGGER_DEBUG(logger_,
- "Set hash_id 0x" << std::hex << hash_id << " to the packet 0x"
- << &packet);
+ "Set hash_id 0x" << std::hex << hash_id << " to the packet 0x"
+ << &packet);
// Hash id shall be 4 bytes according Ford Protocol v8
DCHECK(sizeof(hash_id) == 4);
const uint32_t hash_id_be = LE_TO_BE32(hash_id);
@@ -201,11 +201,11 @@ void ProtocolHandlerImpl::SendStartSessionAck(ConnectionID connection_id,
impl::RawFordMessageToMobile(ptr, false));
LOGGER_DEBUG(logger_,
- "SendStartSessionAck() for connection "
- << connection_id << " for service_type "
- << static_cast<int32_t>(service_type) << " session_id "
- << static_cast<int32_t>(session_id) << " protection "
- << (protection ? "ON" : "OFF"));
+ "SendStartSessionAck() for connection "
+ << connection_id << " for service_type "
+ << static_cast<int32_t>(service_type) << " session_id "
+ << static_cast<int32_t>(session_id) << " protection "
+ << (protection ? "ON" : "OFF"));
}
void ProtocolHandlerImpl::SendStartSessionNAck(ConnectionID connection_id,
@@ -229,10 +229,10 @@ void ProtocolHandlerImpl::SendStartSessionNAck(ConnectionID connection_id,
impl::RawFordMessageToMobile(ptr, false));
LOGGER_DEBUG(logger_,
- "SendStartSessionNAck() for connection "
- << connection_id << " for service_type "
- << static_cast<int32_t>(service_type) << " session_id "
- << static_cast<int32_t>(session_id));
+ "SendStartSessionNAck() for connection "
+ << connection_id << " for service_type "
+ << static_cast<int32_t>(service_type) << " session_id "
+ << static_cast<int32_t>(session_id));
}
void ProtocolHandlerImpl::SendEndSessionNAck(ConnectionID connection_id,
@@ -256,10 +256,10 @@ void ProtocolHandlerImpl::SendEndSessionNAck(ConnectionID connection_id,
impl::RawFordMessageToMobile(ptr, false));
LOGGER_DEBUG(logger_,
- "SendEndSessionNAck() for connection "
- << connection_id << " for service_type "
- << static_cast<int32_t>(service_type) << " session_id "
- << static_cast<int32_t>(session_id));
+ "SendEndSessionNAck() for connection "
+ << connection_id << " for service_type "
+ << static_cast<int32_t>(service_type) << " session_id "
+ << static_cast<int32_t>(session_id));
}
SessionObserver& ProtocolHandlerImpl::get_session_observer() {
@@ -287,10 +287,10 @@ void ProtocolHandlerImpl::SendEndSessionAck(ConnectionID connection_id,
impl::RawFordMessageToMobile(ptr, false));
LOGGER_DEBUG(logger_,
- "SendEndSessionAck() for connection "
- << connection_id << " for service_type "
- << static_cast<int32_t>(service_type) << " session_id "
- << static_cast<int32_t>(session_id));
+ "SendEndSessionAck() for connection "
+ << connection_id << " for service_type "
+ << static_cast<int32_t>(service_type) << " session_id "
+ << static_cast<int32_t>(session_id));
}
void ProtocolHandlerImpl::SendEndServicePrivate(int32_t connection_id,
@@ -315,9 +315,9 @@ void ProtocolHandlerImpl::SendEndServicePrivate(int32_t connection_id,
raw_ford_messages_to_mobile_.PostMessage(
impl::RawFordMessageToMobile(ptr, false));
LOGGER_DEBUG(logger_,
- "SendEndSession() for connection "
- << connection_id << " for service_type " << service_type
- << " session_id " << static_cast<int32_t>(session_id));
+ "SendEndSession() for connection "
+ << connection_id << " for service_type " << service_type
+ << " session_id " << static_cast<int32_t>(session_id));
} else {
LOGGER_WARN(
logger_,
@@ -385,9 +385,8 @@ void ProtocolHandlerImpl::SendHeartBeat(int32_t connection_id,
impl::RawFordMessageToMobile(ptr, false));
LOGGER_DEBUG(logger_, "SendHeartBeat finished successfully");
} else {
- LOGGER_WARN(
- logger_,
- "SendHeartBeat is failed connection or session does not exist");
+ LOGGER_WARN(logger_,
+ "SendHeartBeat is failed connection or session does not exist");
}
}
@@ -399,7 +398,7 @@ void ProtocolHandlerImpl::SendMessageToMobileApp(const RawMessagePtr message,
LOGGER_AUTO_TRACE(logger_);
if (!message) {
LOGGER_ERROR(logger_,
- "Invalid message for sending to mobile app is received.");
+ "Invalid message for sending to mobile app is received.");
return;
}
@@ -435,7 +434,7 @@ void ProtocolHandlerImpl::SendMessageToMobileApp(const RawMessagePtr message,
if (max_block_size > 0) {
frame_size = max_block_size;
LOGGER_DEBUG(logger_,
- "Security set new optimal packet size " << frame_size);
+ "Security set new optimal packet size " << frame_size);
} else {
LOGGER_ERROR(
logger_,
@@ -455,12 +454,12 @@ void ProtocolHandlerImpl::SendMessageToMobileApp(const RawMessagePtr message,
final_message);
if (result != RESULT_OK) {
LOGGER_ERROR(logger_,
- "ProtocolHandler failed to send single frame message.");
+ "ProtocolHandler failed to send single frame message.");
}
} else {
LOGGER_DEBUG(logger_,
- "Message will be sent in multiple frames; max frame size is "
- << frame_size);
+ "Message will be sent in multiple frames; max frame size is "
+ << frame_size);
RESULT_CODE result = SendMultiFrameMessage(connection_handle,
sessionID,
@@ -472,7 +471,7 @@ void ProtocolHandlerImpl::SendMessageToMobileApp(const RawMessagePtr message,
final_message);
if (result != RESULT_OK) {
LOGGER_ERROR(logger_,
- "ProtocolHandler failed to send multiframe messages.");
+ "ProtocolHandler failed to send multiframe messages.");
}
}
#ifdef TELEMETRY_MONITOR
@@ -492,16 +491,16 @@ void ProtocolHandlerImpl::OnTMMessageReceived(const RawMessagePtr tm_message) {
if (!tm_message) {
LOGGER_ERROR(logger_,
- "Invalid incoming message received in"
- << " ProtocolHandler from Transport Manager.");
+ "Invalid incoming message received in"
+ << " ProtocolHandler from Transport Manager.");
return;
}
const uint32_t connection_key = tm_message->connection_key();
LOGGER_DEBUG(logger_,
- "Received data from TM with connection id "
- << connection_key << " msg data_size "
- << tm_message->data_size());
+ "Received data from TM with connection id "
+ << connection_key << " msg data_size "
+ << tm_message->data_size());
RESULT_CODE result;
size_t malformed_occurs = 0u;
@@ -512,8 +511,7 @@ void ProtocolHandlerImpl::OnTMMessageReceived(const RawMessagePtr tm_message) {
if (result != RESULT_OK) {
if (result == RESULT_MALFORMED_OCCURS) {
LOGGER_WARN(logger_,
- "Malformed message occurs, connection id "
- << connection_key);
+ "Malformed message occurs, connection id " << connection_key);
if (!get_settings().malformed_message_filtering()) {
LOGGER_DEBUG(logger_, "Malformed message filterign disabled");
session_observer_.OnMalformedMessageCallback(connection_key);
@@ -631,10 +629,10 @@ void ProtocolHandlerImpl::OnTMMessageSendFailed(
DCHECK_OR_RETURN_VOID(message);
// TODO(PV): implement
LOGGER_ERROR(logger_,
- "Sending message " << message->data_size()
- << "bytes failed, connection_key "
- << message->connection_key()
- << "Error_text: " << error.text());
+ "Sending message " << message->data_size()
+ << "bytes failed, connection_key "
+ << message->connection_key()
+ << "Error_text: " << error.text());
}
void ProtocolHandlerImpl::OnConnectionEstablished(
@@ -667,19 +665,18 @@ RESULT_CODE ProtocolHandlerImpl::SendFrame(const ProtocolFramePtr packet) {
}
#endif // ENABLE_SECURITY
- LOGGER_DEBUG(
- logger_,
- "Packet to be sent: "
- << ConvertPacketDataToString(packet->data(), packet->data_size())
- << " of size: " << packet->data_size());
+ LOGGER_DEBUG(logger_,
+ "Packet to be sent: " << ConvertPacketDataToString(
+ packet->data(), packet->data_size())
+ << " of size: " << packet->data_size());
const RawMessagePtr message_to_send = packet->serializePacket();
if (!message_to_send) {
LOGGER_ERROR(logger_, "Serialization error");
return RESULT_FAIL;
}
LOGGER_DEBUG(logger_,
- "Message to send with connection id "
- << static_cast<int>(packet->connection_id()));
+ "Message to send with connection id "
+ << static_cast<int>(packet->connection_id()));
if (transport_manager::E_SUCCESS !=
transport_manager_.SendMessageToDevice(message_to_send)) {
@@ -728,8 +725,8 @@ RESULT_CODE ProtocolHandlerImpl::SendMultiFrameMessage(
LOGGER_AUTO_TRACE(logger_);
LOGGER_DEBUG(logger_,
- " data size " << data_size << " max_frame_size "
- << max_frame_size);
+ " data size " << data_size << " max_frame_size "
+ << max_frame_size);
// remainder of last frame
const size_t lastframe_remainder = data_size % max_frame_size;
@@ -742,8 +739,8 @@ RESULT_CODE ProtocolHandlerImpl::SendMultiFrameMessage(
(lastframe_remainder > 0 ? 1 : 0);
LOGGER_DEBUG(logger_,
- "Data " << data_size << " bytes in " << frames_count
- << " frames with last frame size " << lastframe_size);
+ "Data " << data_size << " bytes in " << frames_count
+ << " frames with last frame size " << lastframe_size);
DCHECK(max_frame_size >= FIRST_FRAME_DATA_SIZE);
DCHECK(FIRST_FRAME_DATA_SIZE >= 8);
@@ -900,15 +897,15 @@ RESULT_CODE ProtocolHandlerImpl::HandleControlMessage(
case FRAME_DATA_HEART_BEAT_ACK: {
LOGGER_TRACE(logger_, "FrameData Heartbeat ACK");
LOGGER_DEBUG(logger_,
- "Received Heartbeat ACK from mobile,"
- " connection: "
- << packet->connection_id());
+ "Received Heartbeat ACK from mobile,"
+ " connection: "
+ << packet->connection_id());
return RESULT_OK;
}
default:
LOGGER_WARN(logger_,
- "Control message of type "
- << static_cast<int>(packet->frame_data()) << " ignored");
+ "Control message of type "
+ << static_cast<int>(packet->frame_data()) << " ignored");
return RESULT_OK;
}
return RESULT_OK;
@@ -916,8 +913,7 @@ RESULT_CODE ProtocolHandlerImpl::HandleControlMessage(
uint32_t get_hash_id(const ProtocolPacket& packet) {
if (packet.protocol_version() < PROTOCOL_VERSION_2) {
- LOGGER_DEBUG(logger_,
- "Packet without hash data (protocol version less 2)");
+ LOGGER_DEBUG(logger_, "Packet without hash data (protocol version less 2)");
return HASH_ID_NOT_SUPPORTED;
}
if (packet.data_size() < 4) {
@@ -951,8 +947,8 @@ RESULT_CODE ProtocolHandlerImpl::HandleControlMessageEndSession(
message_counters_.erase(current_session_id);
} else {
LOGGER_WARN(logger_,
- "Refused to end session " << static_cast<int>(service_type)
- << " type.");
+ "Refused to end session " << static_cast<int>(service_type)
+ << " type.");
SendEndSessionNAck(connection_id,
current_session_id,
packet.protocol_version(),
@@ -1088,8 +1084,8 @@ RESULT_CODE ProtocolHandlerImpl::HandleControlMessageStartSession(
if (0 == session_id) {
LOGGER_WARN(logger_,
- "Refused by session_observer to create service "
- << static_cast<int32_t>(service_type) << " type.");
+ "Refused by session_observer to create service "
+ << static_cast<int32_t>(service_type) << " type.");
SendStartSessionNAck(connection_id,
packet.session_id(),
protocol_version,
@@ -1148,8 +1144,8 @@ RESULT_CODE ProtocolHandlerImpl::HandleControlMessageStartSession(
}
}
LOGGER_DEBUG(logger_,
- "Protection establishing for connection "
- << connection_key << " is in progress");
+ "Protection establishing for connection "
+ << connection_key << " is in progress");
return RESULT_OK;
}
#endif // ENABLE_SECURITY
@@ -1167,8 +1163,8 @@ RESULT_CODE ProtocolHandlerImpl::HandleControlMessageHeartBeat(
const ProtocolPacket& packet) {
const ConnectionID connection_id = packet.connection_id();
LOGGER_DEBUG(logger_,
- "Sending heart beat acknowledgment for connection "
- << connection_id);
+ "Sending heart beat acknowledgment for connection "
+ << connection_id);
uint8_t protocol_version;
if (session_observer_.ProtocolVersionUsed(
connection_id, packet.session_id(), protocol_version)) {
@@ -1204,8 +1200,8 @@ void ProtocolHandlerImpl::PopValideAndExpirateMultiframes() {
const uint32_t connection_key = session_observer_.KeyFromPair(
frame->connection_id(), frame->session_id());
LOGGER_DEBUG(logger_,
- "Result frame" << frame << "for connection "
- << connection_key);
+ "Result frame" << frame << "for connection "
+ << connection_key);
const RawMessagePtr rawMessage(new RawMessage(connection_key,
frame->protocol_version(),
frame->data(),
@@ -1234,11 +1230,11 @@ bool ProtocolHandlerImpl::TrackMessage(const uint32_t& connection_key) {
const size_t message_frequency =
message_meter_.TrackMessage(connection_key);
LOGGER_DEBUG(logger_,
- "Frequency of " << connection_key << " is "
- << message_frequency);
+ "Frequency of " << connection_key << " is "
+ << message_frequency);
if (message_frequency > frequency_count) {
LOGGER_WARN(logger_,
- "Frequency of " << connection_key << " is marked as high.");
+ "Frequency of " << connection_key << " is marked as high.");
session_observer_.OnApplicationFloodCallBack(connection_key);
message_meter_.RemoveIdentifier(connection_key);
return true;
@@ -1257,13 +1253,13 @@ bool ProtocolHandlerImpl::TrackMalformedMessage(const uint32_t& connection_key,
const size_t malformed_message_frequency =
malformed_message_meter_.TrackMessages(connection_key, count);
LOGGER_DEBUG(logger_,
- "Malformed frequency of " << connection_key << " is "
- << malformed_message_frequency);
+ "Malformed frequency of " << connection_key << " is "
+ << malformed_message_frequency);
if (!get_settings().malformed_message_filtering() ||
malformed_message_frequency > malformed_frequency_count) {
LOGGER_WARN(logger_,
- "Malformed frequency of " << connection_key
- << " is marked as high.");
+ "Malformed frequency of " << connection_key
+ << " is marked as high.");
session_observer_.OnMalformedMessageCallback(connection_key);
malformed_message_meter_.RemoveIdentifier(connection_key);
return true;
@@ -1304,19 +1300,19 @@ void ProtocolHandlerImpl::Handle(const impl::RawFordMessageFromMobile message) {
PopValideAndExpirateMultiframes();
} else {
LOGGER_WARN(logger_,
- "handleMessagesFromMobileApp() - incorrect or NULL data");
+ "handleMessagesFromMobileApp() - incorrect or NULL data");
}
}
void ProtocolHandlerImpl::Handle(const impl::RawFordMessageToMobile message) {
LOGGER_DEBUG(logger_,
- "Message to mobile app: connection id "
- << static_cast<int>(message->connection_id())
- << ";"
- " dataSize: " << message->data_size()
- << " ;"
- " protocolVersion "
- << static_cast<int>(message->protocol_version()));
+ "Message to mobile app: connection id "
+ << static_cast<int>(message->connection_id())
+ << ";"
+ " dataSize: " << message->data_size()
+ << " ;"
+ " protocolVersion "
+ << static_cast<int>(message->protocol_version()));
if (message.is_final) {
sessions_last_message_id_.insert(std::pair<uint8_t, uint32_t>(
@@ -1377,8 +1373,8 @@ RESULT_CODE ProtocolHandlerImpl::EncryptFrame(ProtocolFramePtr packet) {
return RESULT_OK;
}
LOGGER_DEBUG(logger_,
- "Encrypted " << packet->data_size() << " bytes to "
- << out_data_size << " bytes");
+ "Encrypted " << packet->data_size() << " bytes to "
+ << out_data_size << " bytes");
DCHECK(out_data);
DCHECK(out_data_size);
packet->set_protection_flag(true);
@@ -1405,7 +1401,7 @@ RESULT_CODE ProtocolHandlerImpl::DecryptFrame(ProtocolFramePtr packet) {
if (!context || !context->IsInitCompleted()) {
const std::string error_text("Fail decryption for unprotected service ");
LOGGER_ERROR(logger_,
- error_text << static_cast<int>(packet->service_type()));
+ error_text << static_cast<int>(packet->service_type()));
security_manager_->SendInternalError(
connection_key,
security_manager::SecurityManager::ERROR_SERVICE_NOT_PROTECTED,
@@ -1430,8 +1426,8 @@ RESULT_CODE ProtocolHandlerImpl::DecryptFrame(ProtocolFramePtr packet) {
return RESULT_ENCRYPTION_FAILED;
}
LOGGER_DEBUG(logger_,
- "Decrypted " << packet->data_size() << " bytes to "
- << out_data_size << " bytes");
+ "Decrypted " << packet->data_size() << " bytes to "
+ << out_data_size << " bytes");
DCHECK(out_data);
DCHECK(out_data_size);
packet->set_data(out_data, out_data_size);
@@ -1441,8 +1437,8 @@ RESULT_CODE ProtocolHandlerImpl::DecryptFrame(ProtocolFramePtr packet) {
void ProtocolHandlerImpl::SendFramesNumber(uint32_t connection_key,
int32_t number_of_frames) {
- LOGGER_DEBUG(
- logger_, "SendFramesNumber MobileNaviAck for session " << connection_key);
+ LOGGER_DEBUG(logger_,
+ "SendFramesNumber MobileNaviAck for session " << connection_key);
// TODO(EZamakhov): add protocol version check - to avoid send for
// PROTOCOL_VERSION_1
diff --git a/src/components/protocol_handler/src/protocol_packet.cc b/src/components/protocol_handler/src/protocol_packet.cc
index 34ae45b32c..67c1693d67 100644
--- a/src/components/protocol_handler/src/protocol_packet.cc
+++ b/src/components/protocol_handler/src/protocol_packet.cc
@@ -95,7 +95,7 @@ void ProtocolPacket::ProtocolHeader::deserialize(const uint8_t* message,
DCHECK_OR_RETURN_VOID(message);
if (messageSize < PROTOCOL_HEADER_V1_SIZE) {
LOGGER_DEBUG(logger_,
- "Message size less " << PROTOCOL_HEADER_V1_SIZE << " bytes");
+ "Message size less " << PROTOCOL_HEADER_V1_SIZE << " bytes");
return;
}
// first 4 bits
@@ -117,8 +117,8 @@ void ProtocolPacket::ProtocolHeader::deserialize(const uint8_t* message,
case PROTOCOL_VERSION_4: {
if (messageSize < PROTOCOL_HEADER_V2_SIZE) {
LOGGER_DEBUG(logger_,
- "Message size less " << PROTOCOL_HEADER_V2_SIZE
- << " bytes");
+ "Message size less " << PROTOCOL_HEADER_V2_SIZE
+ << " bytes");
return;
}
messageId = read_be_uint32(message + 8);
@@ -162,15 +162,15 @@ RESULT_CODE ProtocolPacket::ProtocolHeaderValidator::validate(
break;
default:
LOGGER_WARN(logger_,
- "Unknown version:" << static_cast<int>(header.version));
+ "Unknown version:" << static_cast<int>(header.version));
return RESULT_FAIL;
}
// ServiceType shall be equal 0x0 (Control), 0x07 (RPC), 0x0A (PCM), 0x0B
// (Video), 0x0F (Bulk)
if (ServiceTypeFromByte(header.serviceType) == kInvalidServiceType) {
LOGGER_WARN(logger_,
- "Invalide service type"
- << static_cast<int>(header.serviceType));
+ "Invalide service type"
+ << static_cast<int>(header.serviceType));
return RESULT_FAIL;
}
// Check frame info for each frame type
@@ -194,8 +194,8 @@ RESULT_CODE ProtocolPacket::ProtocolHeaderValidator::validate(
break;
default:
LOGGER_WARN(logger_,
- "FRAME_TYPE_CONTROL - Invalide frame data "
- << static_cast<int>(header.frameData));
+ "FRAME_TYPE_CONTROL - Invalide frame data "
+ << static_cast<int>(header.frameData));
return RESULT_FAIL;
}
break;
@@ -203,16 +203,16 @@ RESULT_CODE ProtocolPacket::ProtocolHeaderValidator::validate(
case FRAME_TYPE_SINGLE:
if (header.frameData != FRAME_DATA_SINGLE) {
LOGGER_WARN(logger_,
- "FRAME_TYPE_SINGLE - Invalide frame data "
- << static_cast<int>(header.frameData));
+ "FRAME_TYPE_SINGLE - Invalide frame data "
+ << static_cast<int>(header.frameData));
return RESULT_FAIL;
}
break;
case FRAME_TYPE_FIRST:
if (header.frameData != FRAME_DATA_FIRST) {
LOGGER_WARN(logger_,
- "FRAME_TYPE_FIRST - Invalide frame data "
- << static_cast<int>(header.frameData));
+ "FRAME_TYPE_FIRST - Invalide frame data "
+ << static_cast<int>(header.frameData));
return RESULT_FAIL;
}
break;
@@ -221,7 +221,7 @@ RESULT_CODE ProtocolPacket::ProtocolHeaderValidator::validate(
break;
default:
LOGGER_WARN(logger_,
- "Unknown frame type " << static_cast<int>(header.frameType));
+ "Unknown frame type " << static_cast<int>(header.frameType));
// All other Frame type is invalid
return RESULT_FAIL;
}
@@ -230,10 +230,10 @@ RESULT_CODE ProtocolPacket::ProtocolHeaderValidator::validate(
// and shall be less than payload size
if (header.dataSize > payload_size) {
LOGGER_WARN(logger_,
- "Packet data size is "
- << header.dataSize
- << " and bigger than allowed payload size " << payload_size
- << " bytes");
+ "Packet data size is "
+ << header.dataSize
+ << " and bigger than allowed payload size " << payload_size
+ << " bytes");
return RESULT_FAIL;
}
switch (header.frameType) {
@@ -241,8 +241,8 @@ RESULT_CODE ProtocolPacket::ProtocolHeaderValidator::validate(
case FRAME_TYPE_CONSECUTIVE:
if (header.dataSize <= 0u) {
LOGGER_WARN(logger_,
- "Data size of Single and Consecutive frame shall be not "
- "equal 0 byte ");
+ "Data size of Single and Consecutive frame shall be not "
+ "equal 0 byte ");
return RESULT_FAIL;
}
break;
diff --git a/src/components/resumption/src/last_state.cc b/src/components/resumption/src/last_state.cc
index 21f50524a2..43b7bf4c67 100644
--- a/src/components/resumption/src/last_state.cc
+++ b/src/components/resumption/src/last_state.cc
@@ -58,7 +58,7 @@ void LastState::SaveToFileSystem() {
DCHECK(file_system::CreateDirectoryRecursively(app_storage_folder_));
LOGGER_INFO(logger_,
- "LastState::SaveToFileSystem " << app_info_storage_ << str);
+ "LastState::SaveToFileSystem " << app_info_storage_ << str);
DCHECK(file_system::Write(app_info_storage_, char_vector_pdata));
}
@@ -68,7 +68,7 @@ void LastState::LoadFromFileSystem() {
Json::Reader m_reader;
if (result && m_reader.parse(buffer, dictionary)) {
LOGGER_INFO(logger_,
- "Valid last state was found." << dictionary.toStyledString());
+ "Valid last state was found." << dictionary.toStyledString());
return;
}
LOGGER_WARN(logger_, "No valid last state was found.");
diff --git a/src/components/security_manager/src/crypto_manager_impl.cc b/src/components/security_manager/src/crypto_manager_impl.cc
index 27354ecd9b..86dbc51d59 100644
--- a/src/components/security_manager/src/crypto_manager_impl.cc
+++ b/src/components/security_manager/src/crypto_manager_impl.cc
@@ -63,9 +63,9 @@ int debug_callback(int preverify_ok, X509_STORE_CTX* ctx) {
const int error = X509_STORE_CTX_get_error(ctx);
UNUSED(error);
LOGGER_WARN(logger_,
- "Certificate verification failed with error "
- << error << " \"" << X509_verify_cert_error_string(error)
- << '"');
+ "Certificate verification failed with error "
+ << error << " \"" << X509_verify_cert_error_string(error)
+ << '"');
}
return preverify_ok;
}
@@ -121,11 +121,11 @@ bool CryptoManagerImpl::Init() {
LOGGER_DEBUG(logger_, "Client mode");
}
LOGGER_DEBUG(logger_,
- "Peer verification "
- << (get_settings().verify_peer() ? "enabled" : "disabled"));
+ "Peer verification "
+ << (get_settings().verify_peer() ? "enabled" : "disabled"));
LOGGER_DEBUG(logger_,
- "CA certificate file is \"" << get_settings().ca_cert_path()
- << '"');
+ "CA certificate file is \"" << get_settings().ca_cert_path()
+ << '"');
#if OPENSSL_VERSION_NUMBER < CONST_SSL_METHOD_MINIMAL_VERSION
SSL_METHOD* method;
@@ -161,8 +161,8 @@ bool CryptoManagerImpl::Init() {
break;
default:
LOGGER_ERROR(logger_,
- "Unknown protocol: "
- << get_settings().security_manager_protocol_name());
+ "Unknown protocol: "
+ << get_settings().security_manager_protocol_name());
return false;
}
if (context_) {
@@ -202,10 +202,9 @@ bool CryptoManagerImpl::Init() {
const unsigned long error = ERR_get_error();
UNUSED(error);
LOGGER_WARN(logger_,
- "Wrong certificate file '"
- << get_settings().ca_cert_path() << "', err 0x" << std::hex
- << error << " \"" << ERR_reason_error_string(error)
- << '"');
+ "Wrong certificate file '"
+ << get_settings().ca_cert_path() << "', err 0x" << std::hex
+ << error << " \"" << ERR_reason_error_string(error) << '"');
}
guard.Dismiss();
@@ -215,7 +214,7 @@ bool CryptoManagerImpl::Init() {
? SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT
: SSL_VERIFY_NONE;
LOGGER_DEBUG(logger_,
- "Setting up peer verification in mode: " << verify_mode);
+ "Setting up peer verification in mode: " << verify_mode);
SSL_CTX_set_verify(context_, verify_mode, &debug_callback);
return true;
}
diff --git a/src/components/security_manager/src/security_manager_impl.cc b/src/components/security_manager/src/security_manager_impl.cc
index be0a55f7fc..d01555fdbc 100644
--- a/src/components/security_manager/src/security_manager_impl.cc
+++ b/src/components/security_manager/src/security_manager_impl.cc
@@ -167,8 +167,7 @@ security_manager::SSLContext* SecurityManagerImpl::CreateSSLContext(
}
DCHECK(session_observer_->GetSSLContext(connection_key,
protocol_handler::kControl));
- LOGGER_DEBUG(logger_,
- "Set SSL context to connection_key " << connection_key);
+ LOGGER_DEBUG(logger_, "Set SSL context to connection_key " << connection_key);
return ssl_context;
}
@@ -221,8 +220,7 @@ void SecurityManagerImpl::StartHandshake(uint32_t connection_key) {
}
void SecurityManagerImpl::AddListener(SecurityManagerListener* const listener) {
if (!listener) {
- LOGGER_ERROR(logger_,
- "Invalid (NULL) pointer to SecurityManagerListener.");
+ LOGGER_ERROR(logger_, "Invalid (NULL) pointer to SecurityManagerListener.");
return;
}
listeners_.push_back(listener);
@@ -230,8 +228,7 @@ void SecurityManagerImpl::AddListener(SecurityManagerListener* const listener) {
void SecurityManagerImpl::RemoveListener(
SecurityManagerListener* const listener) {
if (!listener) {
- LOGGER_ERROR(logger_,
- "Invalid (NULL) pointer to SecurityManagerListener.");
+ LOGGER_ERROR(logger_, "Invalid (NULL) pointer to SecurityManagerListener.");
return;
}
listeners_.remove(listener);
@@ -269,8 +266,8 @@ bool SecurityManagerImpl::ProccessHandshakeData(
const uint32_t connection_key = inMessage->get_connection_key();
LOGGER_DEBUG(logger_,
- "Received " << inMessage->get_data_size()
- << " bytes handshake data ");
+ "Received " << inMessage->get_data_size()
+ << " bytes handshake data ");
if (!inMessage->get_data_size()) {
const std::string error_text("SendHandshakeData: null arguments size.");
@@ -302,7 +299,7 @@ bool SecurityManagerImpl::ProccessHandshakeData(
// Do not return handshake data on AbnormalFail or null returned values
const std::string erorr_text(sslContext->LastError());
LOGGER_ERROR(logger_,
- "SendHandshakeData: Handshake failed: " << erorr_text);
+ "SendHandshakeData: Handshake failed: " << erorr_text);
SendInternalError(
connection_key, ERROR_SSL_INVALID_DATA, erorr_text, seqNumber);
NotifyListenersOnHandshakeDone(connection_key,
@@ -331,8 +328,8 @@ bool SecurityManagerImpl::ProccessHandshakeData(
bool SecurityManagerImpl::ProccessInternalError(
const SecurityMessage& inMessage) {
LOGGER_INFO(logger_,
- "Received InternalError with Json message"
- << inMessage->get_json_message());
+ "Received InternalError with Json message"
+ << inMessage->get_json_message());
Json::Value root;
Json::Reader reader;
const bool parsingSuccessful =
@@ -340,9 +337,9 @@ bool SecurityManagerImpl::ProccessInternalError(
if (!parsingSuccessful)
return false;
LOGGER_DEBUG(logger_,
- "Received InternalError id "
- << root[kErrId].asString()
- << ", text: " << root[kErrText].asString());
+ "Received InternalError id "
+ << root[kErrId].asString()
+ << ", text: " << root[kErrText].asString());
return true;
}
void SecurityManagerImpl::SendHandshakeBinData(const uint32_t connection_key,
@@ -383,8 +380,8 @@ void SecurityManagerImpl::SendInternalError(const uint32_t connection_key,
header, connection_key, &data_sending[0], data_sending.size());
SendQuery(query, connection_key);
LOGGER_DEBUG(logger_,
- "Sent Internal error id " << static_cast<int>(error_id)
- << " : \"" << erorr_text << "\".");
+ "Sent Internal error id " << static_cast<int>(error_id)
+ << " : \"" << erorr_text << "\".");
}
void SecurityManagerImpl::SendQuery(const SecurityQuery& query,
diff --git a/src/components/security_manager/src/ssl_context_impl.cc b/src/components/security_manager/src/ssl_context_impl.cc
index 9f7a947ee0..40782bd687 100644
--- a/src/components/security_manager/src/ssl_context_impl.cc
+++ b/src/components/security_manager/src/ssl_context_impl.cc
@@ -191,17 +191,17 @@ CryptoManagerImpl::SSLContextImpl::CheckCertContext() {
if (!(hsh_context_.expected_cn.CompareIgnoreCase(cn.c_str()))) {
LOGGER_ERROR(logger_,
- "Trying to run handshake with wrong app name: "
- << cn << ". Expected app name: "
- << hsh_context_.expected_cn.AsMBString());
+ "Trying to run handshake with wrong app name: "
+ << cn << ". Expected app name: "
+ << hsh_context_.expected_cn.AsMBString());
return Handshake_Result_AppNameMismatch;
}
if (!(hsh_context_.expected_sn.CompareIgnoreCase(sn.c_str()))) {
LOGGER_ERROR(logger_,
- "Trying to run handshake with wrong app id: "
- << sn << ". Expected app id: "
- << hsh_context_.expected_sn.AsMBString());
+ "Trying to run handshake with wrong app id: "
+ << sn << ". Expected app id: "
+ << hsh_context_.expected_sn.AsMBString());
return Handshake_Result_AppIDMismatch;
}
return Handshake_Result_Success;
@@ -276,9 +276,9 @@ CryptoManagerImpl::SSLContextImpl::PerformHandshake() {
const long error = SSL_get_verify_result(connection_);
SetHandshakeError(error);
LOGGER_WARN(logger_,
- "Handshake failed with error "
- << " -> " << SSL_get_error(connection_, error) << " \""
- << LastError() << '"');
+ "Handshake failed with error "
+ << " -> " << SSL_get_error(connection_, error) << " \""
+ << LastError() << '"');
ResetConnection();
is_handshake_pending_ = false;
@@ -489,7 +489,7 @@ std::string CryptoManagerImpl::SSLContextImpl::GetTextBy(X509_NAME* name,
if (-1 == req_len) {
LOGGER_WARN(logger_,
- "Unable to obtain object: " << object << " from certificate");
+ "Unable to obtain object: " << object << " from certificate");
return std::string();
}
diff --git a/src/components/telemetry_monitor/src/telemetry_monitor.cc b/src/components/telemetry_monitor/src/telemetry_monitor.cc
index cb5d1ce094..00bc4beb9b 100644
--- a/src/components/telemetry_monitor/src/telemetry_monitor.cc
+++ b/src/components/telemetry_monitor/src/telemetry_monitor.cc
@@ -202,8 +202,8 @@ void Streamer::Start() {
reinterpret_cast<struct sockaddr*>(&serv_addr_),
sizeof(serv_addr_))) {
LOGGER_ERROR(logger_,
- "Unable to bind server " << kserver_->ip().c_str() << ':'
- << kserver_->port());
+ "Unable to bind server " << kserver_->ip().c_str() << ':'
+ << kserver_->port());
return;
}
if (-1 == listen(server_socket_fd_, 1)) {
diff --git a/src/components/transport_manager/src/bluetooth/bluetooth_connection_factory.cc b/src/components/transport_manager/src/bluetooth/bluetooth_connection_factory.cc
index eecb51625a..62c879c7a0 100644
--- a/src/components/transport_manager/src/bluetooth/bluetooth_connection_factory.cc
+++ b/src/components/transport_manager/src/bluetooth/bluetooth_connection_factory.cc
@@ -55,8 +55,8 @@ TransportAdapter::Error BluetoothConnectionFactory::Init() {
TransportAdapter::Error BluetoothConnectionFactory::CreateConnection(
const DeviceUID& device_uid, const ApplicationHandle& app_handle) {
LOGGER_TRACE(logger_,
- "enter. device_uid: " << &device_uid
- << ", app_handle: " << &app_handle);
+ "enter. device_uid: " << &device_uid
+ << ", app_handle: " << &app_handle);
BluetoothSocketConnection* connection(
new BluetoothSocketConnection(device_uid, app_handle, controller_));
TransportAdapter::Error error = connection->Start();
diff --git a/src/components/transport_manager/src/bluetooth/bluetooth_device.cc b/src/components/transport_manager/src/bluetooth/bluetooth_device.cc
index 1bb6f0c74b..a9dcc7cc0a 100644
--- a/src/components/transport_manager/src/bluetooth/bluetooth_device.cc
+++ b/src/components/transport_manager/src/bluetooth/bluetooth_device.cc
@@ -55,12 +55,12 @@ CREATE_LOGGERPTR_GLOBAL(logger_, "TransportManager")
bool BluetoothDevice::GetRfcommChannel(const ApplicationHandle app_handle,
uint8_t* channel_out) {
LOGGER_TRACE(logger_,
- "enter. app_handle: " << app_handle
- << ", channel_out: " << channel_out);
+ "enter. app_handle: " << app_handle
+ << ", channel_out: " << channel_out);
if (app_handle < 0 || app_handle > std::numeric_limits<uint8_t>::max()) {
LOGGER_TRACE(logger_,
- "exit with FALSE. Condition: app_handle < 0 || app_handle > "
- "numeric_limits::max()");
+ "exit with FALSE. Condition: app_handle < 0 || app_handle > "
+ "numeric_limits::max()");
return false;
}
const uint8_t channel = static_cast<uint8_t>(app_handle);
diff --git a/src/components/transport_manager/src/bluetooth/bluetooth_device_scanner.cc b/src/components/transport_manager/src/bluetooth/bluetooth_device_scanner.cc
index 97f0edbd14..bb8ad47015 100644
--- a/src/components/transport_manager/src/bluetooth/bluetooth_device_scanner.cc
+++ b/src/components/transport_manager/src/bluetooth/bluetooth_device_scanner.cc
@@ -185,8 +185,8 @@ void BluetoothDeviceScanner::DoInquiry() {
}
LOGGER_INFO(logger_,
- "Check rfcomm channel on " << paired_devices_.size()
- << " paired devices.");
+ "Check rfcomm channel on " << paired_devices_.size()
+ << " paired devices.");
paired_devices_with_sdl_.clear();
CheckSDLServiceOnDevices(
@@ -207,7 +207,7 @@ void BluetoothDeviceScanner::DoInquiry() {
if (number_of_devices >= 0) {
LOGGER_INFO(logger_,
- "hci_inquiry: found " << number_of_devices << " devices");
+ "hci_inquiry: found " << number_of_devices << " devices");
std::vector<bdaddr_t> found_devices(number_of_devices);
for (int i = 0; i < number_of_devices; ++i) {
found_devices[i] = inquiry_info_list[i].bdaddr;
@@ -233,9 +233,9 @@ void BluetoothDeviceScanner::CheckSDLServiceOnDevices(
int device_handle,
DeviceVector* discovered_devices) {
LOGGER_TRACE(logger_,
- "enter. bd_addresses: "
- << &bd_addresses << ", device_handle: " << device_handle
- << ", discovered_devices: " << discovered_devices);
+ "enter. bd_addresses: "
+ << &bd_addresses << ", device_handle: " << device_handle
+ << ", discovered_devices: " << discovered_devices);
std::vector<RfcommChannelVector> sdl_rfcomm_channels =
DiscoverSmartDeviceLinkRFCOMMChannels(bd_addresses);
@@ -309,8 +309,8 @@ BluetoothDeviceScanner::DiscoverSmartDeviceLinkRFCOMMChannels(
bool BluetoothDeviceScanner::DiscoverSmartDeviceLinkRFCOMMChannels(
const bdaddr_t& device_address, RfcommChannelVector* channels) {
LOGGER_TRACE(logger_,
- "enter. device_address: " << &device_address
- << ", channels: " << channels);
+ "enter. device_address: " << &device_address
+ << ", channels: " << channels);
static bdaddr_t any_address = {{0, 0, 0, 0, 0, 0}};
sdp_session_t* sdp_session = sdp_connect(
@@ -397,8 +397,8 @@ bool BluetoothDeviceScanner::DiscoverSmartDeviceLinkRFCOMMChannels(
<< " at channel(s): " << rfcomm_channels_string.str().c_str());
} else {
LOGGER_INFO(logger_,
- "SmartDeviceLink service was not discovered on device "
- << BluetoothDevice::GetUniqueDeviceId(device_address));
+ "SmartDeviceLink service was not discovered on device "
+ << BluetoothDevice::GetUniqueDeviceId(device_address));
}
LOGGER_TRACE(logger_, "exit with TRUE");
return true;
@@ -472,7 +472,7 @@ void BluetoothDeviceScanner::Terminate() {
device_scan_requested_cv_.NotifyOne();
}
LOGGER_INFO(logger_,
- "Waiting for bluetooth device scanner thread termination");
+ "Waiting for bluetooth device scanner thread termination");
thread_->stop();
LOGGER_INFO(logger_, "Bluetooth device scanner thread stopped");
}
diff --git a/src/components/transport_manager/src/bluetooth/bluetooth_socket_connection.cc b/src/components/transport_manager/src/bluetooth/bluetooth_socket_connection.cc
index 5d18363f8a..8e9c8fe134 100644
--- a/src/components/transport_manager/src/bluetooth/bluetooth_socket_connection.cc
+++ b/src/components/transport_manager/src/bluetooth/bluetooth_socket_connection.cc
@@ -70,7 +70,7 @@ bool BluetoothSocketConnection::Establish(ConnectError** error) {
if (!bluetooth_device->GetRfcommChannel(application_handle(),
&rfcomm_channel)) {
LOGGER_DEBUG(logger_,
- "Application " << application_handle() << " not found");
+ "Application " << application_handle() << " not found");
*error = new ConnectError();
LOGGER_TRACE(logger_, "exit with FALSE");
return false;
@@ -92,8 +92,8 @@ bool BluetoothSocketConnection::Establish(ConnectError** error) {
rfcomm_socket = socket(AF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM);
if (-1 == rfcomm_socket) {
LOGGER_ERROR_WITH_ERRNO(logger_,
- "Failed to create RFCOMM socket for device "
- << device_handle());
+ "Failed to create RFCOMM socket for device "
+ << device_handle());
*error = new ConnectError();
LOGGER_TRACE(logger_, "exit with FALSE");
return false;
diff --git a/src/components/transport_manager/src/tcp/tcp_connection_factory.cc b/src/components/transport_manager/src/tcp/tcp_connection_factory.cc
index 46aca5f22b..6b4afcbd5b 100644
--- a/src/components/transport_manager/src/tcp/tcp_connection_factory.cc
+++ b/src/components/transport_manager/src/tcp/tcp_connection_factory.cc
@@ -52,8 +52,8 @@ TransportAdapter::Error TcpConnectionFactory::CreateConnection(
const DeviceUID& device_uid, const ApplicationHandle& app_handle) {
LOGGER_AUTO_TRACE(logger_);
LOGGER_DEBUG(logger_,
- "DeviceUID: " << &device_uid
- << ", ApplicationHandle: " << &app_handle);
+ "DeviceUID: " << &device_uid
+ << ", ApplicationHandle: " << &app_handle);
TcpServerOiginatedSocketConnection* connection(
new TcpServerOiginatedSocketConnection(
device_uid, app_handle, controller_));
diff --git a/src/components/transport_manager/src/tcp/tcp_socket_connection.cc b/src/components/transport_manager/src/tcp/tcp_socket_connection.cc
index de9cfc3e46..258cef4692 100644
--- a/src/components/transport_manager/src/tcp/tcp_socket_connection.cc
+++ b/src/components/transport_manager/src/tcp/tcp_socket_connection.cc
@@ -82,8 +82,8 @@ bool TcpServerOiginatedSocketConnection::Establish(ConnectError** error) {
const int port = tcp_device->GetApplicationPort(application_handle());
if (-1 == port) {
LOGGER_ERROR(logger_,
- "Application port for " << application_handle()
- << " not found");
+ "Application port for " << application_handle()
+ << " not found");
*error = new ConnectError();
return false;
}
@@ -101,11 +101,11 @@ bool TcpServerOiginatedSocketConnection::Establish(ConnectError** error) {
addr.sin_port = htons(port);
LOGGER_DEBUG(logger_,
- "Connecting " << inet_ntoa(addr.sin_addr) << ":" << port);
+ "Connecting " << inet_ntoa(addr.sin_addr) << ":" << port);
if (::connect(socket, (struct sockaddr*)&addr, sizeof(addr)) < 0) {
LOGGER_ERROR(logger_,
- "Failed to connect for application " << application_handle()
- << ", error " << errno);
+ "Failed to connect for application " << application_handle()
+ << ", error " << errno);
*error = new ConnectError();
::close(socket);
return false;
diff --git a/src/components/transport_manager/src/transport_adapter/threaded_socket_connection.cc b/src/components/transport_manager/src/transport_adapter/threaded_socket_connection.cc
index 3e3b7a842c..d749c38735 100644
--- a/src/components/transport_manager/src/transport_adapter/threaded_socket_connection.cc
+++ b/src/components/transport_manager/src/transport_adapter/threaded_socket_connection.cc
@@ -212,13 +212,13 @@ void ThreadedSocketConnection::Transmit() {
return;
}
LOGGER_DEBUG(logger_,
- "poll is ok " << this << " revents0: " << std::hex
- << poll_fds[0].revents << " revents1:" << std::hex
- << poll_fds[1].revents);
+ "poll is ok " << this << " revents0: " << std::hex
+ << poll_fds[0].revents << " revents1:" << std::hex
+ << poll_fds[1].revents);
// error check
if (0 != (poll_fds[1].revents & (POLLERR | POLLHUP | POLLNVAL))) {
LOGGER_ERROR(logger_,
- "Notification pipe for connection " << this << " terminated");
+ "Notification pipe for connection " << this << " terminated");
Abort();
return;
}
@@ -278,8 +278,8 @@ bool ThreadedSocketConnection::Receive() {
if (bytes_read > 0) {
LOGGER_DEBUG(logger_,
- "Received " << bytes_read << " bytes for connection "
- << this);
+ "Received " << bytes_read << " bytes for connection "
+ << this);
::protocol_handler::RawMessagePtr frame(
new protocol_handler::RawMessage(0, 0, buffer, bytes_read));
controller_->DataReceiveDone(
@@ -287,7 +287,7 @@ bool ThreadedSocketConnection::Receive() {
} else if (bytes_read < 0) {
if (EAGAIN != errno && EWOULDBLOCK != errno) {
LOGGER_ERROR_WITH_ERRNO(logger_,
- "recv() failed for connection " << this);
+ "recv() failed for connection " << this);
return false;
}
} else {
diff --git a/src/components/transport_manager/src/transport_adapter/transport_adapter_impl.cc b/src/components/transport_manager/src/transport_adapter/transport_adapter_impl.cc
index c12587c96b..9e35acf4e9 100644
--- a/src/components/transport_manager/src/transport_adapter/transport_adapter_impl.cc
+++ b/src/components/transport_manager/src/transport_adapter/transport_adapter_impl.cc
@@ -88,15 +88,15 @@ TransportAdapterImpl::~TransportAdapterImpl() {
}
if (server_connection_factory_) {
LOGGER_DEBUG(logger_,
- "Deleting server_connection_factory "
- << server_connection_factory_);
+ "Deleting server_connection_factory "
+ << server_connection_factory_);
delete server_connection_factory_;
LOGGER_DEBUG(logger_, "server_connection_factory deleted.");
}
if (client_connection_listener_) {
LOGGER_DEBUG(logger_,
- "Deleting client_connection_listener_ "
- << client_connection_listener_);
+ "Deleting client_connection_listener_ "
+ << client_connection_listener_);
delete client_connection_listener_;
LOGGER_DEBUG(logger_, "client_connection_listener_ deleted.");
}
@@ -106,19 +106,19 @@ void TransportAdapterImpl::Terminate() {
if (device_scanner_) {
device_scanner_->Terminate();
LOGGER_DEBUG(logger_,
- "device_scanner_ " << device_scanner_ << " terminated.");
+ "device_scanner_ " << device_scanner_ << " terminated.");
}
if (server_connection_factory_) {
server_connection_factory_->Terminate();
LOGGER_DEBUG(logger_,
- "server_connection_factory " << server_connection_factory_
- << " terminated.");
+ "server_connection_factory " << server_connection_factory_
+ << " terminated.");
}
if (client_connection_listener_) {
client_connection_listener_->Terminate();
LOGGER_DEBUG(logger_,
- "client_connection_listener_ " << client_connection_listener_
- << " terminated.");
+ "client_connection_listener_ " << client_connection_listener_
+ << " terminated.");
}
ConnectionMap connections;
@@ -182,8 +182,8 @@ TransportAdapter::Error TransportAdapterImpl::SearchDevices() {
TransportAdapter::Error TransportAdapterImpl::Connect(
const DeviceUID& device_id, const ApplicationHandle& app_handle) {
LOGGER_TRACE(logger_,
- "enter. DeviceUID " << device_id << " ApplicationHandle "
- << app_handle);
+ "enter. DeviceUID " << device_id << " ApplicationHandle "
+ << app_handle);
if (server_connection_factory_ == 0) {
LOGGER_TRACE(logger_, "exit with NOT_SUPPORTED");
return NOT_SUPPORTED;
@@ -237,8 +237,8 @@ TransportAdapter::Error TransportAdapterImpl::ConnectDevice(
TransportAdapter::Error TransportAdapterImpl::Disconnect(
const DeviceUID& device_id, const ApplicationHandle& app_handle) {
LOGGER_TRACE(logger_,
- "enter. device_id: " << &device_id
- << ", device_id: " << &device_id);
+ "enter. device_id: " << &device_id
+ << ", device_id: " << &device_id);
if (!initialised_) {
LOGGER_TRACE(logger_, "exit with BAD_STATE");
return BAD_STATE;
@@ -295,8 +295,8 @@ TransportAdapter::Error TransportAdapterImpl::SendData(
const ApplicationHandle& app_handle,
const ::protocol_handler::RawMessagePtr data) {
LOGGER_TRACE(logger_,
- "enter. device_id: " << &device_id << ", app_handle: "
- << &app_handle << ", data: " << data);
+ "enter. device_id: " << &device_id << ", app_handle: "
+ << &app_handle << ", data: " << data);
if (!initialised_) {
LOGGER_TRACE(logger_, "exit with BAD_STATE");
return BAD_STATE;
@@ -356,7 +356,7 @@ DeviceList TransportAdapterImpl::GetDeviceList() const {
devices.push_back(it->first);
}
LOGGER_TRACE(logger_,
- "exit with DeviceList. It's' size = " << devices.size());
+ "exit with DeviceList. It's' size = " << devices.size());
return devices;
}
@@ -418,8 +418,8 @@ void TransportAdapterImpl::SearchDeviceDone(const DeviceVector& devices) {
if (!device_found) {
LOGGER_INFO(logger_,
- "Adding new device " << device->unique_device_id() << " (\""
- << device->name() << "\")");
+ "Adding new device " << device->unique_device_id() << " (\""
+ << device->name() << "\")");
}
device->set_keep_on_disconnect(true);
@@ -519,9 +519,9 @@ void TransportAdapterImpl::ConnectionCreated(
const DeviceUID& device_id,
const ApplicationHandle& app_handle) {
LOGGER_TRACE(logger_,
- "enter connection:" << connection
- << ", device_id: " << &device_id
- << ", app_handle: " << &app_handle);
+ "enter connection:" << connection
+ << ", device_id: " << &device_id
+ << ", app_handle: " << &app_handle);
connections_lock_.AcquireForReading();
ConnectionInfo& info = connections_[std::make_pair(device_id, app_handle)];
info.app_handle = app_handle;
@@ -535,8 +535,8 @@ void TransportAdapterImpl::DeviceDisconnected(
const DeviceUID& device_handle, const DisconnectDeviceError& error) {
const DeviceUID device_uid = device_handle;
LOGGER_TRACE(logger_,
- "enter. device_handle: " << &device_uid
- << ", error: " << &error);
+ "enter. device_handle: " << &device_uid
+ << ", error: " << &error);
ApplicationList app_list = GetApplicationList(device_uid);
for (ApplicationList::const_iterator i = app_list.begin();
i != app_list.end();
@@ -581,8 +581,8 @@ bool TransportAdapterImpl::IsSingleApplication(
const ApplicationHandle& current_app_handle = it->first.second;
if (current_device_id == device_uid && current_app_handle != app_uid) {
LOGGER_DEBUG(logger_,
- "break. Condition: current_device_id == device_id && "
- "current_app_handle != app_handle");
+ "break. Condition: current_device_id == device_id && "
+ "current_app_handle != app_handle");
return false;
}
@@ -595,8 +595,8 @@ void TransportAdapterImpl::DisconnectDone(const DeviceUID& device_handle,
const DeviceUID device_uid = device_handle;
const ApplicationHandle app_uid = app_handle;
LOGGER_TRACE(logger_,
- "enter. device_id: " << &device_uid
- << ", app_handle: " << &app_uid);
+ "enter. device_id: " << &device_uid
+ << ", app_handle: " << &app_uid);
DeviceSptr device = FindDevice(device_handle);
if (!device) {
LOGGER_WARN(logger_, "Device: uid " << &device_uid << " not found");
@@ -632,9 +632,8 @@ void TransportAdapterImpl::DataReceiveDone(
const ApplicationHandle& app_handle,
::protocol_handler::RawMessagePtr message) {
LOGGER_TRACE(logger_,
- "enter. device_id: " << &device_id
- << ", app_handle: " << &app_handle
- << ", message: " << message);
+ "enter. device_id: " << &device_id << ", app_handle: "
+ << &app_handle << ", message: " << message);
#ifdef TELEMETRY_MONITOR
if (metric_observer_) {
@@ -708,8 +707,8 @@ DeviceSptr TransportAdapterImpl::FindDevice(const DeviceUID& device_id) const {
void TransportAdapterImpl::ConnectDone(const DeviceUID& device_id,
const ApplicationHandle& app_handle) {
LOGGER_TRACE(logger_,
- "enter. device_id: " << &device_id
- << ", app_handle: " << &app_handle);
+ "enter. device_id: " << &device_id
+ << ", app_handle: " << &app_handle);
connections_lock_.AcquireForReading();
ConnectionMap::iterator it_conn =
connections_.find(std::make_pair(device_id, app_handle));
@@ -735,8 +734,8 @@ void TransportAdapterImpl::ConnectFailed(const DeviceUID& device_handle,
const DeviceUID device_uid = device_handle;
const ApplicationHandle app_uid = app_handle;
LOGGER_TRACE(logger_,
- "enter. device_id: " << &device_uid << ", app_handle: "
- << &app_uid << ", error: " << &error);
+ "enter. device_id: " << &device_uid << ", app_handle: "
+ << &app_uid << ", error: " << &error);
connections_lock_.AcquireForWriting();
connections_.erase(std::make_pair(device_uid, app_uid));
connections_lock_.Release();
@@ -761,8 +760,8 @@ ApplicationList TransportAdapterImpl::GetApplicationList(
if (device.valid()) {
ApplicationList lst = device->GetApplicationList();
LOGGER_TRACE(logger_,
- "exit with ApplicationList. It's size = "
- << lst.size() << " Condition: device.valid()");
+ "exit with ApplicationList. It's size = "
+ << lst.size() << " Condition: device.valid()");
return lst;
}
LOGGER_TRACE(
@@ -774,8 +773,8 @@ ApplicationList TransportAdapterImpl::GetApplicationList(
void TransportAdapterImpl::ConnectionFinished(
const DeviceUID& device_id, const ApplicationHandle& app_handle) {
LOGGER_TRACE(logger_,
- "enter. device_id: " << &device_id
- << ", app_handle: " << &app_handle);
+ "enter. device_id: " << &device_id
+ << ", app_handle: " << &app_handle);
connections_lock_.AcquireForReading();
ConnectionMap::iterator it =
connections_.find(std::make_pair(device_id, app_handle));
@@ -806,22 +805,22 @@ bool TransportAdapterImpl::IsInitialised() const {
}
if (device_scanner_ && !device_scanner_->IsInitialised()) {
LOGGER_TRACE(logger_,
- "exit with FALSE. Condition: device_scanner_ && "
- "!device_scanner_->IsInitialised()");
+ "exit with FALSE. Condition: device_scanner_ && "
+ "!device_scanner_->IsInitialised()");
return false;
}
if (server_connection_factory_ &&
!server_connection_factory_->IsInitialised()) {
LOGGER_TRACE(logger_,
- "exit with FALSE. Condition: server_connection_factory_ && "
- "!server_connection_factory_->IsInitialised()");
+ "exit with FALSE. Condition: server_connection_factory_ && "
+ "!server_connection_factory_->IsInitialised()");
return false;
}
if (client_connection_listener_ &&
!client_connection_listener_->IsInitialised()) {
LOGGER_TRACE(logger_,
- "exit with FALSE. Condition: client_connection_listener_ && "
- "!client_connection_listener_->IsInitialised()");
+ "exit with FALSE. Condition: client_connection_listener_ && "
+ "!client_connection_listener_->IsInitialised()");
return false;
}
LOGGER_TRACE(logger_, "exit with TRUE");
@@ -870,8 +869,8 @@ bool TransportAdapterImpl::ToBeAutoDisconnected(DeviceSptr device) const {
ConnectionSPtr TransportAdapterImpl::FindEstablishedConnection(
const DeviceUID& device_id, const ApplicationHandle& app_handle) const {
LOGGER_TRACE(logger_,
- "enter. device_id: " << &device_id
- << ", app_handle: " << &app_handle);
+ "enter. device_id: " << &device_id
+ << ", app_handle: " << &app_handle);
ConnectionSPtr connection;
connections_lock_.AcquireForReading();
ConnectionMap::const_iterator it =
@@ -892,15 +891,15 @@ TransportAdapter::Error TransportAdapterImpl::ConnectDevice(DeviceSptr device) {
DeviceUID device_id = device->unique_device_id();
ApplicationList app_list = device->GetApplicationList();
LOGGER_INFO(logger_,
- "Device " << device->name() << " has " << app_list.size()
- << " applications.");
+ "Device " << device->name() << " has " << app_list.size()
+ << " applications.");
bool errors_occurred = false;
for (ApplicationList::iterator it = app_list.begin(); it != app_list.end();
++it) {
const ApplicationHandle app_handle = *it;
LOGGER_DEBUG(logger_,
- "Attempt to connect device " << device_id << ", channel "
- << app_handle);
+ "Attempt to connect device " << device_id << ", channel "
+ << app_handle);
const Error error = Connect(device_id, app_handle);
switch (error) {
case OK:
@@ -911,9 +910,9 @@ TransportAdapter::Error TransportAdapterImpl::ConnectDevice(DeviceSptr device) {
break;
default:
LOGGER_ERROR(logger_,
- "Connect to device " << device_id << ", channel "
- << app_handle
- << " failed with error " << error);
+ "Connect to device " << device_id << ", channel "
+ << app_handle << " failed with error "
+ << error);
errors_occurred = true;
LOGGER_DEBUG(logger_, "switch (error), default case");
break;
diff --git a/src/components/transport_manager/src/transport_adapter/transport_adapter_listener_impl.cc b/src/components/transport_manager/src/transport_adapter/transport_adapter_listener_impl.cc
index 29b9567183..e32a23f0b2 100644
--- a/src/components/transport_manager/src/transport_adapter/transport_adapter_listener_impl.cc
+++ b/src/components/transport_manager/src/transport_adapter/transport_adapter_listener_impl.cc
@@ -65,8 +65,7 @@ void TransportAdapterListenerImpl::OnSearchDeviceDone(
void TransportAdapterListenerImpl::OnSearchDeviceFailed(
const TransportAdapter* adapter, const SearchDeviceError& error) {
- LOGGER_TRACE(logger_,
- "enter. adapter: " << adapter << ", error: " << &error);
+ LOGGER_TRACE(logger_, "enter. adapter: " << adapter << ", error: " << &error);
SearchDeviceError* err = new SearchDeviceError(error);
const TransportAdapterEvent event(
TransportAdapterListenerImpl::EventTypeEnum::ON_SEARCH_FAIL,
@@ -124,8 +123,8 @@ void TransportAdapterListenerImpl::OnConnectDone(
const DeviceUID& device,
const ApplicationHandle& application_id) {
LOGGER_TRACE(logger_,
- "enter adapter*: " << adapter << ", device: " << &device
- << ", application_id: " << &application_id);
+ "enter adapter*: " << adapter << ", device: " << &device
+ << ", application_id: " << &application_id);
const TransportAdapterEvent event(
TransportAdapterListenerImpl::EventTypeEnum::ON_CONNECT_DONE,
transport_adapter_,
@@ -147,9 +146,9 @@ void TransportAdapterListenerImpl::OnConnectFailed(
const ApplicationHandle& app_id,
const ConnectError& error) {
LOGGER_TRACE(logger_,
- "enter. adapter: " << adapter << ", device: " << &device
- << ", application_id: " << &app_id
- << ", error: " << &error);
+ "enter. adapter: " << adapter << ", device: " << &device
+ << ", application_id: " << &app_id
+ << ", error: " << &error);
ConnectError* err = new ConnectError(error);
const TransportAdapterEvent event(
TransportAdapterListenerImpl::EventTypeEnum::ON_CONNECT_FAIL,
@@ -171,8 +170,8 @@ void TransportAdapterListenerImpl::OnDisconnectDone(
const DeviceUID& device,
const ApplicationHandle& app_id) {
LOGGER_TRACE(logger_,
- "enter. adapter: " << adapter << ", device: " << &device
- << ", application_id: " << &app_id);
+ "enter. adapter: " << adapter << ", device: " << &device
+ << ", application_id: " << &app_id);
const TransportAdapterEvent event(
TransportAdapterListenerImpl::EventTypeEnum::ON_DISCONNECT_DONE,
transport_adapter_,
@@ -194,9 +193,9 @@ void TransportAdapterListenerImpl::OnDisconnectFailed(
const ApplicationHandle& app_id,
const DisconnectError& error) {
LOGGER_TRACE(logger_,
- "enter. adapter: " << adapter << ", device: " << &device
- << ", application_id: " << &app_id
- << ", error: " << &error);
+ "enter. adapter: " << adapter << ", device: " << &device
+ << ", application_id: " << &app_id
+ << ", error: " << &error);
DisconnectError* err = new DisconnectError(error);
const TransportAdapterEvent event(
TransportAdapterListenerImpl::EventTypeEnum::ON_DISCONNECT_FAIL,
@@ -227,9 +226,9 @@ void TransportAdapterListenerImpl::OnDataReceiveDone(
const ApplicationHandle& app_id,
const ::protocol_handler::RawMessagePtr data_container) {
LOGGER_TRACE(logger_,
- "enter. adapter: " << adapter << ", device: " << &device
- << ", application_id: " << &app_id
- << ", data_container: " << data_container);
+ "enter. adapter: " << adapter << ", device: " << &device
+ << ", application_id: " << &app_id
+ << ", data_container: " << data_container);
const TransportAdapterEvent event(
TransportAdapterListenerImpl::EventTypeEnum::ON_RECEIVED_DONE,
transport_adapter_,
@@ -251,9 +250,9 @@ void TransportAdapterListenerImpl::OnDataReceiveFailed(
const ApplicationHandle& app_id,
const DataReceiveError& error) {
LOGGER_TRACE(logger_,
- "enter. adapter: " << adapter << ", device: " << &device
- << ", application_id: " << &app_id
- << ", error: " << &error);
+ "enter. adapter: " << adapter << ", device: " << &device
+ << ", application_id: " << &app_id
+ << ", error: " << &error);
DataReceiveError* err = new DataReceiveError(error);
const TransportAdapterEvent event(
TransportAdapterListenerImpl::EventTypeEnum::ON_RECEIVED_FAIL,
@@ -276,9 +275,9 @@ void TransportAdapterListenerImpl::OnDataSendDone(
const ApplicationHandle& app_id,
const ::protocol_handler::RawMessagePtr data_container) {
LOGGER_TRACE(logger_,
- "enter. adapter: " << adapter << ", device: " << &device
- << ", application_id: " << &app_id
- << ", data_container: " << data_container);
+ "enter. adapter: " << adapter << ", device: " << &device
+ << ", application_id: " << &app_id
+ << ", data_container: " << data_container);
const TransportAdapterEvent event(
TransportAdapterListenerImpl::EventTypeEnum::ON_SEND_DONE,
transport_adapter_,
@@ -301,10 +300,10 @@ void TransportAdapterListenerImpl::OnDataSendFailed(
const ::protocol_handler::RawMessagePtr data_container,
const DataSendError& error) {
LOGGER_TRACE(logger_,
- "enter. adapter: " << adapter << ", device: " << &device
- << ", application_id: " << &app_id
- << ", data_container: " << data_container
- << ", error: " << &error);
+ "enter. adapter: " << adapter << ", device: " << &device
+ << ", application_id: " << &app_id
+ << ", data_container: " << data_container
+ << ", error: " << &error);
DataSendError* err = new DataSendError(error);
const TransportAdapterEvent event(
TransportAdapterListenerImpl::EventTypeEnum::ON_SEND_FAIL,
@@ -332,9 +331,9 @@ void TransportAdapterListenerImpl::OnUnexpectedDisconnect(
const ApplicationHandle& application,
const CommunicationError& error) {
LOGGER_TRACE(logger_,
- "enter. adapter: " << adapter << ", device: " << &device
- << ", application: " << &application
- << ", error: " << &error);
+ "enter. adapter: " << adapter << ", device: " << &device
+ << ", application: " << &application
+ << ", error: " << &error);
CommunicationError* err = new CommunicationError(error);
const TransportAdapterEvent event(
TransportAdapterListenerImpl::EventTypeEnum::ON_UNEXPECTED_DISCONNECT,
@@ -356,8 +355,8 @@ void TransportAdapterListenerImpl::OnCommunicationError(
const DeviceUID& device,
const ApplicationHandle& app_id) {
LOGGER_TRACE(logger_,
- "enter. adapter: " << adapter << ", device: " << &device
- << ", application_id: " << &app_id);
+ "enter. adapter: " << adapter << ", device: " << &device
+ << ", application_id: " << &app_id);
const TransportAdapterEvent event(
TransportAdapterListenerImpl::EventTypeEnum::ON_COMMUNICATION_ERROR,
transport_adapter_,
diff --git a/src/components/transport_manager/src/transport_manager_default.cc b/src/components/transport_manager/src/transport_manager_default.cc
index 9b6217ec01..ecd684dd26 100644
--- a/src/components/transport_manager/src/transport_manager_default.cc
+++ b/src/components/transport_manager/src/transport_manager_default.cc
@@ -55,8 +55,8 @@ int TransportManagerDefault::Init(resumption::LastState& last_state) {
LOGGER_TRACE(logger_, "enter");
if (E_SUCCESS != TransportManagerImpl::Init(last_state)) {
LOGGER_TRACE(logger_,
- "exit with E_TM_IS_NOT_INITIALIZED. Condition: E_SUCCESS != "
- "TransportManagerImpl::Init()");
+ "exit with E_TM_IS_NOT_INITIALIZED. Condition: E_SUCCESS != "
+ "TransportManagerImpl::Init()");
return E_TM_IS_NOT_INITIALIZED;
}
diff --git a/src/components/transport_manager/src/transport_manager_impl.cc b/src/components/transport_manager/src/transport_manager_impl.cc
index 30b61f0fc7..60c0ab76b1 100644
--- a/src/components/transport_manager/src/transport_manager_impl.cc
+++ b/src/components/transport_manager/src/transport_manager_impl.cc
@@ -178,7 +178,7 @@ int TransportManagerImpl::Disconnect(const ConnectionUID cid) {
logger_,
"TransportManagerImpl::Disconnect: Connection does not exist.");
LOGGER_TRACE(logger_,
- "exit with E_INVALID_HANDLE. Condition: NULL == connection");
+ "exit with E_INVALID_HANDLE. Condition: NULL == connection");
return E_INVALID_HANDLE;
}
@@ -218,8 +218,8 @@ int TransportManagerImpl::DisconnectForce(const ConnectionUID cid) {
if (false == this->is_initialized_) {
LOGGER_ERROR(logger_, "TransportManager is not initialized.");
LOGGER_TRACE(logger_,
- "exit with E_TM_IS_NOT_INITIALIZED. Condition: false == "
- "this->is_initialized_");
+ "exit with E_TM_IS_NOT_INITIALIZED. Condition: false == "
+ "this->is_initialized_");
return E_TM_IS_NOT_INITIALIZED;
}
sync_primitives::AutoReadLock lock(connections_lock_);
@@ -229,7 +229,7 @@ int TransportManagerImpl::DisconnectForce(const ConnectionUID cid) {
logger_,
"TransportManagerImpl::DisconnectForce: Connection does not exist.");
LOGGER_TRACE(logger_,
- "exit with E_INVALID_HANDLE. Condition: NULL == connection");
+ "exit with E_INVALID_HANDLE. Condition: NULL == connection");
return E_INVALID_HANDLE;
}
connection->transport_adapter->Disconnect(connection->device,
@@ -298,13 +298,12 @@ int TransportManagerImpl::SendMessageToDevice(
const ::protocol_handler::RawMessagePtr message) {
LOGGER_TRACE(logger_, "enter. RawMessageSptr: " << message);
LOGGER_INFO(logger_,
- "Send message to device called with arguments "
- << message.get());
+ "Send message to device called with arguments " << message.get());
if (false == this->is_initialized_) {
LOGGER_ERROR(logger_, "TM is not initialized.");
LOGGER_TRACE(logger_,
- "exit with E_TM_IS_NOT_INITIALIZED. Condition: false == "
- "this->is_initialized_");
+ "exit with E_TM_IS_NOT_INITIALIZED. Condition: false == "
+ "this->is_initialized_");
return E_TM_IS_NOT_INITIALIZED;
}
@@ -314,10 +313,10 @@ int TransportManagerImpl::SendMessageToDevice(
GetConnection(message->connection_key());
if (NULL == connection) {
LOGGER_ERROR(logger_,
- "Connection with id " << message->connection_key()
- << " does not exist.");
- LOGGER_TRACE(
- logger_, "exit with E_INVALID_HANDLE. Condition: NULL == connection");
+ "Connection with id " << message->connection_key()
+ << " does not exist.");
+ LOGGER_TRACE(logger_,
+ "exit with E_INVALID_HANDLE. Condition: NULL == connection");
return E_INVALID_HANDLE;
}
@@ -326,8 +325,8 @@ int TransportManagerImpl::SendMessageToDevice(
logger_,
"TransportManagerImpl::Disconnect: Connection is to shut down.");
LOGGER_TRACE(logger_,
- "exit with E_CONNECTION_IS_TO_SHUTDOWN. Condition: "
- "connection->shutDown");
+ "exit with E_CONNECTION_IS_TO_SHUTDOWN. Condition: "
+ "connection->shutDown");
return E_CONNECTION_IS_TO_SHUTDOWN;
}
}
@@ -347,8 +346,8 @@ int TransportManagerImpl::ReceiveEventFromDevice(
if (!is_initialized_) {
LOGGER_ERROR(logger_, "TM is not initialized.");
LOGGER_TRACE(logger_,
- "exit with E_TM_IS_NOT_INITIALIZED. Condition: false == "
- "this->is_initialized_");
+ "exit with E_TM_IS_NOT_INITIALIZED. Condition: false == "
+ "this->is_initialized_");
return E_TM_IS_NOT_INITIALIZED;
}
this->PostEvent(event);
@@ -362,8 +361,8 @@ int TransportManagerImpl::RemoveDevice(const DeviceHandle device_handle) {
if (false == this->is_initialized_) {
LOGGER_ERROR(logger_, "TM is not initialized.");
LOGGER_TRACE(logger_,
- "exit with E_TM_IS_NOT_INITIALIZED. Condition: false == "
- "this->is_initialized_");
+ "exit with E_TM_IS_NOT_INITIALIZED. Condition: false == "
+ "this->is_initialized_");
return E_TM_IS_NOT_INITIALIZED;
}
sync_primitives::AutoWriteLock lock(device_to_adapter_map_lock_);
@@ -380,9 +379,9 @@ int TransportManagerImpl::AddTransportAdapter(
transport_adapter_listeners_.end()) {
LOGGER_ERROR(logger_, "Adapter already exists.");
LOGGER_TRACE(logger_,
- "exit with E_ADAPTER_EXISTS. Condition: "
- "transport_adapter_listeners_.find(transport_adapter) != "
- "transport_adapter_listeners_.end()");
+ "exit with E_ADAPTER_EXISTS. Condition: "
+ "transport_adapter_listeners_.find(transport_adapter) != "
+ "transport_adapter_listeners_.end()");
return E_ADAPTER_EXISTS;
}
transport_adapter_listeners_[transport_adapter] =
@@ -422,21 +421,20 @@ int TransportManagerImpl::SearchDevices() {
success_occurred = true;
} else {
LOGGER_ERROR(logger_,
- "Transport Adapter search failed "
- << *it << "[" << (*it)->GetDeviceType() << "]");
+ "Transport Adapter search failed "
+ << *it << "[" << (*it)->GetDeviceType() << "]");
switch (scanResult) {
case transport_adapter::TransportAdapter::NOT_SUPPORTED: {
LOGGER_ERROR(logger_,
- "Search feature is not supported "
- << *it << "[" << (*it)->GetDeviceType() << "]");
- LOGGER_DEBUG(logger_,
- "scanResult = TransportAdapter::NOT_SUPPORTED");
+ "Search feature is not supported "
+ << *it << "[" << (*it)->GetDeviceType() << "]");
+ LOGGER_DEBUG(logger_, "scanResult = TransportAdapter::NOT_SUPPORTED");
break;
}
case transport_adapter::TransportAdapter::BAD_STATE: {
LOGGER_ERROR(logger_,
- "Transport Adapter has bad state "
- << *it << "[" << (*it)->GetDeviceType() << "]");
+ "Transport Adapter has bad state "
+ << *it << "[" << (*it)->GetDeviceType() << "]");
LOGGER_DEBUG(logger_, "scanResult = TransportAdapter::BAD_STATE");
break;
}
@@ -453,12 +451,12 @@ int TransportManagerImpl::SearchDevices() {
: E_ADAPTERS_FAIL;
if (transport_adapter_search == E_SUCCESS) {
LOGGER_TRACE(logger_,
- "exit with E_SUCCESS. Condition: success_occured || "
- "transport_adapters_.empty()");
+ "exit with E_SUCCESS. Condition: success_occured || "
+ "transport_adapters_.empty()");
} else {
LOGGER_TRACE(logger_,
- "exit with E_ADAPTERS_FAIL. Condition: success_occured || "
- "transport_adapters_.empty()");
+ "exit with E_ADAPTERS_FAIL. Condition: success_occured || "
+ "transport_adapters_.empty()");
}
return transport_adapter_search;
}
@@ -488,8 +486,8 @@ int TransportManagerImpl::Visibility(const bool& on_off) const {
if (!is_initialized_) {
LOGGER_ERROR(logger_, "TM is not initialized");
LOGGER_TRACE(logger_,
- "exit with E_TM_IS_NOT_INITIALIZED. Condition: false == "
- "is_initialized_");
+ "exit with E_TM_IS_NOT_INITIALIZED. Condition: false == "
+ "is_initialized_");
return E_TM_IS_NOT_INITIALIZED;
}
@@ -504,8 +502,8 @@ int TransportManagerImpl::Visibility(const bool& on_off) const {
}
if (TransportAdapter::Error::NOT_SUPPORTED == ret) {
LOGGER_DEBUG(logger_,
- "Visibility change is not supported for adapter "
- << *it << "[" << (*it)->GetDeviceType() << "]");
+ "Visibility change is not supported for adapter "
+ << *it << "[" << (*it)->GetDeviceType() << "]");
}
}
LOGGER_TRACE(logger_, "exit with E_SUCCESS");
@@ -623,8 +621,8 @@ TransportManagerImpl::ConnectionInternal* TransportManagerImpl::GetConnection(
const DeviceUID& device, const ApplicationHandle& application) {
LOGGER_AUTO_TRACE(logger_);
LOGGER_DEBUG(logger_,
- "DeviceUID: " << &device
- << "ApplicationHandle: " << &application);
+ "DeviceUID: " << &device
+ << "ApplicationHandle: " << &application);
for (std::vector<ConnectionInternal>::iterator it = connections_.begin();
it != connections_.end();
++it) {
@@ -726,7 +724,7 @@ void TransportManagerImpl::Handle(TransportAdapterEvent event) {
if (NULL == connection) {
LOGGER_ERROR(logger_, "Connection not found");
LOGGER_DEBUG(logger_,
- "event_type = ON_DISCONNECT_DONE && NULL == connection");
+ "event_type = ON_DISCONNECT_DONE && NULL == connection");
connections_lock_.Release();
break;
}
@@ -758,8 +756,8 @@ void TransportManagerImpl::Handle(TransportAdapterEvent event) {
GetConnection(event.device_uid, event.application_id);
if (connection == NULL) {
LOGGER_ERROR(logger_,
- "Connection ('" << event.device_uid << ", "
- << event.application_id << ") not found");
+ "Connection ('" << event.device_uid << ", "
+ << event.application_id << ") not found");
LOGGER_DEBUG(
logger_,
"event_type = ON_SEND_DONE. Condition: NULL == connection");
@@ -786,9 +784,9 @@ void TransportManagerImpl::Handle(TransportAdapterEvent event) {
GetConnection(event.device_uid, event.application_id);
if (connection == NULL) {
LOGGER_ERROR(logger_,
- "Connection ('" << event.device_uid << ", "
- << event.application_id
- << ") not found");
+ "Connection ('" << event.device_uid << ", "
+ << event.application_id
+ << ") not found");
LOGGER_DEBUG(
logger_,
"event_type = ON_SEND_FAIL. Condition: NULL == connection");
@@ -816,9 +814,9 @@ void TransportManagerImpl::Handle(TransportAdapterEvent event) {
GetConnection(event.device_uid, event.application_id);
if (connection == NULL) {
LOGGER_ERROR(logger_,
- "Connection ('" << event.device_uid << ", "
- << event.application_id
- << ") not found");
+ "Connection ('" << event.device_uid << ", "
+ << event.application_id
+ << ") not found");
LOGGER_DEBUG(
logger_,
"event_type = ON_RECEIVED_DONE. Condition: NULL == connection");
@@ -843,8 +841,8 @@ void TransportManagerImpl::Handle(TransportAdapterEvent event) {
GetConnection(event.device_uid, event.application_id);
if (connection == NULL) {
LOGGER_ERROR(logger_,
- "Connection ('" << event.device_uid << ", "
- << event.application_id << ") not found");
+ "Connection ('" << event.device_uid << ", "
+ << event.application_id << ") not found");
connections_lock_.Release();
break;
}
@@ -874,8 +872,8 @@ void TransportManagerImpl::Handle(TransportAdapterEvent event) {
} else {
connections_lock_.Release();
LOGGER_ERROR(logger_,
- "Connection ('" << event.device_uid << ", "
- << event.application_id << ") not found");
+ "Connection ('" << event.device_uid << ", "
+ << event.application_id << ") not found");
}
LOGGER_DEBUG(logger_, "eevent_type = ON_UNEXPECTED_DISCONNECT");
break;
@@ -896,7 +894,7 @@ void TransportManagerImpl::Handle(::protocol_handler::RawMessagePtr msg) {
ConnectionInternal* connection = GetConnection(msg->connection_key());
if (connection == NULL) {
LOGGER_WARN(logger_,
- "Connection " << msg->connection_key() << " not found");
+ "Connection " << msg->connection_key() << " not found");
RaiseEvent(&TransportManagerListener::OnTMMessageSendFailed,
DataSendTimeoutError(),
msg);
@@ -905,9 +903,9 @@ void TransportManagerImpl::Handle(::protocol_handler::RawMessagePtr msg) {
TransportAdapter* transport_adapter = connection->transport_adapter;
LOGGER_DEBUG(logger_,
- "Got adapter " << transport_adapter << "["
- << transport_adapter->GetDeviceType() << "]"
- << " by session id " << msg->connection_key());
+ "Got adapter " << transport_adapter << "["
+ << transport_adapter->GetDeviceType() << "]"
+ << " by session id " << msg->connection_key());
if (NULL == transport_adapter) {
std::string error_text = "Transport adapter is not found";
diff --git a/src/components/transport_manager/src/usb/libusb/platform_usb_device.cc b/src/components/transport_manager/src/usb/libusb/platform_usb_device.cc
index a00d60fe90..77fe496e92 100644
--- a/src/components/transport_manager/src/usb/libusb/platform_usb_device.cc
+++ b/src/components/transport_manager/src/usb/libusb/platform_usb_device.cc
@@ -62,8 +62,8 @@ std::string PlatformUsbDevice::GetDescString(uint8_t index) const {
libusb_device_handle_, index, buf, sizeof(buf));
if (libusb_ret < 0) {
LOGGER_ERROR(logger_,
- "Failed to get USB string descriptor: "
- << libusb_error_name(libusb_ret));
+ "Failed to get USB string descriptor: "
+ << libusb_error_name(libusb_ret));
LOGGER_TRACE(logger_, "exit with empty string");
return "";
}
diff --git a/src/components/transport_manager/src/usb/libusb/usb_connection.cc b/src/components/transport_manager/src/usb/libusb/usb_connection.cc
index bd81ee14ce..c4bbdb2fc5 100644
--- a/src/components/transport_manager/src/usb/libusb/usb_connection.cc
+++ b/src/components/transport_manager/src/usb/libusb/usb_connection.cc
@@ -128,16 +128,16 @@ void UsbConnection::OnInTransfer(libusb_transfer* transfer) {
LOGGER_TRACE(logger_, "enter with Libusb_transfer*: " << transfer);
if (transfer->status == LIBUSB_TRANSFER_COMPLETED) {
LOGGER_DEBUG(logger_,
- "USB incoming transfer, size:"
- << transfer->actual_length << ", data:"
- << hex_data(transfer->buffer, transfer->actual_length));
+ "USB incoming transfer, size:"
+ << transfer->actual_length << ", data:"
+ << hex_data(transfer->buffer, transfer->actual_length));
::protocol_handler::RawMessagePtr data(new protocol_handler::RawMessage(
0, 0, in_buffer_, transfer->actual_length));
controller_->DataReceiveDone(device_uid_, app_handle_, data);
} else {
LOGGER_ERROR(logger_,
- "USB incoming transfer failed: "
- << libusb_error_name(transfer->status));
+ "USB incoming transfer failed: "
+ << libusb_error_name(transfer->status));
controller_->DataReceiveFailed(
device_uid_, app_handle_, DataReceiveError());
}
@@ -146,8 +146,8 @@ void UsbConnection::OnInTransfer(libusb_transfer* transfer) {
} else {
if (!PostInTransfer()) {
LOGGER_ERROR(logger_,
- "USB incoming transfer failed with "
- << "LIBUSB_TRANSFER_NO_DEVICE. Abort connection.");
+ "USB incoming transfer failed with "
+ << "LIBUSB_TRANSFER_NO_DEVICE. Abort connection.");
AbortConnection();
}
}
@@ -185,14 +185,13 @@ bool UsbConnection::PostOutTransfer() {
0);
const int libusb_ret = libusb_submit_transfer(out_transfer_);
if (LIBUSB_SUCCESS != libusb_ret) {
- LOGGER_ERROR(
- logger_,
- "libusb_submit_transfer failed: " << libusb_error_name(libusb_ret)
- << ". Abort connection.");
+ LOGGER_ERROR(logger_,
+ "libusb_submit_transfer failed: "
+ << libusb_error_name(libusb_ret) << ". Abort connection.");
AbortConnection();
LOGGER_TRACE(logger_,
- "exit with FALSE. Condition: "
- << "LIBUSB_SUCCESS != libusb_fill_bulk_transfer");
+ "exit with FALSE. Condition: "
+ << "LIBUSB_SUCCESS != libusb_fill_bulk_transfer");
return false;
}
LOGGER_TRACE(logger_, "exit with TRUE");
@@ -232,8 +231,8 @@ TransportAdapter::Error UsbConnection::SendData(
LOGGER_TRACE(logger_, "enter with RawMessagePtr: " << message.get());
if (disconnecting_) {
LOGGER_TRACE(logger_,
- "exit with TransportAdapter::BAD_STATE. Condition: "
- << "disconnecting_");
+ "exit with TransportAdapter::BAD_STATE. Condition: "
+ << "disconnecting_");
return TransportAdapter::BAD_STATE;
}
sync_primitives::AutoLock locker(out_messages_mutex_);
@@ -335,10 +334,10 @@ bool UsbConnection::FindEndpoints() {
libusb_get_active_config_descriptor(libusb_device_, &config);
if (LIBUSB_SUCCESS != libusb_ret) {
LOGGER_ERROR(logger_,
- "libusb_get_active_config_descriptor failed: "
- << libusb_error_name(libusb_ret));
+ "libusb_get_active_config_descriptor failed: "
+ << libusb_error_name(libusb_ret));
LOGGER_TRACE(logger_,
- "exit with FALSE. Condition: LIBUSB_SUCCESS != libusb_ret");
+ "exit with FALSE. Condition: LIBUSB_SUCCESS != libusb_ret");
return false;
}
diff --git a/src/components/transport_manager/src/usb/libusb/usb_handler.cc b/src/components/transport_manager/src/usb/libusb/usb_handler.cc
index f4534572b9..ae985e5980 100644
--- a/src/components/transport_manager/src/usb/libusb/usb_handler.cc
+++ b/src/components/transport_manager/src/usb/libusb/usb_handler.cc
@@ -114,7 +114,7 @@ void UsbHandler::DeviceArrived(libusb_device* device_libusb) {
int libusb_ret = libusb_get_device_descriptor(device_libusb, &descriptor);
if (LIBUSB_SUCCESS != libusb_ret) {
LOGGER_ERROR(logger_,
- "libusb_get_device_descriptor failed: " << libusb_ret);
+ "libusb_get_device_descriptor failed: " << libusb_ret);
LOGGER_TRACE(logger_, "exit. Condition: LIBUSB_SUCCESS != libusb_ret");
return;
}
@@ -123,7 +123,7 @@ void UsbHandler::DeviceArrived(libusb_device* device_libusb) {
libusb_ret = libusb_open(device_libusb, &device_handle_libusb);
if (libusb_ret != LIBUSB_SUCCESS) {
LOGGER_ERROR(logger_,
- "libusb_open failed: " << libusb_error_name(libusb_ret));
+ "libusb_open failed: " << libusb_error_name(libusb_ret));
LOGGER_TRACE(logger_, "exit. Condition: libusb_ret != LIBUSB_SUCCESS");
return;
}
@@ -215,8 +215,8 @@ void UsbHandler::DeviceLeft(libusb_device* device_libusb) {
void UsbHandler::StartControlTransferSequence(
UsbControlTransferSequence* sequence, PlatformUsbDevice* device) {
LOGGER_TRACE(logger_,
- "enter. UsbControlTransferSequence* "
- << sequence << "PlatformUsbDevice* " << device);
+ "enter. UsbControlTransferSequence* "
+ << sequence << "PlatformUsbDevice* " << device);
TransferSequences::iterator it = transfer_sequences_.insert(
transfer_sequences_.end(),
new ControlTransferSequenceState(this, sequence, device));
@@ -233,11 +233,11 @@ int ArrivedCallback(libusb_context* context,
libusb_hotplug_event event,
void* data) {
LOGGER_TRACE(logger_,
- "enter. libusb device arrived (bus number "
- << static_cast<int>(libusb_get_bus_number(device))
- << ", device address "
- << static_cast<int>(libusb_get_device_address(device))
- << ")");
+ "enter. libusb device arrived (bus number "
+ << static_cast<int>(libusb_get_bus_number(device))
+ << ", device address "
+ << static_cast<int>(libusb_get_device_address(device))
+ << ")");
UsbHandler* usb_handler = static_cast<UsbHandler*>(data);
usb_handler->DeviceArrived(device);
LOGGER_TRACE(logger_, "exit with 0");
@@ -249,11 +249,11 @@ int LeftCallback(libusb_context* context,
libusb_hotplug_event event,
void* data) {
LOGGER_TRACE(logger_,
- "enter libusb device left (bus number "
- << static_cast<int>(libusb_get_bus_number(device))
- << ", device address "
- << static_cast<int>(libusb_get_device_address(device))
- << ")");
+ "enter libusb device left (bus number "
+ << static_cast<int>(libusb_get_bus_number(device))
+ << ", device address "
+ << static_cast<int>(libusb_get_device_address(device))
+ << ")");
UsbHandler* usb_handler = static_cast<UsbHandler*>(data);
usb_handler->DeviceLeft(device);
LOGGER_TRACE(logger_, "exit with 0");
@@ -267,16 +267,16 @@ TransportAdapter::Error UsbHandler::Init() {
if (LIBUSB_SUCCESS != libusb_ret) {
LOGGER_ERROR(logger_, "libusb_init failed: " << libusb_ret);
LOGGER_TRACE(logger_,
- "exit with TransportAdapter::FAIL. Condition: LIBUSB_SUCCESS "
- "!= libusb_ret");
+ "exit with TransportAdapter::FAIL. Condition: LIBUSB_SUCCESS "
+ "!= libusb_ret");
return TransportAdapter::FAIL;
}
if (!libusb_has_capability(LIBUSB_CAP_HAS_HOTPLUG)) {
LOGGER_ERROR(logger_, "LIBUSB_CAP_HAS_HOTPLUG not supported");
LOGGER_TRACE(logger_,
- "exit with TransportAdapter::FAIL. Condition: "
- "!libusb_has_capability(LIBUSB_CAP_HAS_HOTPLUG)");
+ "exit with TransportAdapter::FAIL. Condition: "
+ "!libusb_has_capability(LIBUSB_CAP_HAS_HOTPLUG)");
return TransportAdapter::FAIL;
}
@@ -293,10 +293,10 @@ TransportAdapter::Error UsbHandler::Init() {
if (LIBUSB_SUCCESS != libusb_ret) {
LOGGER_ERROR(logger_,
- "libusb_hotplug_register_callback failed: " << libusb_ret);
+ "libusb_hotplug_register_callback failed: " << libusb_ret);
LOGGER_TRACE(logger_,
- "exit with TransportAdapter::FAIL. Condition: LIBUSB_SUCCESS "
- "!= libusb_ret");
+ "exit with TransportAdapter::FAIL. Condition: LIBUSB_SUCCESS "
+ "!= libusb_ret");
return TransportAdapter::FAIL;
}
@@ -313,16 +313,15 @@ TransportAdapter::Error UsbHandler::Init() {
if (LIBUSB_SUCCESS != libusb_ret) {
LOGGER_ERROR(logger_,
- "libusb_hotplug_register_callback failed: " << libusb_ret);
+ "libusb_hotplug_register_callback failed: " << libusb_ret);
LOGGER_TRACE(logger_,
- "exit with TransportAdapter::FAIL. Condition: LIBUSB_SUCCESS "
- "!= libusb_ret");
+ "exit with TransportAdapter::FAIL. Condition: LIBUSB_SUCCESS "
+ "!= libusb_ret");
return TransportAdapter::FAIL;
}
if (!thread_->start()) {
- LOGGER_ERROR(logger_,
- "USB device scanner thread start failed, error code");
+ LOGGER_ERROR(logger_, "USB device scanner thread start failed, error code");
LOGGER_TRACE(logger_, "exit with TransportAdapter::FAIL.");
return TransportAdapter::FAIL;
}
@@ -368,7 +367,7 @@ void UsbTransferSequenceCallback(libusb_transfer* transfer) {
void UsbHandler::SubmitControlTransfer(
ControlTransferSequenceState* sequence_state) {
LOGGER_TRACE(logger_,
- "enter. ControlTransferSequenceState* " << sequence_state);
+ "enter. ControlTransferSequenceState* " << sequence_state);
UsbControlTransfer* transfer = sequence_state->CurrentTransfer();
if (NULL == transfer) {
LOGGER_TRACE(logger_, "exit. Condition: NULL == transfer");
@@ -487,15 +486,15 @@ UsbControlTransfer* UsbHandler::ControlTransferSequenceState::Next() {
if (++current_transfer_ == sequence_->transfers().end()) {
Finish();
LOGGER_TRACE(logger_,
- "exit with NULL. Condition: ++current_transfer_ == "
- "sequence_->transfers().end()");
+ "exit with NULL. Condition: ++current_transfer_ == "
+ "sequence_->transfers().end()");
return NULL;
} else {
LOGGER_TRACE(logger_,
- "exit with UsbControlTransfer* "
- << *current_transfer_
- << ".Condition: ++current_transfer_ !== "
- "sequence_->transfers().end()");
+ "exit with UsbControlTransfer* "
+ << *current_transfer_
+ << ".Condition: ++current_transfer_ !== "
+ "sequence_->transfers().end()");
return *current_transfer_;
}
}
diff --git a/src/components/transport_manager/src/usb/qnx/usb_connection.cc b/src/components/transport_manager/src/usb/qnx/usb_connection.cc
index e198e37ab9..3f3725ea65 100644
--- a/src/components/transport_manager/src/usb/qnx/usb_connection.cc
+++ b/src/components/transport_manager/src/usb/qnx/usb_connection.cc
@@ -123,8 +123,8 @@ void UsbConnection::OnInTransfer(usbd_urb* urb) {
error = true;
}
LOGGER_INFO(logger_,
- "USB in transfer, status " << std::hex << status << ", length "
- << std::dec << len);
+ "USB in transfer, status " << std::hex << status << ", length "
+ << std::dec << len);
if (!error) {
switch (status) {
@@ -197,8 +197,8 @@ void UsbConnection::OnOutTransfer(usbd_urb* urb) {
error = true;
}
LOGGER_INFO(logger_,
- "USB out transfer, status " << std::hex << status << ", length "
- << std::dec << len);
+ "USB out transfer, status " << std::hex << status << ", length "
+ << std::dec << len);
if (!error) {
switch (status) {
@@ -332,8 +332,8 @@ bool UsbConnection::OpenEndpoints() {
break;
}
LOGGER_INFO(logger_,
- "USB configuration " << static_cast<int>(
- config_desc->configuration.bConfigurationValue));
+ "USB configuration " << static_cast<int>(
+ config_desc->configuration.bConfigurationValue));
int iface = 0;
usbd_desc_node* iface_desc_node;
while (!found) {
@@ -351,10 +351,10 @@ bool UsbConnection::OpenEndpoints() {
const uint8_t interface_subclass =
iface_desc->interface.bInterfaceSubClass;
LOGGER_INFO(logger_,
- "USB interface number "
- << static_cast<int>(interface_number) << ", subclass "
- << std::hex << static_cast<int>(interface_subclass)
- << std::dec);
+ "USB interface number "
+ << static_cast<int>(interface_number) << ", subclass "
+ << std::hex << static_cast<int>(interface_subclass)
+ << std::dec);
if (interface_subclass != 0xff) {
continue;
}
@@ -371,9 +371,9 @@ bool UsbConnection::OpenEndpoints() {
const uint8_t endpoint_address =
endpoint_desc->endpoint.bEndpointAddress;
LOGGER_INFO(logger_,
- "Endpoint with address "
- << std::hex << static_cast<int>(endpoint_address)
- << std::dec << " found");
+ "Endpoint with address "
+ << std::hex << static_cast<int>(endpoint_address)
+ << std::dec << " found");
if (endpoint_address & USB_ENDPOINT_IN) {
if (NULL == in_endpoint_desc) {
in_endpoint_desc = endpoint_desc;
diff --git a/src/components/transport_manager/src/usb/qnx/usb_handler.cc b/src/components/transport_manager/src/usb/qnx/usb_handler.cc
index 2457d10502..f36a55bdd9 100644
--- a/src/components/transport_manager/src/usb/qnx/usb_handler.cc
+++ b/src/components/transport_manager/src/usb/qnx/usb_handler.cc
@@ -66,14 +66,14 @@ UsbHandler::~UsbHandler() {
const int disconnect_rc = usbd_disconnect(usbd_general_connection_);
if (EOK != disconnect_rc) {
LOGGER_ERROR(logger_,
- "usbd_disconnect failed, error code " << disconnect_rc);
+ "usbd_disconnect failed, error code " << disconnect_rc);
}
}
if (usbd_aoa_connection_) {
const int disconnect_rc = usbd_disconnect(usbd_aoa_connection_);
if (EOK != disconnect_rc) {
LOGGER_ERROR(logger_,
- "usbd_disconnect failed, error code " << disconnect_rc);
+ "usbd_disconnect failed, error code " << disconnect_rc);
}
}
}
@@ -234,11 +234,11 @@ void ArrivedCallback(usbd_connection* connection,
if (kAoaVid == instance->ident.vendor)
return;
LOGGER_INFO(logger_,
- "USB device arrived (path "
- << static_cast<int>(instance->path) << ", devno "
- << static_cast<int>(instance->devno) << ", config "
- << static_cast<int>(instance->config) << ", iface "
- << static_cast<int>(instance->iface) << ")");
+ "USB device arrived (path "
+ << static_cast<int>(instance->path) << ", devno "
+ << static_cast<int>(instance->devno) << ", config "
+ << static_cast<int>(instance->config) << ", iface "
+ << static_cast<int>(instance->iface) << ")");
usb_handler->DeviceArrived(connection, instance);
}
@@ -247,11 +247,11 @@ void ArrivedAoaCallback(usbd_connection* connection,
if (kAoaVid != instance->ident.vendor)
return;
LOGGER_INFO(logger_,
- "USB AOA device arrived (path "
- << static_cast<int>(instance->path) << ", devno "
- << static_cast<int>(instance->devno) << ", config "
- << static_cast<int>(instance->config) << ", iface "
- << static_cast<int>(instance->iface) << ")");
+ "USB AOA device arrived (path "
+ << static_cast<int>(instance->path) << ", devno "
+ << static_cast<int>(instance->devno) << ", config "
+ << static_cast<int>(instance->config) << ", iface "
+ << static_cast<int>(instance->iface) << ")");
usb_handler->DeviceArrived(connection, instance);
}
@@ -260,11 +260,11 @@ void LeftCallback(usbd_connection* connection,
if (kAoaVid == instance->ident.vendor)
return;
LOGGER_INFO(logger_,
- "USB device left (path "
- << static_cast<int>(instance->path) << ", devno "
- << static_cast<int>(instance->devno) << ", config "
- << static_cast<int>(instance->config) << ", iface "
- << static_cast<int>(instance->iface) << ")");
+ "USB device left (path "
+ << static_cast<int>(instance->path) << ", devno "
+ << static_cast<int>(instance->devno) << ", config "
+ << static_cast<int>(instance->config) << ", iface "
+ << static_cast<int>(instance->iface) << ")");
usb_handler->DeviceLeft(instance);
}
@@ -273,11 +273,11 @@ void LeftAoaCallback(usbd_connection* connection,
if (kAoaVid != instance->ident.vendor)
return;
LOGGER_INFO(logger_,
- "USB AOA device left (path "
- << static_cast<int>(instance->path) << ", devno "
- << static_cast<int>(instance->devno) << ", config "
- << static_cast<int>(instance->config) << ", iface "
- << static_cast<int>(instance->iface) << ")");
+ "USB AOA device left (path "
+ << static_cast<int>(instance->path) << ", devno "
+ << static_cast<int>(instance->devno) << ", config "
+ << static_cast<int>(instance->config) << ", iface "
+ << static_cast<int>(instance->iface) << ")");
usb_handler->DeviceLeft(instance);
}
diff --git a/src/components/transport_manager/src/usb/usb_aoa_adapter.cc b/src/components/transport_manager/src/usb/usb_aoa_adapter.cc
index a74eecbdef..ed65894094 100644
--- a/src/components/transport_manager/src/usb/usb_aoa_adapter.cc
+++ b/src/components/transport_manager/src/usb/usb_aoa_adapter.cc
@@ -72,15 +72,15 @@ TransportAdapter::Error UsbAoaAdapter::Init() {
TransportAdapter::Error error = usb_handler_->Init();
if (error != TransportAdapter::OK) {
LOGGER_TRACE(logger_,
- "exit with error "
- << error << ". Condition: error != TransportAdapter::OK");
+ "exit with error "
+ << error << ". Condition: error != TransportAdapter::OK");
return error;
}
error = TransportAdapterImpl::Init();
if (error != TransportAdapter::OK) {
LOGGER_TRACE(logger_,
- "exit with error "
- << error << ". Condition: error != TransportAdapter::OK");
+ "exit with error "
+ << error << ". Condition: error != TransportAdapter::OK");
return error;
}
is_initialised_ = true;
diff --git a/src/components/transport_manager/src/usb/usb_connection_factory.cc b/src/components/transport_manager/src/usb/usb_connection_factory.cc
index d16cff0f47..b82b033dfd 100644
--- a/src/components/transport_manager/src/usb/usb_connection_factory.cc
+++ b/src/components/transport_manager/src/usb/usb_connection_factory.cc
@@ -61,8 +61,8 @@ void UsbConnectionFactory::SetUsbHandler(const UsbHandlerSptr usb_handler) {
TransportAdapter::Error UsbConnectionFactory::CreateConnection(
const DeviceUID& device_uid, const ApplicationHandle& app_handle) {
LOGGER_TRACE(logger_,
- "enter DeviceUID: " << &device_uid
- << ", ApplicationHandle: " << &app_handle);
+ "enter DeviceUID: " << &device_uid
+ << ", ApplicationHandle: " << &app_handle);
DeviceSptr device = controller_->FindDevice(device_uid);
if (!device.valid()) {
LOGGER_ERROR(logger_, "device " << device_uid << " not found");
@@ -84,13 +84,13 @@ TransportAdapter::Error UsbConnectionFactory::CreateConnection(
if (usb_connection->Init()) {
LOGGER_INFO(logger_, "USB connection initialised");
LOGGER_TRACE(logger_,
- "exit with TransportAdapter::OK. Condition: USB connection "
- "initialised");
+ "exit with TransportAdapter::OK. Condition: USB connection "
+ "initialised");
return TransportAdapter::OK;
} else {
LOGGER_TRACE(logger_,
- "exit with TransportAdapter::FAIL. Condition: USB connection "
- "NOT initialised");
+ "exit with TransportAdapter::FAIL. Condition: USB connection "
+ "NOT initialised");
return TransportAdapter::FAIL;
}
}
diff --git a/src/components/transport_manager/src/usb/usb_device_scanner.cc b/src/components/transport_manager/src/usb/usb_device_scanner.cc
index 34add3d985..564abba7eb 100644
--- a/src/components/transport_manager/src/usb/usb_device_scanner.cc
+++ b/src/components/transport_manager/src/usb/usb_device_scanner.cc
@@ -203,12 +203,12 @@ void UsbDeviceScanner::SupportedDeviceFound(PlatformUsbDevice* device) {
devices_.push_back(device);
devices_mutex_.Release();
LOGGER_DEBUG(logger_,
- "USB device (bus number "
- << static_cast<int>(device->bus_number()) << ", address "
- << static_cast<int>(device->address())
- << ") identified as: " << device->GetManufacturer() << ", "
- << device->GetProductName()
- << ", serial: " << device->GetSerialNumber());
+ "USB device (bus number "
+ << static_cast<int>(device->bus_number()) << ", address "
+ << static_cast<int>(device->address())
+ << ") identified as: " << device->GetManufacturer() << ", "
+ << device->GetProductName()
+ << ", serial: " << device->GetSerialNumber());
UpdateList();
}
diff --git a/src/components/utils/src/conditional_variable_posix.cc b/src/components/utils/src/conditional_variable_posix.cc
index 16e9027b25..a7d396d239 100644
--- a/src/components/utils/src/conditional_variable_posix.cc
+++ b/src/components/utils/src/conditional_variable_posix.cc
@@ -52,19 +52,19 @@ ConditionalVariable::ConditionalVariable() {
int initialized = pthread_condattr_init(&attrs);
if (initialized != 0)
LOGGER_ERROR(logger_,
- "Failed to initialize "
- "conditional variable attributes");
+ "Failed to initialize "
+ "conditional variable attributes");
pthread_condattr_setclock(&attrs, CLOCK_MONOTONIC);
initialized = pthread_cond_init(&cond_var_, &attrs);
if (initialized != 0)
LOGGER_ERROR(logger_,
- "Failed to initialize "
- "conditional variable");
+ "Failed to initialize "
+ "conditional variable");
int rv = pthread_condattr_destroy(&attrs);
if (rv != 0)
LOGGER_ERROR(logger_,
- "Failed to destroy "
- "conditional variable attributes");
+ "Failed to destroy "
+ "conditional variable attributes");
}
ConditionalVariable::~ConditionalVariable() {
diff --git a/src/components/utils/src/lock_posix.cc b/src/components/utils/src/lock_posix.cc
index bb78c6f15b..082c6e7422 100644
--- a/src/components/utils/src/lock_posix.cc
+++ b/src/components/utils/src/lock_posix.cc
@@ -69,8 +69,8 @@ Lock::~Lock() {
int32_t status = pthread_mutex_destroy(&mutex_);
if (status != 0) {
LOGGER_ERROR(logger_,
- "Failed to destroy mutex " << &mutex_ << ": "
- << strerror(status));
+ "Failed to destroy mutex " << &mutex_ << ": "
+ << strerror(status));
}
}
@@ -78,8 +78,8 @@ void Lock::Acquire() {
const int32_t status = pthread_mutex_lock(&mutex_);
if (status != 0) {
LOGGER_FATAL(logger_,
- "Failed to acquire mutex " << &mutex_ << ": "
- << strerror(status));
+ "Failed to acquire mutex " << &mutex_ << ": "
+ << strerror(status));
DCHECK(status != 0);
} else {
AssertFreeAndMarkTaken();
@@ -91,8 +91,8 @@ void Lock::Release() {
const int32_t status = pthread_mutex_unlock(&mutex_);
if (status != 0) {
LOGGER_ERROR(logger_,
- "Failed to unlock mutex" << &mutex_ << ": "
- << strerror(status));
+ "Failed to unlock mutex" << &mutex_ << ": "
+ << strerror(status));
}
}
@@ -138,7 +138,7 @@ void Lock::Init(bool is_recursive) {
if (status != 0) {
LOGGER_FATAL(logger_,
- "Failed to initialize mutex. " << std::strerror(status));
+ "Failed to initialize mutex. " << std::strerror(status));
DCHECK(status != 0);
}
}
diff --git a/src/components/utils/src/resource_usage.cc b/src/components/utils/src/resource_usage.cc
index 7e41b1b38d..583f9a7ce3 100644
--- a/src/components/utils/src/resource_usage.cc
+++ b/src/components/utils/src/resource_usage.cc
@@ -157,8 +157,8 @@ bool Resources::GetProcInfo(Resources::PidStats& output) {
int fd = open(GetProcPath().c_str(), O_RDONLY);
if (0 >= fd) {
LOGGER_ERROR(logger_,
- "Failed open process proc file : "
- << GetProcPath() << "; error no : " << strerror(errno));
+ "Failed open process proc file : "
+ << GetProcPath() << "; error no : " << strerror(errno));
close(fd);
return false;
diff --git a/src/components/utils/src/system.cc b/src/components/utils/src/system.cc
index cdf7ae7e19..27e3e55947 100644
--- a/src/components/utils/src/system.cc
+++ b/src/components/utils/src/system.cc
@@ -97,8 +97,8 @@ bool System::Execute(bool wait) {
if (ret == -1) {
LOGGER_ERROR(logger_,
- "Can't execute command: " << command_ << " Errno is: "
- << std::strerror(errno));
+ "Can't execute command: " << command_ << " Errno is: "
+ << std::strerror(errno));
return false;
}
diff --git a/src/components/utils/src/threads/posix_thread.cc b/src/components/utils/src/threads/posix_thread.cc
index a99d3ec7ef..8e6e5eebb0 100644
--- a/src/components/utils/src/threads/posix_thread.cc
+++ b/src/components/utils/src/threads/posix_thread.cc
@@ -93,9 +93,9 @@ void* Thread::threadFunc(void* arg) {
LOGGER_DEBUG(logger_, "Thread #" << pthread_self() << " iteration");
thread->run_cond_.Wait(thread->state_lock_);
LOGGER_DEBUG(logger_,
- "Thread #" << pthread_self() << " execute. "
- << "stopped_ = " << thread->stopped_
- << "; finalized_ = " << thread->finalized_);
+ "Thread #" << pthread_self() << " execute. "
+ << "stopped_ = " << thread->stopped_
+ << "; finalized_ = " << thread->finalized_);
if (!thread->stopped_ && !thread->finalized_) {
thread->isThreadRunning_ = true;
pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
@@ -110,14 +110,13 @@ void* Thread::threadFunc(void* arg) {
}
thread->state_cond_.Broadcast();
LOGGER_DEBUG(logger_,
- "Thread #" << pthread_self() << " finished iteration");
+ "Thread #" << pthread_self() << " finished iteration");
}
thread->state_lock_.Release();
pthread_cleanup_pop(1);
- LOGGER_DEBUG(logger_,
- "Thread #" << pthread_self() << " exited successfully");
+ LOGGER_DEBUG(logger_, "Thread #" << pthread_self() << " exited successfully");
return NULL;
}
@@ -128,9 +127,9 @@ void Thread::SetNameForId(const PlatformThreadHandle& thread_id,
const int rc = pthread_setname_np(thread_id, name.c_str());
if (rc != EOK) {
LOGGER_WARN(logger_,
- "Couldn't set pthread name \"" << name << "\", error code "
- << rc << " (" << strerror(rc)
- << ")");
+ "Couldn't set pthread name \"" << name << "\", error code "
+ << rc << " (" << strerror(rc)
+ << ")");
}
}
@@ -166,15 +165,15 @@ bool Thread::start(const ThreadOptions& options) {
if (!delegate_) {
LOGGER_ERROR(logger_,
- "Cannot start thread " << name_ << ": delegate is NULL");
+ "Cannot start thread " << name_ << ": delegate is NULL");
// 0 - state_lock unlocked
return false;
}
if (isThreadRunning_) {
LOGGER_TRACE(logger_,
- "EXIT thread " << name_ << " #" << handle_
- << " is already running");
+ "EXIT thread " << name_ << " #" << handle_
+ << " is already running");
return true;
}
@@ -184,9 +183,9 @@ bool Thread::start(const ThreadOptions& options) {
int pthread_result = pthread_attr_init(&attributes);
if (pthread_result != EOK) {
LOGGER_WARN(logger_,
- "Couldn't init pthread attributes. Error code = "
- << pthread_result << " (\"" << strerror(pthread_result)
- << "\")");
+ "Couldn't init pthread attributes. Error code = "
+ << pthread_result << " (\"" << strerror(pthread_result)
+ << "\")");
}
if (!thread_options_.is_joinable()) {
@@ -194,9 +193,9 @@ bool Thread::start(const ThreadOptions& options) {
pthread_attr_setdetachstate(&attributes, PTHREAD_CREATE_DETACHED);
if (pthread_result != EOK) {
LOGGER_WARN(logger_,
- "Couldn't set detach state attribute. Error code = "
- << pthread_result << " (\"" << strerror(pthread_result)
- << "\")");
+ "Couldn't set detach state attribute. Error code = "
+ << pthread_result << " (\"" << strerror(pthread_result)
+ << "\")");
thread_options_.is_joinable(false);
}
}
@@ -206,9 +205,9 @@ bool Thread::start(const ThreadOptions& options) {
pthread_result = pthread_attr_setstacksize(&attributes, stack_size);
if (pthread_result != EOK) {
LOGGER_WARN(logger_,
- "Couldn't set stacksize = "
- << stack_size << ". Error code = " << pthread_result
- << " (\"" << strerror(pthread_result) << "\")");
+ "Couldn't set stacksize = "
+ << stack_size << ". Error code = " << pthread_result
+ << " (\"" << strerror(pthread_result) << "\")");
}
} else {
ThreadOptions thread_options_temp(Thread::kMinStackSize,
@@ -228,16 +227,16 @@ bool Thread::start(const ThreadOptions& options) {
thread_created_ = true;
} else {
LOGGER_ERROR(logger_,
- "Couldn't create thread "
- << name_ << ". Error code = " << pthread_result
- << " (\"" << strerror(pthread_result) << "\")");
+ "Couldn't create thread "
+ << name_ << ". Error code = " << pthread_result << " (\""
+ << strerror(pthread_result) << "\")");
}
}
stopped_ = false;
run_cond_.NotifyOne();
LOGGER_DEBUG(logger_,
- "Thread " << name_ << " #" << handle_ << " started."
- << " pthread_result = " << pthread_result);
+ "Thread " << name_ << " #" << handle_ << " started."
+ << " pthread_result = " << pthread_result);
pthread_attr_destroy(&attributes);
return pthread_result == EOK;
}
@@ -253,14 +252,14 @@ void Thread::stop() {
stopped_ = true;
LOGGER_DEBUG(logger_,
- "Stopping thread #" << handle_ << " \"" << name_ << "\"");
+ "Stopping thread #" << handle_ << " \"" << name_ << "\"");
if (delegate_ && isThreadRunning_) {
delegate_->exitThreadMain();
}
LOGGER_DEBUG(logger_,
- "Stopped thread #" << handle_ << " \"" << name_ << " \"");
+ "Stopped thread #" << handle_ << " \"" << name_ << " \"");
}
void Thread::join() {
@@ -274,9 +273,9 @@ void Thread::join() {
if (isThreadRunning_) {
if (!pthread_equal(pthread_self(), handle_)) {
LOGGER_DEBUG(logger_,
- "Waiting for #" << handle_
- << " finished iteration in thread #"
- << pthread_self());
+ "Waiting for #" << handle_
+ << " finished iteration in thread #"
+ << pthread_self());
state_cond_.Wait(auto_lock);
}
}
diff --git a/src/components/utils/src/threads/pulse_thread_delegate.cc b/src/components/utils/src/threads/pulse_thread_delegate.cc
index adbdb78899..cadafd5a60 100644
--- a/src/components/utils/src/threads/pulse_thread_delegate.cc
+++ b/src/components/utils/src/threads/pulse_thread_delegate.cc
@@ -62,7 +62,7 @@ PulseThreadDelegate::PulseThreadDelegate() : run_(false) {
void PulseThreadDelegate::threadMain() {
if (!Init()) {
LOGGER_ERROR(logger_,
- "Failed to initialize thread for QNX channel " << chid_);
+ "Failed to initialize thread for QNX channel " << chid_);
return;
}
while (run_) {
@@ -81,11 +81,11 @@ void PulseThreadDelegate::threadMain() {
} else {
if (run_) {
LOGGER_WARN(logger_,
- "Error occurred while waiting for pulse on QNX channel "
- << chid_);
+ "Error occurred while waiting for pulse on QNX channel "
+ << chid_);
} else {
LOGGER_INFO(logger_,
- "QNX channel " << chid_ << " is apparently destroyed");
+ "QNX channel " << chid_ << " is apparently destroyed");
}
}
}
diff --git a/src/components/utils/src/threads/thread_validator.cc b/src/components/utils/src/threads/thread_validator.cc
index 470785d2a4..428794f8c0 100644
--- a/src/components/utils/src/threads/thread_validator.cc
+++ b/src/components/utils/src/threads/thread_validator.cc
@@ -47,13 +47,13 @@ void SingleThreadSimpleValidator::AssertRunningOnCreationThread() const {
PlatformThreadHandle current_id = Thread::CurrentId();
if (creation_thread_id_ != current_id) {
LOGGER_ERROR(logger_,
- "Single-threaded object created at thread "
- << creation_thread_id_ << " is accessed from thread "
- << current_id
+ "Single-threaded object created at thread "
+ << creation_thread_id_ << " is accessed from thread "
+ << current_id
#ifdef BACKTRACE_SUPPORT
- << "\n" << utils::Backtrace()
+ << "\n" << utils::Backtrace()
#endif
- );
+ );
}
}
@@ -74,13 +74,13 @@ void SingleThreadValidator::AssertRunningOnValidThread() const {
PlatformThreadHandle current_id = Thread::CurrentId();
if (owning_thread_id_ != current_id) {
LOGGER_ERROR(logger_,
- "Single-threaded object owned by thread "
- << owning_thread_id_ << " is accessed from thread "
- << current_id << "\n"
+ "Single-threaded object owned by thread "
+ << owning_thread_id_ << " is accessed from thread "
+ << current_id << "\n"
#ifdef BACKTRACE_SUPPORT
- << utils::Backtrace()
+ << utils::Backtrace()
#endif
- );
+ );
}
}