summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbsolonenko <bsolonenko@luxoft.com>2019-03-26 14:34:04 +0200
committermked-luxoft <mked@luxoft.com>2019-08-27 16:28:10 +0300
commit28d400588a32e3e4ad42492b4533e09edbeea5a2 (patch)
treea12b2d0ade56a300f16aed1f70094cd034affba6
parentcbaeca74ab85e1860adbe1e1758d89bbf61632fb (diff)
downloadsdl_core-28d400588a32e3e4ad42492b4533e09edbeea5a2.tar.gz
The permission change notification has been expanded.
-rw-r--r--src/components/application_manager/src/message_helper/message_helper.cc13
-rw-r--r--src/components/application_manager/src/policies/policy_handler.cc5
-rw-r--r--src/components/application_manager/test/include/application_manager/mock_message_helper.h3
-rw-r--r--src/components/application_manager/test/mobile_message_handler_test.cc1
-rw-r--r--src/components/application_manager/test/mobile_message_handler_v1_test.cc14
-rw-r--r--src/components/application_manager/test/mock_message_helper.cc3
-rw-r--r--src/components/application_manager/test/policy_handler_test.cc2
-rw-r--r--src/components/media_manager/test/media_manager_impl_test.cc1
-rw-r--r--src/components/policy/policy_external/include/policy/policy_helper.h7
-rw-r--r--src/components/policy/policy_external/include/policy/policy_types.h3
-rw-r--r--src/components/policy/policy_external/src/policy_helper.cc20
-rw-r--r--src/components/policy/policy_regular/include/policy/policy_helper.h4
-rw-r--r--src/components/policy/policy_regular/include/policy/policy_types.h3
-rw-r--r--src/components/policy/policy_regular/src/policy_helper.cc22
-rw-r--r--src/components/protocol_handler/test/incoming_data_handler_test.cc14
-rw-r--r--src/components/protocol_handler/test/protocol_handler_tm_test.cc24
-rw-r--r--src/components/security_manager/test/security_manager_test.cc6
-rw-r--r--src/components/telemetry_monitor/test/transport_manager_observer_test.cc2
-rw-r--r--src/components/transport_manager/test/transport_adapter_listener_test.cc4
-rw-r--r--src/components/transport_manager/test/transport_adapter_test.cc4
-rw-r--r--src/components/transport_manager/test/transport_manager_impl_test.cc2
21 files changed, 124 insertions, 33 deletions
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 3639953a3a..60edf4350c 100644
--- a/src/components/application_manager/src/message_helper/message_helper.cc
+++ b/src/components/application_manager/src/message_helper/message_helper.cc
@@ -2528,6 +2528,7 @@ void MessageHelper::SendQueryApps(const uint32_t connection_key,
void MessageHelper::SendOnPermissionsChangeNotification(
uint32_t connection_key,
const policy::Permissions& permissions,
+ const policy::EncryptionRequired encryprion_required,
ApplicationManager& app_mngr) {
LOG4CXX_AUTO_TRACE(logger_);
smart_objects::SmartObject content(smart_objects::SmartType_Map);
@@ -2545,8 +2546,10 @@ void MessageHelper::SendOnPermissionsChangeNotification(
content[strings::msg_params] =
smart_objects::SmartObject(smart_objects::SmartType_Map);
- // content[strings::msg_params][strings::app_id] = connection_key;
-
+ if (encryprion_required.is_initialized()) {
+ content[strings::msg_params][strings::requireEncryption] =
+ static_cast<bool>(*encryprion_required);
+ }
content[strings::msg_params]["permissionItem"] =
smart_objects::SmartObject(smart_objects::SmartType_Array);
@@ -2564,10 +2567,14 @@ void MessageHelper::SendOnPermissionsChangeNotification(
smart_objects::SmartObject& permission_item =
permissions_item_array[index_pi];
- // Filling the rpcName of PermissionItem
permission_item["rpcName"] = (*it_permissions).first;
const policy::RpcPermissions& rpc_permissions = (*it_permissions).second;
+ if (rpc_permissions.require_encryption.is_initialized()) {
+ const bool require_encryption = *rpc_permissions.require_encryption;
+ permission_item[strings::requireEncryption] = require_encryption;
+ }
+
// Creating SO for hmiPermissions
permission_item["hmiPermissions"] =
smart_objects::SmartObject(smart_objects::SmartType_Map);
diff --git a/src/components/application_manager/src/policies/policy_handler.cc b/src/components/application_manager/src/policies/policy_handler.cc
index 80a1c80825..95692173a0 100644
--- a/src/components/application_manager/src/policies/policy_handler.cc
+++ b/src/components/application_manager/src/policies/policy_handler.cc
@@ -1436,8 +1436,11 @@ void PolicyHandler::OnPermissionsUpdated(const std::string& device_id,
return;
}
+ const auto require_encryption =
+ policy_manager_->GetAppEncryptionRequired(policy_app_id);
+
MessageHelper::SendOnPermissionsChangeNotification(
- app->app_id(), permissions, application_manager_);
+ app->app_id(), permissions, require_encryption, application_manager_);
LOG4CXX_DEBUG(logger_,
"Notification sent for application_id: "
diff --git a/src/components/application_manager/test/include/application_manager/mock_message_helper.h b/src/components/application_manager/test/include/application_manager/mock_message_helper.h
index 6cbe46f9ec..55a2c67af5 100644
--- a/src/components/application_manager/test/include/application_manager/mock_message_helper.h
+++ b/src/components/application_manager/test/include/application_manager/mock_message_helper.h
@@ -155,9 +155,10 @@ class MockMessageHelper {
uint32_t correlation_id,
ApplicationManager& app_mngr));
#endif // #ifdef EXTERNAL_PROPRIETARY_MODE
- MOCK_METHOD3(SendOnPermissionsChangeNotification,
+ MOCK_METHOD4(SendOnPermissionsChangeNotification,
void(uint32_t connection_key,
const policy::Permissions& permissions,
+ const bool require_encryption,
ApplicationManager& app_mngr));
MOCK_METHOD4(SendPolicySnapshotNotification,
void(uint32_t connection_key,
diff --git a/src/components/application_manager/test/mobile_message_handler_test.cc b/src/components/application_manager/test/mobile_message_handler_test.cc
index cac04d4508..3ae79ce8ce 100644
--- a/src/components/application_manager/test/mobile_message_handler_test.cc
+++ b/src/components/application_manager/test/mobile_message_handler_test.cc
@@ -109,6 +109,7 @@ class MobileMessageHandlerTest : public testing::Test {
protocol_version,
&full_data[0],
full_size,
+ false,
ServiceType::kRpc,
payload_size);
diff --git a/src/components/application_manager/test/mobile_message_handler_v1_test.cc b/src/components/application_manager/test/mobile_message_handler_v1_test.cc
index 7801798705..ab37694c28 100644
--- a/src/components/application_manager/test/mobile_message_handler_v1_test.cc
+++ b/src/components/application_manager/test/mobile_message_handler_v1_test.cc
@@ -69,8 +69,11 @@ const unsigned char* data_v1 =
TEST(MobileMessageHandlerTestV1Test,
HandleIncomingMessageProtocolV1_SendJSONData_ExpectEqual) {
- RawMessagePtr message = std::make_shared<RawMessage>(
- connection_key_p1, protocol_version_1, data_v1, data_json.length());
+ RawMessagePtr message = std::make_shared<RawMessage>(connection_key_p1,
+ protocol_version_1,
+ data_v1,
+ data_json.length(),
+ false);
application_manager::Message* ptr =
MobileMessageHandler::HandleIncomingMessageProtocol(message);
@@ -89,8 +92,11 @@ TEST(MobileMessageHandlerTestV1Test,
const unsigned char* data_v1 =
reinterpret_cast<const unsigned char*>(full_data.c_str());
- RawMessagePtr message = std::make_shared<RawMessage>(
- connection_key_p1, protocol_version_1, data_v1, full_data.length());
+ RawMessagePtr message = std::make_shared<RawMessage>(connection_key_p1,
+ protocol_version_1,
+ data_v1,
+ full_data.length(),
+ false);
application_manager::Message* ptr =
MobileMessageHandler::HandleIncomingMessageProtocol(message);
diff --git a/src/components/application_manager/test/mock_message_helper.cc b/src/components/application_manager/test/mock_message_helper.cc
index cccadc5a9d..0154f7037e 100644
--- a/src/components/application_manager/test/mock_message_helper.cc
+++ b/src/components/application_manager/test/mock_message_helper.cc
@@ -212,9 +212,10 @@ void MessageHelper::SendGetListOfPermissionsResponse(
void MessageHelper::SendOnPermissionsChangeNotification(
uint32_t connection_key,
const policy::Permissions& permissions,
+ const policy::EncryptionRequired require_encryption,
ApplicationManager& app_mngr) {
MockMessageHelper::message_helper_mock()->SendOnPermissionsChangeNotification(
- connection_key, permissions, app_mngr);
+ connection_key, permissions, require_encryption, app_mngr);
}
void MessageHelper::SendPolicySnapshotNotification(
diff --git a/src/components/application_manager/test/policy_handler_test.cc b/src/components/application_manager/test/policy_handler_test.cc
index 60f52a38af..908e7557d2 100644
--- a/src/components/application_manager/test/policy_handler_test.cc
+++ b/src/components/application_manager/test/policy_handler_test.cc
@@ -521,7 +521,7 @@ TEST_F(PolicyHandlerTest, OnPermissionsUpdated_TwoParams_InvalidApp_UNSUCCESS) {
ChangePolicyManagerToMock();
const policy::EncryptionRequired require_encryption;
EXPECT_CALL(*mock_policy_manager_, GetAppEncryptionRequired(kPolicyAppId_))
- .WillOnce(ReturnRef(require_encryption));
+ .Times(0);
EXPECT_CALL(mock_message_helper_,
SendOnPermissionsChangeNotification(_, _, _, _)).Times(0);
diff --git a/src/components/media_manager/test/media_manager_impl_test.cc b/src/components/media_manager/test/media_manager_impl_test.cc
index 9d721fd7cf..747cab4a76 100644
--- a/src/components/media_manager/test/media_manager_impl_test.cc
+++ b/src/components/media_manager/test/media_manager_impl_test.cc
@@ -194,6 +194,7 @@ class MediaManagerImplTest : public ::testing::Test {
kProtocolVersion,
data_sending,
data_sending_size,
+ false,
serviceType));
media_manager_impl_->OnMessageReceived(raw_message_ptr);
media_manager_impl_->OnMobileMessageSent(raw_message_ptr);
diff --git a/src/components/policy/policy_external/include/policy/policy_helper.h b/src/components/policy/policy_external/include/policy/policy_helper.h
index bce2559431..2f05af7e63 100644
--- a/src/components/policy/policy_external/include/policy/policy_helper.h
+++ b/src/components/policy/policy_external/include/policy/policy_helper.h
@@ -307,6 +307,13 @@ struct ProcessFunctionalGroup {
private:
GroupConsent GetGroupState(const std::string& group_name);
+ /*
+ * @brief Fills encryption required flags for all rpcs in functional group
+ * @param encryption_required Optional object containing encryption required
+ * flag
+ */
+ void FillEncryptionFlagForRpcs(
+ const policy::EncryptionRequired encryption_required);
const policy_table::FunctionalGroupings& fg_;
const std::vector<FunctionalGroupPermission>& group_permissions_;
Permissions& data_;
diff --git a/src/components/policy/policy_external/include/policy/policy_types.h b/src/components/policy/policy_external/include/policy/policy_types.h
index 7247995f48..4f486ffcd0 100644
--- a/src/components/policy/policy_external/include/policy/policy_types.h
+++ b/src/components/policy/policy_external/include/policy/policy_types.h
@@ -87,6 +87,8 @@ typedef std::string Parameter;
typedef std::string RpcName;
typedef std::set<std::string> RPCParams;
+typedef rpc::Optional<rpc::Boolean> EncryptionRequired;
+
typedef std::map<std::string, std::set<policy::HMILevel> > HMIPermissions;
struct ParameterPermissions
: std::map<std::string, std::set<policy::Parameter> > {
@@ -102,6 +104,7 @@ struct ParameterPermissions
struct RpcPermissions {
HMIPermissions hmi_permissions;
ParameterPermissions parameter_permissions;
+ EncryptionRequired require_encryption;
};
typedef std::map<RpcName, RpcPermissions> Permissions;
diff --git a/src/components/policy/policy_external/src/policy_helper.cc b/src/components/policy/policy_external/src/policy_helper.cc
index e8855bb11a..f81ce75d4c 100644
--- a/src/components/policy/policy_external/src/policy_helper.cc
+++ b/src/components/policy/policy_external/src/policy_helper.cc
@@ -841,10 +841,30 @@ bool ProcessFunctionalGroup::operator()(const StringsValueType& group_name) {
undefined_group_consent_,
does_require_user_consent);
std::for_each(rpcs.begin(), rpcs.end(), filler);
+ const auto encryption_required = (*it).second.encryption_required;
+ FillEncryptionFlagForRpcs(encryption_required);
}
return true;
}
+void ProcessFunctionalGroup::FillEncryptionFlagForRpcs(
+ const EncryptionRequired encryption_required) {
+ auto update_encryption_required =
+ [](EncryptionRequired& current, const EncryptionRequired& incoming) {
+ if (!incoming.is_initialized()) {
+ return;
+ }
+ if (current.is_initialized() && *current) {
+ return;
+ }
+ current = incoming;
+ };
+ for (auto& item : data_) {
+ update_encryption_required(item.second.require_encryption,
+ encryption_required);
+ }
+}
+
GroupConsent ProcessFunctionalGroup::GetGroupState(
const std::string& group_name) {
std::vector<FunctionalGroupPermission>::const_iterator it =
diff --git a/src/components/policy/policy_regular/include/policy/policy_helper.h b/src/components/policy/policy_regular/include/policy/policy_helper.h
index 4c697858f5..887493f415 100644
--- a/src/components/policy/policy_regular/include/policy/policy_helper.h
+++ b/src/components/policy/policy_regular/include/policy/policy_helper.h
@@ -1,4 +1,4 @@
-/*
+/*
Copyright (c) 2013, Ford Motor Company
All rights reserved.
@@ -174,6 +174,8 @@ struct ProcessFunctionalGroup {
private:
GroupConsent GetGroupState(const std::string& group_name);
+ void FillEncryptionFlagForRpcs(
+ const policy::EncryptionRequired encryption_required);
const policy_table::FunctionalGroupings& fg_;
const std::vector<FunctionalGroupPermission>& group_permissions_;
Permissions& data_;
diff --git a/src/components/policy/policy_regular/include/policy/policy_types.h b/src/components/policy/policy_regular/include/policy/policy_types.h
index 0be5919126..e08d6d503e 100644
--- a/src/components/policy/policy_regular/include/policy/policy_types.h
+++ b/src/components/policy/policy_regular/include/policy/policy_types.h
@@ -77,6 +77,8 @@ enum PolicyTableStatus {
StatusUnknown
};
+typedef rpc::Optional<rpc::Boolean> EncryptionRequired;
+
// Code generator uses String class name, so this typedef was renamed to PTSring
typedef std::string PTString;
typedef std::vector<uint8_t> BinaryMessage;
@@ -102,6 +104,7 @@ struct ParameterPermissions
struct RpcPermissions {
HMIPermissions hmi_permissions;
ParameterPermissions parameter_permissions;
+ EncryptionRequired require_encryption;
};
typedef std::map<RpcName, RpcPermissions> Permissions;
diff --git a/src/components/policy/policy_regular/src/policy_helper.cc b/src/components/policy/policy_regular/src/policy_helper.cc
index 26e4984e6d..e0215ee3ef 100644
--- a/src/components/policy/policy_regular/src/policy_helper.cc
+++ b/src/components/policy/policy_regular/src/policy_helper.cc
@@ -1,4 +1,4 @@
-/*
+/*
Copyright (c) 2013, Ford Motor Company
All rights reserved.
@@ -728,10 +728,30 @@ bool ProcessFunctionalGroup::operator()(const StringsValueType& group_name) {
FillNotificationData filler(
data_, GetGroupState(group_name_str), undefined_group_consent_);
std::for_each(rpcs.begin(), rpcs.end(), filler);
+ FillEncryptionFlagForRpcs((*it).second.encryption_required);
}
return true;
}
+void ProcessFunctionalGroup::FillEncryptionFlagForRpcs(
+ const EncryptionRequired encryption_required) {
+ auto update_encryption_required =
+ [](EncryptionRequired& current, const EncryptionRequired& incoming) {
+ if (!incoming.is_initialized()) {
+ return;
+ }
+ if (current.is_initialized() && *current) {
+ return;
+ }
+ current = incoming;
+ };
+
+ for (auto& item : data_) {
+ update_encryption_required(item.second.require_encryption,
+ encryption_required);
+ }
+}
+
GroupConsent ProcessFunctionalGroup::GetGroupState(
const std::string& group_name) {
std::vector<FunctionalGroupPermission>::const_iterator it =
diff --git a/src/components/protocol_handler/test/incoming_data_handler_test.cc b/src/components/protocol_handler/test/incoming_data_handler_test.cc
index fff102dde9..a187fe6cb5 100644
--- a/src/components/protocol_handler/test/incoming_data_handler_test.cc
+++ b/src/components/protocol_handler/test/incoming_data_handler_test.cc
@@ -68,8 +68,10 @@ class IncomingDataHandlerTest : public ::testing::Test {
void ProcessData(transport_manager::ConnectionUID uid,
const uint8_t* const data,
const uint32_t data_size) {
- actual_frames = data_handler.ProcessData(
- RawMessage(uid, 0, data, data_size), &result_code, &malformed_occurs);
+ actual_frames =
+ data_handler.ProcessData(RawMessage(uid, 0, data, data_size, false),
+ &result_code,
+ &malformed_occurs);
}
void AppendPacketToTMData(const ProtocolPacket& packet) {
@@ -117,15 +119,17 @@ TEST_F(IncomingDataHandlerTest, NullData) {
TEST_F(IncomingDataHandlerTest, DataForUnknownConnection) {
size_t malformed_count = 0;
- actual_frames = data_handler.ProcessData(
- RawMessage(uid_unknown, 0, NULL, 0), &result_code, &malformed_count);
+ actual_frames =
+ data_handler.ProcessData(RawMessage(uid_unknown, 0, NULL, 0, false),
+ &result_code,
+ &malformed_count);
EXPECT_EQ(RESULT_FAIL, result_code);
EXPECT_EQ(malformed_count, 0u);
EXPECT_TRUE(actual_frames.empty());
AppendPacketToTMData(ProtocolPacket());
actual_frames = data_handler.ProcessData(
- RawMessage(uid_unknown, 0, tm_data.data(), tm_data.size()),
+ RawMessage(uid_unknown, 0, tm_data.data(), tm_data.size(), false),
&result_code,
&malformed_count);
EXPECT_EQ(RESULT_FAIL, result_code);
diff --git a/src/components/protocol_handler/test/protocol_handler_tm_test.cc b/src/components/protocol_handler/test/protocol_handler_tm_test.cc
index e23223c2c8..d22cf13270 100644
--- a/src/components/protocol_handler/test/protocol_handler_tm_test.cc
+++ b/src/components/protocol_handler/test/protocol_handler_tm_test.cc
@@ -3662,8 +3662,12 @@ TEST_F(ProtocolHandlerImplTest,
const bool is_final = true;
const uint32_t total_data_size = 1;
UCharDataVector data(total_data_size);
- RawMessagePtr message = std::make_shared<RawMessage>(
- connection_key, PROTOCOL_VERSION_3, &data[0], total_data_size, kControl);
+ RawMessagePtr message = std::make_shared<RawMessage>(connection_key,
+ PROTOCOL_VERSION_3,
+ &data[0],
+ total_data_size,
+ false,
+ kControl);
// Expect getting pair from key from session observer
EXPECT_CALL(session_observer_mock,
PairFromKey(message->connection_key(), _, _))
@@ -3700,8 +3704,12 @@ TEST_F(ProtocolHandlerImplTest,
const bool is_final = true;
const uint32_t total_data_size = 1;
UCharDataVector data(total_data_size);
- RawMessagePtr message = std::make_shared<RawMessage>(
- connection_key, PROTOCOL_VERSION_3, &data[0], total_data_size, kRpc);
+ RawMessagePtr message = std::make_shared<RawMessage>(connection_key,
+ PROTOCOL_VERSION_3,
+ &data[0],
+ total_data_size,
+ false,
+ kRpc);
// Expect getting pair from key from session observer
EXPECT_CALL(session_observer_mock,
PairFromKey(message->connection_key(), _, _))
@@ -3743,8 +3751,12 @@ TEST_F(ProtocolHandlerImplTest, SendMessageToMobileApp_SendMultiframeMessage) {
const uint32_t total_data_size = MAXIMUM_FRAME_DATA_V2_SIZE * 2;
UCharDataVector data(total_data_size);
const uint8_t first_consecutive_frame = 0x01;
- RawMessagePtr message = std::make_shared<RawMessage>(
- connection_key, PROTOCOL_VERSION_3, &data[0], total_data_size, kBulk);
+ RawMessagePtr message = std::make_shared<RawMessage>(connection_key,
+ PROTOCOL_VERSION_3,
+ &data[0],
+ total_data_size,
+ false,
+ kBulk);
// Expect getting pair from key from session observer
EXPECT_CALL(session_observer_mock,
PairFromKey(message->connection_key(), _, _))
diff --git a/src/components/security_manager/test/security_manager_test.cc b/src/components/security_manager/test/security_manager_test.cc
index 21af54f67b..3b4100ea76 100644
--- a/src/components/security_manager/test/security_manager_test.cc
+++ b/src/components/security_manager/test/security_manager_test.cc
@@ -122,7 +122,7 @@ class SecurityManagerTest : public ::testing::Test {
uint32_t dataSize,
const ServiceType serviceType) {
const RawMessagePtr rawMessagePtr(std::make_shared<RawMessage>(
- kKey, kProtocolVersion, data, dataSize, serviceType));
+ kKey, kProtocolVersion, data, dataSize, false, serviceType));
security_manager_->OnMessageReceived(rawMessagePtr);
}
/*
@@ -307,8 +307,8 @@ TEST_F(SecurityManagerTest, SecurityManager_NULLCryptoManager) {
*/
TEST_F(SecurityManagerTest, OnMobileMessageSent) {
const uint8_t* data_param = NULL;
- const RawMessagePtr rawMessagePtr(
- std::make_shared<RawMessage>(kKey, kProtocolVersion, data_param, 0));
+ const RawMessagePtr rawMessagePtr(std::make_shared<RawMessage>(
+ kKey, kProtocolVersion, data_param, 0, false));
security_manager_->OnMobileMessageSent(rawMessagePtr);
}
/*
diff --git a/src/components/telemetry_monitor/test/transport_manager_observer_test.cc b/src/components/telemetry_monitor/test/transport_manager_observer_test.cc
index 57834339d6..c0501ac45e 100644
--- a/src/components/telemetry_monitor/test/transport_manager_observer_test.cc
+++ b/src/components/telemetry_monitor/test/transport_manager_observer_test.cc
@@ -47,7 +47,7 @@ TEST(TransportManagerObserverTest, MessageProcess) {
MockTelemetryMonitor mock_telemetry_monitor;
TransportManagerObserver tr_observer(&mock_telemetry_monitor);
protocol_handler::RawMessage* ptr =
- new ::protocol_handler::RawMessage(0, 0, NULL, 0);
+ new ::protocol_handler::RawMessage(0, 0, NULL, 0, false);
tr_observer.StartRawMsg(ptr);
EXPECT_CALL(mock_telemetry_monitor, SendMetric(_));
tr_observer.StopRawMsg(ptr);
diff --git a/src/components/transport_manager/test/transport_adapter_listener_test.cc b/src/components/transport_manager/test/transport_adapter_listener_test.cc
index 0813448e91..9f18d5bc13 100644
--- a/src/components/transport_manager/test/transport_adapter_listener_test.cc
+++ b/src/components/transport_manager/test/transport_adapter_listener_test.cc
@@ -130,7 +130,7 @@ TEST_F(TransportAdapterListenerTest, OnDataReceiveFailed) {
TEST_F(TransportAdapterListenerTest, OnDataSendDone) {
unsigned char data[3] = {0x20, 0x07, 0x01};
::protocol_handler::RawMessagePtr data_container =
- std::make_shared< ::protocol_handler::RawMessage>(1, 1, data, 3);
+ std::make_shared< ::protocol_handler::RawMessage>(1, 1, data, 3, false);
EXPECT_CALL(tr_mock,
ReceiveEventFromDevice(IsEvent(EventTypeEnum::ON_SEND_DONE,
@@ -146,7 +146,7 @@ TEST_F(TransportAdapterListenerTest, OnDataSendDone) {
TEST_F(TransportAdapterListenerTest, OnDataSendFailed) {
unsigned char data[3] = {0x20, 0x07, 0x01};
::protocol_handler::RawMessagePtr data_container =
- std::make_shared< ::protocol_handler::RawMessage>(1, 1, data, 3);
+ std::make_shared< ::protocol_handler::RawMessage>(1, 1, data, 3, false);
DataSendError err;
EXPECT_CALL(tr_mock,
diff --git a/src/components/transport_manager/test/transport_adapter_test.cc b/src/components/transport_manager/test/transport_adapter_test.cc
index 56386db201..aa41c0bc6d 100644
--- a/src/components/transport_manager/test/transport_adapter_test.cc
+++ b/src/components/transport_manager/test/transport_adapter_test.cc
@@ -969,7 +969,7 @@ TEST_F(TransportAdapterTest, SendData) {
const unsigned int kSize = 3;
unsigned char data[kSize] = {0x20, 0x07, 0x01};
const RawMessagePtr kMessage =
- std::make_shared<RawMessage>(1, 1, data, kSize);
+ std::make_shared<RawMessage>(1, 1, data, kSize, false);
EXPECT_CALL(*mock_connection, SendData(kMessage))
.WillOnce(Return(TransportAdapter::OK));
@@ -1009,7 +1009,7 @@ TEST_F(TransportAdapterTest, SendData_ConnectionNotEstablished) {
const unsigned int kSize = 3;
unsigned char data[kSize] = {0x20, 0x07, 0x01};
const RawMessagePtr kMessage =
- std::make_shared<RawMessage>(1, 1, data, kSize);
+ std::make_shared<RawMessage>(1, 1, data, kSize, false);
EXPECT_CALL(*mock_connection, SendData(kMessage)).Times(0);
res = transport_adapter.SendData(dev_id, app_handle, kMessage);
diff --git a/src/components/transport_manager/test/transport_manager_impl_test.cc b/src/components/transport_manager/test/transport_manager_impl_test.cc
index 3c3e336d0a..6411352ac9 100644
--- a/src/components/transport_manager/test/transport_manager_impl_test.cc
+++ b/src/components/transport_manager/test/transport_manager_impl_test.cc
@@ -101,7 +101,7 @@ class TransportManagerImplTest : public ::testing::Test {
unsigned char data[kSize] = {
0x20, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
test_message_ = std::make_shared<RawMessage>(
- connection_key_, version_protocol_, data, kSize);
+ connection_key_, version_protocol_, data, kSize, false);
}
DeviceInfo ConstructDeviceInfo(const std::string& mac_address,