summaryrefslogtreecommitdiff
path: root/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/put_file_request.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/put_file_request.cc')
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/put_file_request.cc23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/put_file_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/put_file_request.cc
index b418f52fa3..f68596ce27 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/put_file_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/put_file_request.cc
@@ -31,22 +31,22 @@
POSSIBILITY OF SUCH DAMAGE.
*/
-#include <algorithm>
#include "sdl_rpc_plugin/commands/mobile/put_file_request.h"
+#include <algorithm>
-#include "application_manager/policies/policy_handler.h"
#include "application_manager/application_impl.h"
+#include "application_manager/policies/policy_handler.h"
#include "application_manager/rpc_service.h"
-#include "utils/file_system.h"
#include <boost/crc.hpp>
+#include "utils/file_system.h"
namespace {
/**
-* Calculates CRC32 checksum
-* @param binary_data - input data for which CRC32 should be calculated
-* @return calculated CRC32 checksum
-*/
+ * Calculates CRC32 checksum
+ * @param binary_data - input data for which CRC32 should be calculated
+ * @return calculated CRC32 checksum
+ */
uint32_t GetCrc32CheckSum(const std::vector<uint8_t>& binary_data) {
const std::size_t file_size = binary_data.size();
boost::crc_32_type result;
@@ -284,9 +284,7 @@ void PutFileRequest::Run() {
}
SendResponse(true, save_result, "File was downloaded", &response_params);
- if (is_system_file) {
- SendOnPutFileNotification();
- }
+ SendOnPutFileNotification(is_system_file);
break;
}
default:
@@ -297,7 +295,7 @@ void PutFileRequest::Run() {
}
}
-void PutFileRequest::SendOnPutFileNotification() {
+void PutFileRequest::SendOnPutFileNotification(bool is_system_file) {
LOG4CXX_INFO(logger_, "SendOnPutFileNotification");
smart_objects::SmartObjectSPtr notification =
std::make_shared<smart_objects::SmartObject>(
@@ -316,9 +314,10 @@ void PutFileRequest::SendOnPutFileNotification() {
message[strings::msg_params][strings::length] = length_;
message[strings::msg_params][strings::persistent_file] = is_persistent_file_;
message[strings::msg_params][strings::file_type] = file_type_;
+ message[strings::msg_params][strings::is_system_file] = is_system_file;
rpc_service_.ManageHMICommand(notification);
}
} // namespace commands
-} // namespace application_manager
+} // namespace sdl_rpc_plugin