summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormked-luxoft <mked@luxoft.com>2019-08-09 15:08:01 +0300
committerAndriy Byzhynar (GitHub) <AByzhynar@luxoft.com>2019-08-20 21:17:13 +0300
commitaed346ced212261395ccc03dd99f88520b53e56c (patch)
tree48c30eb3f1c19d6af23f5cd07d51a6e79231665c
parentad4463ffebce527d9db7992b0df4c528c530bd92 (diff)
downloadsdl_core-aed346ced212261395ccc03dd99f88520b53e56c.tar.gz
Use window id as int
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_context_notification.cc2
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_window_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_window_request.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_request.cc2
-rw-r--r--src/components/application_manager/src/commands/command_impl.cc4
-rw-r--r--src/components/application_manager/src/message_helper/message_helper.cc2
-rw-r--r--src/components/application_manager/src/state_controller_impl.cc4
7 files changed, 11 insertions, 11 deletions
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_context_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_context_notification.cc
index 56124db96f..bf52492ae1 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_context_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_system_context_notification.cc
@@ -64,7 +64,7 @@ void OnSystemContextNotification::Run() {
WindowID window_id = mobile_apis::PredefinedWindows::DEFAULT_WINDOW;
if ((*message_)[strings::msg_params].keyExists(strings::window_id)) {
- window_id = (*message_)[strings::msg_params][strings::window_id].asUInt();
+ window_id = (*message_)[strings::msg_params][strings::window_id].asInt();
}
ApplicationSharedPtr app;
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_window_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_window_request.cc
index 52a06d7ef2..83406a549d 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_window_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/create_window_request.cc
@@ -99,7 +99,7 @@ void CreateWindowRequest::ApplyWindowInitialState(
mobile_api::SystemContext::INVALID_ENUM);
const WindowID window_id =
- (*message_)[strings::msg_params][strings::window_id].asUInt();
+ (*message_)[strings::msg_params][strings::window_id].asInt();
const std::string window_name =
(*message_)[strings::msg_params][strings::window_name].asString();
@@ -143,7 +143,7 @@ void CreateWindowRequest::Run() {
}
const auto window_id =
- (*message_)[strings::msg_params][strings::window_id].asUInt();
+ (*message_)[strings::msg_params][strings::window_id].asInt();
if (application->WindowIdExists(window_id)) {
LOG4CXX_ERROR(logger_,
"Window with id #" << window_id << " does already exist");
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_window_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_window_request.cc
index 2bfe0465f0..9a943bb9e3 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_window_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/delete_window_request.cc
@@ -56,7 +56,7 @@ DeleteWindowRequest::~DeleteWindowRequest() {}
bool DeleteWindowRequest::CheckWindowId(
app_mngr::ApplicationSharedPtr app) const {
const WindowID window_id =
- (*message_)[strings::msg_params][strings::window_id].asUInt();
+ (*message_)[strings::msg_params][strings::window_id].asInt();
if (mobile_apis::PredefinedWindows::DEFAULT_WINDOW == window_id) {
LOG4CXX_ERROR(logger_, "Main application window can't be deleted");
return false;
@@ -78,7 +78,7 @@ app_mngr::WindowID DeleteWindowRequest::window_id() const {
void DeleteWindowRequest::DeleteWindow(
app_mngr::ApplicationSharedPtr app) const {
const WindowID window_id =
- (*message_)[strings::msg_params][strings::window_id].asUInt();
+ (*message_)[strings::msg_params][strings::window_id].asInt();
app->RemoveWindowInfo(window_id);
app->RemoveHMIState(window_id, HmiState::StateID::STATE_ID_REGULAR);
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_request.cc
index b62a88d7f2..84d11f8e09 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_request.cc
@@ -419,7 +419,7 @@ void ShowRequest::Run() {
if ((*message_)[strings::msg_params].keyExists(strings::window_id)) {
const auto window_id =
- (*message_)[strings::msg_params][strings::window_id].asUInt();
+ (*message_)[strings::msg_params][strings::window_id].asInt();
if (!app->WindowIdExists(window_id)) {
LOG4CXX_ERROR(logger_,
"Window with id #" << window_id << " does not exist");
diff --git a/src/components/application_manager/src/commands/command_impl.cc b/src/components/application_manager/src/commands/command_impl.cc
index 82f19ed89a..8875895cb7 100644
--- a/src/components/application_manager/src/commands/command_impl.cc
+++ b/src/components/application_manager/src/commands/command_impl.cc
@@ -1,4 +1,4 @@
-/*
+/*
Copyright (c) 2014, Ford Motor Company
All rights reserved.
@@ -99,7 +99,7 @@ int32_t CommandImpl::function_id() const {
WindowID CommandImpl::window_id() const {
if ((*message_).keyExists(strings::msg_params)) {
if ((*message_)[strings::msg_params].keyExists(strings::window_id)) {
- return (*message_)[strings::msg_params][strings::window_id].asUInt();
+ return (*message_)[strings::msg_params][strings::window_id].asInt();
}
}
return mobile_apis::PredefinedWindows::DEFAULT_WINDOW;
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 0b1ac9b47a..3639953a3a 100644
--- a/src/components/application_manager/src/message_helper/message_helper.cc
+++ b/src/components/application_manager/src/message_helper/message_helper.cc
@@ -3146,7 +3146,7 @@ WindowID MessageHelper::ExtractWindowIdFromSmartObject(
const smart_objects::SmartObject& s_map) {
if (smart_objects::SmartType_Map == s_map.getType()) {
if (s_map.keyExists(strings::window_id)) {
- return s_map[strings::window_id].asUInt();
+ return s_map[strings::window_id].asInt();
}
}
return mobile_apis::PredefinedWindows::DEFAULT_WINDOW;
diff --git a/src/components/application_manager/src/state_controller_impl.cc b/src/components/application_manager/src/state_controller_impl.cc
index 7b9fc72ef9..8368597370 100644
--- a/src/components/application_manager/src/state_controller_impl.cc
+++ b/src/components/application_manager/src/state_controller_impl.cc
@@ -1087,7 +1087,7 @@ void StateControllerImpl::OnAppActivated(
WindowID window_id = mobile_apis::PredefinedWindows::DEFAULT_WINDOW;
if (message[strings::msg_params].keyExists(strings::window_id)) {
- window_id = message[strings::msg_params][strings::window_id].asUInt();
+ window_id = message[strings::msg_params][strings::window_id].asInt();
}
const auto window_ids = app->GetWindowIds();
@@ -1128,7 +1128,7 @@ void StateControllerImpl::OnAppDeactivated(
WindowID window_id = mobile_apis::PredefinedWindows::DEFAULT_WINDOW;
if (message[strings::msg_params].keyExists(strings::window_id)) {
- window_id = message[strings::msg_params][strings::window_id].asUInt();
+ window_id = message[strings::msg_params][strings::window_id].asInt();
}
const auto window_ids = app->GetWindowIds();