summaryrefslogtreecommitdiff
path: root/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subscribe_button_request.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subscribe_button_request.cc')
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subscribe_button_request.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subscribe_button_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subscribe_button_request.cc
index 3797913f5b..42cb3c60c9 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subscribe_button_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/subscribe_button_request.cc
@@ -41,6 +41,8 @@ namespace commands {
namespace str = strings;
+SDL_CREATE_LOG_VARIABLE("Commands")
+
SubscribeButtonRequest::SubscribeButtonRequest(
const application_manager::commands::MessageSharedPtr& message,
ApplicationManager& application_manager,
@@ -56,12 +58,12 @@ SubscribeButtonRequest::SubscribeButtonRequest(
SubscribeButtonRequest::~SubscribeButtonRequest() {}
void SubscribeButtonRequest::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ SDL_LOG_AUTO_TRACE();
ApplicationSharedPtr app = application_manager_.application(connection_key());
if (!app) {
- LOG4CXX_ERROR(logger_, "APPLICATION_NOT_REGISTERED");
+ SDL_LOG_ERROR("APPLICATION_NOT_REGISTERED");
SendResponse(false, mobile_apis::Result::APPLICATION_NOT_REGISTERED);
return;
}
@@ -71,8 +73,7 @@ void SubscribeButtonRequest::Run() {
(*message_)[str::msg_params][str::button_name].asInt());
if (!IsSubscriptionAllowed(app, btn_id)) {
- LOG4CXX_ERROR(logger_,
- "Subscribe on button " << btn_id << " isn't allowed");
+ SDL_LOG_ERROR("Subscribe on button " << btn_id << " isn't allowed");
SendResponse(false, mobile_apis::Result::REJECTED);
return;
}
@@ -83,23 +84,22 @@ void SubscribeButtonRequest::Run() {
bool play_pause_supported =
CheckHMICapabilities(mobile_apis::ButtonName::PLAY_PAUSE);
if (play_pause_supported) {
- LOG4CXX_DEBUG(logger_, "Converting Legacy OK button to PLAY_PAUSE");
+ SDL_LOG_DEBUG("Converting Legacy OK button to PLAY_PAUSE");
btn_id = mobile_apis::ButtonName::PLAY_PAUSE;
(*message_)[str::msg_params][str::button_name] = btn_id;
} else if (!ok_supported) {
- LOG4CXX_ERROR(logger_, "OK button isn't allowed by HMI capabilities");
+ SDL_LOG_ERROR("OK button isn't allowed by HMI capabilities");
SendResponse(false, mobile_apis::Result::UNSUPPORTED_RESOURCE);
}
} else if (!CheckHMICapabilities(btn_id)) {
- LOG4CXX_ERROR(logger_,
- "Subscribe on button "
- << btn_id << " isn't allowed by HMI capabilities");
+ SDL_LOG_ERROR("Subscribe on button "
+ << btn_id << " isn't allowed by HMI capabilities");
SendResponse(false, mobile_apis::Result::UNSUPPORTED_RESOURCE);
return;
}
if (app->IsSubscribedToButton(btn_id)) {
- LOG4CXX_ERROR(logger_, "Already subscribed to button " << btn_id);
+ SDL_LOG_ERROR("Already subscribed to button " << btn_id);
SendResponse(false, mobile_apis::Result::IGNORED);
return;
}