diff options
18 files changed, 65 insertions, 40 deletions
diff --git a/src/components/application_manager/src/application_manager_impl.cc b/src/components/application_manager/src/application_manager_impl.cc index 72896c289e..e6f0db0c0d 100644 --- a/src/components/application_manager/src/application_manager_impl.cc +++ b/src/components/application_manager/src/application_manager_impl.cc @@ -2286,10 +2286,12 @@ MessageValidationResult ApplicationManagerImpl::ValidateMessageBySchema( const Message& message) { LOG4CXX_AUTO_TRACE(logger_); smart_objects::SmartObject so; + using namespace protocol_handler; switch (message.protocol_version()) { - case ProtocolVersion::kV4: - case ProtocolVersion::kV3: - case ProtocolVersion::kV2: { + case MajorProtocolVersion::PROTOCOL_VERSION_5: + case MajorProtocolVersion::PROTOCOL_VERSION_4: + case MajorProtocolVersion::PROTOCOL_VERSION_3: + case MajorProtocolVersion::PROTOCOL_VERSION_2: { const bool conversion_result = formatters::CFormatterJsonSDLRPCv2::fromString( message.json_message(), @@ -2310,7 +2312,7 @@ MessageValidationResult ApplicationManagerImpl::ValidateMessageBySchema( } break; } - case ProtocolVersion::kHMI: { + case MajorProtocolVersion::PROTOCOL_VERSION_HMI: { const int32_t conversion_result = formatters::FormatterJsonRpc:: FromString<hmi_apis::FunctionID::eType, hmi_apis::messageType::eType>( message.json_message(), so); diff --git a/src/components/application_manager/src/message.cc b/src/components/application_manager/src/message.cc index 1094d7cf8c..537bd8f348 100644 --- a/src/components/application_manager/src/message.cc +++ b/src/components/application_manager/src/message.cc @@ -76,7 +76,8 @@ Message::Message(const Message& message) , binary_data_(NULL) , data_size_(0) , payload_size_(0) - , version_(kUnknownProtocol) { + , version_( + protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_UNKNOWN) { *this = message; } @@ -146,7 +147,7 @@ MessageType Message::type() const { return type_; } -ProtocolVersion Message::protocol_version() const { +protocol_handler::MajorProtocolVersion Message::protocol_version() const { return version_; } @@ -209,7 +210,8 @@ void Message::set_json_message(const std::string& json_message) { json_message_ = json_message; } -void Message::set_protocol_version(ProtocolVersion version) { +void Message::set_protocol_version( + protocol_handler::MajorProtocolVersion version) { version_ = version; } diff --git a/src/components/application_manager/test/commands/mobile/list_files_request_test.cc b/src/components/application_manager/test/commands/mobile/list_files_request_test.cc index 85377054ef..19accbd125 100644 --- a/src/components/application_manager/test/commands/mobile/list_files_request_test.cc +++ b/src/components/application_manager/test/commands/mobile/list_files_request_test.cc @@ -104,7 +104,8 @@ TEST_F(ListFilesRequestTest, Run_TooManyHmiNone_UNSUCCESS) { TEST_F(ListFilesRequestTest, Run_SUCCESS) { MockAppPtr app(CreateMockApp()); SharedPtr<ListFilesRequest> command(CreateCommand<ListFilesRequest>()); - + EXPECT_CALL(app_mngr_, get_settings()) + .WillOnce(ReturnRef(app_mngr_settings_)); ON_CALL(app_mngr_, application(_)).WillByDefault(Return(app)); ON_CALL(*app, hmi_level()) .WillByDefault(Return(mobile_apis::HMILevel::HMI_FULL)); diff --git a/src/components/functional_module/src/plugin_manager.cc b/src/components/functional_module/src/plugin_manager.cc index ab3b0bda05..53c31471fc 100644 --- a/src/components/functional_module/src/plugin_manager.cc +++ b/src/components/functional_module/src/plugin_manager.cc @@ -34,6 +34,7 @@ #include <algorithm> #include "functional_module/plugin_manager.h" #include "functional_module/function_ids.h" +#include "protocol/common.h" #include "utils/file_system.h" #include "utils/logger.h" #include "json/json.h" @@ -146,9 +147,10 @@ void PluginManager::ProcessMessage(application_manager::MessagePtr msg) { LOG4CXX_ERROR(logger_, "Null pointer message was received."); return; } - if (application_manager::ProtocolVersion::kUnknownProtocol != + if (protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_UNKNOWN != msg->protocol_version() && - application_manager::ProtocolVersion::kHMI != msg->protocol_version()) { + protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_HMI != + msg->protocol_version()) { PluginFunctionsIterator subscribed_plugin_itr = mobile_subscribers_.find(static_cast<RCFunctionID>(msg->function_id())); if (mobile_subscribers_.end() != subscribed_plugin_itr) { @@ -198,7 +200,8 @@ ProcessResult PluginManager::ProcessHMIMessage( Json::Reader reader; reader.parse(msg->json_message(), value); - if (application_manager::ProtocolVersion::kHMI == msg->protocol_version()) { + if (protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_HMI == + msg->protocol_version()) { const std::string& msg_method = ExtractMethodName(value); if (msg_method.empty()) { return ProcessResult::CANNOT_PROCESS; @@ -219,9 +222,10 @@ bool PluginManager::IsMessageForPlugin(application_manager::MessagePtr msg) { LOG4CXX_ERROR(logger_, "Null pointer message was received."); return false; } - if (application_manager::ProtocolVersion::kUnknownProtocol != + if (protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_UNKNOWN != msg->protocol_version() && - application_manager::ProtocolVersion::kHMI != msg->protocol_version()) { + protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_HMI != + msg->protocol_version()) { RCFunctionID id = static_cast<RCFunctionID>(msg->function_id()); return (mobile_subscribers_.find(id) != mobile_subscribers_.end()); } else { @@ -239,7 +243,8 @@ bool PluginManager::IsHMIMessageForPlugin(application_manager::MessagePtr msg) { Json::Value value; Json::Reader reader; reader.parse(msg->json_message(), value); - if (application_manager::ProtocolVersion::kHMI == msg->protocol_version()) { + if (protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_HMI == + msg->protocol_version()) { std::string msg_method; // Request or notification from HMI if (value.isMember("method") && value["method"].isString()) { diff --git a/src/components/functional_module/test/src/plugin_manager_test.cc b/src/components/functional_module/test/src/plugin_manager_test.cc index 09a44ceb58..0868c66323 100644 --- a/src/components/functional_module/test/src/plugin_manager_test.cc +++ b/src/components/functional_module/test/src/plugin_manager_test.cc @@ -8,7 +8,7 @@ #include "utils/make_shared.h" using application_manager::Message; -using application_manager::ProtocolVersion; +using protocol_handler::MajorProtocolVersion; using application_manager::MockService; using ::testing::NiceMock; using ::testing::Expectation; @@ -46,14 +46,14 @@ TEST_F(PluginManagerTest, ChangePluginsState) { TEST_F(PluginManagerTest, IsMessageForPluginFail) { Message* msg = new Message(protocol_handler::MessagePriority::FromServiceType( protocol_handler::ServiceType::kRpc)); - msg->set_protocol_version(ProtocolVersion::kUnknownProtocol); + msg->set_protocol_version(MajorProtocolVersion::PROTOCOL_VERSION_UNKNOWN); EXPECT_FALSE(manager->IsMessageForPlugin(msg)); } TEST_F(PluginManagerTest, IsMessageForPluginPass) { Message* msg = new Message(protocol_handler::MessagePriority::FromServiceType( protocol_handler::ServiceType::kRpc)); - msg->set_protocol_version(ProtocolVersion::kV3); + msg->set_protocol_version(MajorProtocolVersion::PROTOCOL_VERSION_3); msg->set_function_id(101); // see MockGenericModule EXPECT_TRUE(manager->IsMessageForPlugin(msg)); } @@ -61,14 +61,14 @@ TEST_F(PluginManagerTest, IsMessageForPluginPass) { TEST_F(PluginManagerTest, IsHMIMessageForPluginFail) { Message* msg = new Message(protocol_handler::MessagePriority::FromServiceType( protocol_handler::ServiceType::kRpc)); - msg->set_protocol_version(ProtocolVersion::kUnknownProtocol); + msg->set_protocol_version(MajorProtocolVersion::PROTOCOL_VERSION_UNKNOWN); EXPECT_FALSE(manager->IsHMIMessageForPlugin(msg)); } TEST_F(PluginManagerTest, IsHMIMessageForPluginPass) { Message* msg = new Message(protocol_handler::MessagePriority::FromServiceType( protocol_handler::ServiceType::kRpc)); - msg->set_protocol_version(ProtocolVersion::kHMI); + msg->set_protocol_version(MajorProtocolVersion::PROTOCOL_VERSION_HMI); std::string json = "{\"method\": \"HMI-Func-1\"}"; // see MockGenericModule msg->set_json_message(json); EXPECT_TRUE(manager->IsHMIMessageForPlugin(msg)); @@ -84,7 +84,7 @@ TEST_F(PluginManagerTest, ProcessMessageFail) { Message* msg = new Message(protocol_handler::MessagePriority::FromServiceType( protocol_handler::ServiceType::kRpc)); application_manager::MessagePtr message(msg); - msg->set_protocol_version(ProtocolVersion::kUnknownProtocol); + msg->set_protocol_version(MajorProtocolVersion::PROTOCOL_VERSION_UNKNOWN); EXPECT_CALL(*module, ProcessMessage(message)).Times(0); manager->ProcessMessage(message); } @@ -93,7 +93,7 @@ TEST_F(PluginManagerTest, ProcessMessagePass) { Message* msg = new Message(protocol_handler::MessagePriority::FromServiceType( protocol_handler::ServiceType::kRpc)); application_manager::MessagePtr message(msg); - msg->set_protocol_version(ProtocolVersion::kV3); + msg->set_protocol_version(MajorProtocolVersion::PROTOCOL_VERSION_3); msg->set_function_id(101); // see MockGenericModule EXPECT_CALL(*module, ProcessMessage(message)) .Times(1) @@ -105,7 +105,7 @@ TEST_F(PluginManagerTest, ProcessHMIMessageFail) { Message* msg = new Message(protocol_handler::MessagePriority::FromServiceType( protocol_handler::ServiceType::kRpc)); application_manager::MessagePtr message(msg); - message->set_protocol_version(ProtocolVersion::kUnknownProtocol); + message->set_protocol_version(MajorProtocolVersion::PROTOCOL_VERSION_UNKNOWN); EXPECT_CALL(*module, ProcessHMIMessage(message)).Times(0); manager->ProcessHMIMessage(message); } @@ -114,7 +114,7 @@ TEST_F(PluginManagerTest, ProcessHMIMessagePass) { Message* msg = new Message(protocol_handler::MessagePriority::FromServiceType( protocol_handler::ServiceType::kRpc)); application_manager::MessagePtr message(msg); - message->set_protocol_version(ProtocolVersion::kHMI); + message->set_protocol_version(MajorProtocolVersion::PROTOCOL_VERSION_HMI); std::string json = "{\"method\": \"HMI-Func-1\"}"; // see MockGenericModule message->set_json_message(json); EXPECT_CALL(*module, ProcessHMIMessage(message)) diff --git a/src/components/interfaces/HMI_API.xml b/src/components/interfaces/HMI_API.xml index 087ec60cf3..a361262efa 100644 --- a/src/components/interfaces/HMI_API.xml +++ b/src/components/interfaces/HMI_API.xml @@ -63,6 +63,7 @@ <element name="USER_DISALLOWED" value="23"/> <element name="TRUNCATED_DATA" value="24"/> <element name="SAVED" value="25"/> + <element name="READ_ONLY" value="26"/> </enum> <enum name="TransportType"> diff --git a/src/components/protocol_handler/test/protocol_packet_test.cc b/src/components/protocol_handler/test/protocol_packet_test.cc index 60a984c17f..71c7726243 100644 --- a/src/components/protocol_handler/test/protocol_packet_test.cc +++ b/src/components/protocol_handler/test/protocol_packet_test.cc @@ -125,8 +125,9 @@ TEST_F(ProtocolPacketTest, SerializePacketWithDiffServiceType) { for (size_t i = 0; i < serv_types.size(); ++i) { RawMessagePtr res = GetRawMessage(PROTOCOL_VERSION_3, FRAME_TYPE_CONTROL, serv_types[i]); - EXPECT_EQ(static_cast<uint32_t>(PROTOCOL_VERSION_3), - res->protocol_version()); + EXPECT_EQ(PROTOCOL_VERSION_3, + static_cast< ::protocol_handler::MajorProtocolVersion>( + res->protocol_version())); EXPECT_EQ(serv_types[i], res->service_type()); EXPECT_EQ(PROTOCOL_HEADER_V2_SIZE, res->data_size()); } @@ -147,8 +148,9 @@ TEST_F(ProtocolPacketTest, SerializePacketWithWrongServiceType) { for (size_t i = 0; i < serv_types.size(); ++i) { RawMessagePtr res = GetRawMessage(PROTOCOL_VERSION_3, FRAME_TYPE_CONTROL, serv_types[i]); - EXPECT_EQ(static_cast<uint32_t>(PROTOCOL_VERSION_3), - res->protocol_version()); + EXPECT_EQ(PROTOCOL_VERSION_3, + static_cast< ::protocol_handler::MajorProtocolVersion>( + res->protocol_version())); EXPECT_EQ(kInvalidServiceType, res->service_type()); } } @@ -158,8 +160,9 @@ TEST_F(ProtocolPacketTest, SetPacketWithDiffFrameType) { for (frame_type = FRAME_TYPE_CONTROL + 1; frame_type <= FRAME_TYPE_MAX_VALUE; ++frame_type) { RawMessagePtr res = GetRawMessage(PROTOCOL_VERSION_3, frame_type, kControl); - EXPECT_EQ(static_cast<uint32_t>(PROTOCOL_VERSION_3), - res->protocol_version()); + EXPECT_EQ(PROTOCOL_VERSION_3, + static_cast< ::protocol_handler::MajorProtocolVersion>( + res->protocol_version())); EXPECT_EQ(kControl, res->service_type()); } } diff --git a/src/components/remote_control/CMakeLists.txt b/src/components/remote_control/CMakeLists.txt index 366a8be351..f80b340639 100644 --- a/src/components/remote_control/CMakeLists.txt +++ b/src/components/remote_control/CMakeLists.txt @@ -21,6 +21,7 @@ include_directories ( ${COMPONENTS_DIR}/application_manager/include ${COMPONENTS_DIR}/remote_control/include/ ${COMPONENTS_DIR}/connection_handler/include/ + ${COMPONENTS_DIR}/protocol_handler/include/ ${COMPONENTS_DIR}/functional_module/include/ ${COMPONENTS_DIR}/config_profile/include/ diff --git a/src/components/remote_control/src/commands/on_interior_vehicle_data_notification.cc b/src/components/remote_control/src/commands/on_interior_vehicle_data_notification.cc index 79e8491a30..fccd8392c7 100644 --- a/src/components/remote_control/src/commands/on_interior_vehicle_data_notification.cc +++ b/src/components/remote_control/src/commands/on_interior_vehicle_data_notification.cc @@ -81,7 +81,7 @@ void OnInteriorVehicleDataNotification::Execute() { utils::MakeShared<application_manager::Message>(*msg); message->set_message_type( application_manager::MessageType::kNotification); - message->set_protocol_version(application_manager::kV3); + message->set_protocol_version(app.protocol_version()); message->set_function_id(functional_modules::ON_INTERIOR_VEHICLE_DATA); message->set_function_name(MessageHelper::GetMobileAPIName( functional_modules::ON_INTERIOR_VEHICLE_DATA)); diff --git a/src/components/remote_control/src/message_helper.cc b/src/components/remote_control/src/message_helper.cc index 5bd786a0eb..873e95716d 100644 --- a/src/components/remote_control/src/message_helper.cc +++ b/src/components/remote_control/src/message_helper.cc @@ -130,7 +130,7 @@ application_manager::MessagePtr MessageHelper::CreateHmiRequest( application_manager::Message( protocol_handler::MessagePriority::kDefault)); message_to_send->set_protocol_version( - application_manager::ProtocolVersion::kHMI); + protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_HMI); message_to_send->set_correlation_id(msg[json_keys::kId].asInt()); message_to_send->set_function_name(msg[kMethod].asString()); std::string json_msg = writer.write(msg); diff --git a/src/components/remote_control/src/module_helper.cc b/src/components/remote_control/src/module_helper.cc index 8a7f565691..4262274597 100644 --- a/src/components/remote_control/src/module_helper.cc +++ b/src/components/remote_control/src/module_helper.cc @@ -64,7 +64,7 @@ application_manager::MessagePtr ModuleHelper::ResponseToHMI( application_manager::MessagePtr message(new application_manager::Message( protocol_handler::MessagePriority::kDefault)); - message->set_protocol_version(application_manager::ProtocolVersion::kHMI); + message->set_protocol_version(protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_HMI); message->set_correlation_id(msg[json_keys::kId].asInt()); Json::FastWriter writer; std::string json_msg = writer.write(msg); diff --git a/src/components/remote_control/src/remote_control_plugin.cc b/src/components/remote_control/src/remote_control_plugin.cc index 6d265d579b..77dc69746a 100644 --- a/src/components/remote_control/src/remote_control_plugin.cc +++ b/src/components/remote_control/src/remote_control_plugin.cc @@ -221,7 +221,7 @@ void RemoteControlPlugin::SendHmiStatusNotification( msg->set_message_type(application_manager::MessageType::kNotification); msg->set_connection_key(app->app_id()); - msg->set_protocol_version(application_manager::kV3); + msg->set_protocol_version(app->protocol_version()); msg_params["hmiLevel"] = static_cast<uint32_t>(app->hmi_level()); diff --git a/src/components/remote_control/test/commands/button_press_request_test.cc b/src/components/remote_control/test/commands/button_press_request_test.cc index e4de8902fd..95662d69b1 100644 --- a/src/components/remote_control/test/commands/button_press_request_test.cc +++ b/src/components/remote_control/test/commands/button_press_request_test.cc @@ -178,7 +178,7 @@ TEST_F(ButtonPressRequestTest, command->Run(); // Assertions EXPECT_EQ(kModuleId, app_extension->uid()); - EXPECT_EQ(application_manager::ProtocolVersion::kHMI, + EXPECT_EQ(protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_HMI, result_msg->protocol_version()); EXPECT_EQ(1, result_msg->correlation_id()); EXPECT_EQ(application_manager::MessageType::kRequest, result_msg->type()); diff --git a/src/components/remote_control/test/commands/get_interior_vehicle_data_request_test.cc b/src/components/remote_control/test/commands/get_interior_vehicle_data_request_test.cc index b8a6c0f675..8799cd904f 100644 --- a/src/components/remote_control/test/commands/get_interior_vehicle_data_request_test.cc +++ b/src/components/remote_control/test/commands/get_interior_vehicle_data_request_test.cc @@ -174,7 +174,7 @@ TEST_F(GetInteriorVehicleDataRequestTest, command->Run(); // Assertions EXPECT_EQ(kModuleId, app_extension->uid()); - EXPECT_EQ(application_manager::ProtocolVersion::kHMI, + EXPECT_EQ(protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_HMI, result_msg->protocol_version()); EXPECT_EQ(1, result_msg->correlation_id()); EXPECT_EQ(application_manager::MessageType::kRequest, result_msg->type()); diff --git a/src/components/remote_control/test/commands/on_interior_vehicle_data_notification_test.cc b/src/components/remote_control/test/commands/on_interior_vehicle_data_notification_test.cc index 2bf7771199..7329890e94 100644 --- a/src/components/remote_control/test/commands/on_interior_vehicle_data_notification_test.cc +++ b/src/components/remote_control/test/commands/on_interior_vehicle_data_notification_test.cc @@ -128,7 +128,11 @@ TEST_F(OnInteriorVehicleDataNotificationTest, .WillOnce(Return(apps_)); EXPECT_CALL(*mock_app_, QueryInterface(kModuleId)) .WillOnce(Return(rc_app_extention_)); + ON_CALL(*mock_app_, app_id()).WillByDefault(Return(kAppId_)); + EXPECT_CALL(*mock_app_, protocol_version()) + .WillRepeatedly( + Return(protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_3)); EXPECT_CALL(*mock_service_, GetApplication(kAppId_)) .WillOnce(Return(mock_app_)); EXPECT_CALL(*mock_service_, CheckPolicyPermissions(_)) @@ -143,7 +147,7 @@ TEST_F(OnInteriorVehicleDataNotificationTest, CreateCommand(message); command->Run(); // Assertions - EXPECT_EQ(application_manager::ProtocolVersion::kV3, + EXPECT_EQ(protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_3, result_msg->protocol_version()); EXPECT_EQ(application_manager::MessageType::kNotification, result_msg->type()); diff --git a/src/components/remote_control/test/commands/set_interior_vehicle_data_request_test.cc b/src/components/remote_control/test/commands/set_interior_vehicle_data_request_test.cc index 44dd422468..2fc1a65b55 100644 --- a/src/components/remote_control/test/commands/set_interior_vehicle_data_request_test.cc +++ b/src/components/remote_control/test/commands/set_interior_vehicle_data_request_test.cc @@ -198,7 +198,7 @@ TEST_F(SetInteriorVehicleDataRequestTest, // Assertions EXPECT_EQ(kModuleId, app_extension->uid()); - EXPECT_EQ(application_manager::ProtocolVersion::kHMI, + EXPECT_EQ(protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_HMI, result_msg->protocol_version()); EXPECT_EQ(1, result_msg->correlation_id()); EXPECT_EQ(application_manager::MessageType::kRequest, result_msg->type()); @@ -266,7 +266,7 @@ TEST_F( // Assertions EXPECT_EQ(kModuleId, app_extension->uid()); - EXPECT_EQ(application_manager::ProtocolVersion::kHMI, + EXPECT_EQ(protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_HMI, result_msg->protocol_version()); EXPECT_EQ(1, result_msg->correlation_id()); EXPECT_EQ(application_manager::MessageType::kRequest, result_msg->type()); diff --git a/src/components/remote_control/test/include/mock_application.h b/src/components/remote_control/test/include/mock_application.h index d466ba9ca5..5c4e5eab8d 100644 --- a/src/components/remote_control/test/include/mock_application.h +++ b/src/components/remote_control/test/include/mock_application.h @@ -131,9 +131,9 @@ class MockApplication : public ::application_manager::Application { MOCK_METHOD1(set_grammar_id, void(uint32_t value)); MOCK_METHOD1( set_protocol_version, - void(const ::application_manager::ProtocolVersion& protocol_version)); + void(const ::protocol_handler::MajorProtocolVersion& protocol_version)); MOCK_CONST_METHOD0(protocol_version, - ::application_manager::ProtocolVersion()); + ::protocol_handler::MajorProtocolVersion()); MOCK_METHOD1(set_is_resuming, void(bool)); MOCK_CONST_METHOD0(is_resuming, bool()); MOCK_METHOD1(AddFile, bool(const ::application_manager::AppFile& file)); @@ -286,6 +286,9 @@ class MockApplication : public ::application_manager::Application { MOCK_METHOD1(set_bundle_id, void(const std::string& bundle_id)); MOCK_METHOD0(GetAvailableDiskSpace, uint32_t()); + MOCK_METHOD1(set_mobile_projection_enabled, void(bool)); + MOCK_CONST_METHOD0(mobile_projection_enabled, bool()); + MOCK_METHOD1(set_mobile_app_id, void(const std::string& policy_app_id)); MOCK_CONST_METHOD0(is_foreground, bool()); MOCK_METHOD1(set_foreground, void(bool is_foreground)); diff --git a/src/components/remote_control/test/src/rc_module_test.cc b/src/components/remote_control/test/src/rc_module_test.cc index 4d4e1ac52d..a994c55b37 100644 --- a/src/components/remote_control/test/src/rc_module_test.cc +++ b/src/components/remote_control/test/src/rc_module_test.cc @@ -171,6 +171,9 @@ TEST_F(RCModuleTest, ProcessMessagePass) { EXPECT_CALL(*app0_, QueryInterface(module_.GetModuleID())) .WillOnce(Return(rc_app_extention_)); EXPECT_CALL(*app0_, app_id()).WillRepeatedly(Return(1)); + EXPECT_CALL(*app0_, protocol_version()) + .WillRepeatedly( + Return(protocol_handler::MajorProtocolVersion::PROTOCOL_VERSION_4)); EXPECT_CALL(*mock_service_, GetApplications(module_.GetModuleID())) .WillOnce(Return(apps_)); EXPECT_CALL(*mock_service_, GetApplication(1)).WillOnce(Return(app0_)); |