summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Keeler <jacob.keeler@livioradio.com>2018-01-17 16:38:01 -0500
committerGitHub <noreply@github.com>2018-01-17 16:38:01 -0500
commite8911d03dde016a29b01fe80533bc6ac56531678 (patch)
treef0a237de3aa244f3b824c5a8607adf9e14bf4db5
parentac4f7aeabd54a49ecf61dbc12ee19cbeb3522c74 (diff)
parent2dab63338c700b9f92f50dfdd3b9490f04057503 (diff)
downloadsdl_core-feature/send_location_for_mobile_nav.tar.gz
Merge pull request #1938 from smartdevicelink/feature/deprecated_method_macrofeature/send_location_for_mobile_nav
Add DEPRECATED macro, and fix resulting deprecation warnings
-rw-r--r--src/components/application_manager/include/application_manager/application_manager_impl.h8
-rw-r--r--src/components/application_manager/include/application_manager/commands/command_request_impl.h5
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/alert_request.h10
-rw-r--r--src/components/application_manager/include/application_manager/commands/mobile/perform_audio_pass_thru_request.h6
-rw-r--r--src/components/application_manager/include/application_manager/message.h3
-rw-r--r--src/components/application_manager/src/application_manager_impl.cc8
-rw-r--r--src/components/application_manager/src/commands/mobile/perform_audio_pass_thru_request.cc1
-rw-r--r--src/components/application_manager/src/message.cc3
-rw-r--r--src/components/application_manager/src/mobile_message_handler.cc3
-rw-r--r--src/components/application_manager/test/mobile_message_handler_test.cc10
-rw-r--r--src/components/config_profile/include/config_profile/profile.h4
-rw-r--r--src/components/connection_handler/include/connection_handler/connection_handler_impl.h19
-rw-r--r--src/components/connection_handler/src/connection_handler_impl.cc2
-rw-r--r--src/components/connection_handler/test/connection_handler_impl_test.cc10
-rw-r--r--src/components/include/protocol_handler/protocol_handler_settings.h7
-rw-r--r--src/components/include/protocol_handler/session_observer.h21
-rw-r--r--src/components/include/utils/macro.h18
-rw-r--r--src/components/protocol_handler/include/protocol_handler/protocol_handler_impl.h4
-rw-r--r--src/components/protocol_handler/src/protocol_handler_impl.cc25
-rw-r--r--src/components/remote_control/test/src/rc_module_test.cc3
-rw-r--r--src/components/telemetry_monitor/include/telemetry_monitor/telemetry_monitor.h3
-rw-r--r--src/components/telemetry_monitor/src/telemetry_monitor.cc1
22 files changed, 100 insertions, 74 deletions
diff --git a/src/components/application_manager/include/application_manager/application_manager_impl.h b/src/components/application_manager/include/application_manager/application_manager_impl.h
index 2f118a7e3f..a0b8d45de2 100644
--- a/src/components/application_manager/include/application_manager/application_manager_impl.h
+++ b/src/components/application_manager/include/application_manager/application_manager_impl.h
@@ -837,8 +837,7 @@ class ApplicationManagerImpl
void OnFindNewApplicationsRequest() OVERRIDE;
void RemoveDevice(
const connection_handler::DeviceHandle& device_handle) OVERRIDE;
- // DEPRECATED
- bool OnServiceStartedCallback(
+ DEPRECATED bool OnServiceStartedCallback(
const connection_handler::DeviceHandle& device_handle,
const int32_t& session_key,
const protocol_handler::ServiceType& type) OVERRIDE;
@@ -1401,9 +1400,8 @@ class ApplicationManagerImpl
* @param service_type Type of service to start
* @return True on success, false on fail
*/
- // DEPRECATED
- bool StartNaviService(uint32_t app_id,
- protocol_handler::ServiceType service_type);
+ DEPRECATED bool StartNaviService(uint32_t app_id,
+ protocol_handler::ServiceType service_type);
/**
* @brief Starts specified navi service for application
diff --git a/src/components/application_manager/include/application_manager/commands/command_request_impl.h b/src/components/application_manager/include/application_manager/commands/command_request_impl.h
index 96a315f505..74a884a223 100644
--- a/src/components/application_manager/include/application_manager/commands/command_request_impl.h
+++ b/src/components/application_manager/include/application_manager/commands/command_request_impl.h
@@ -43,9 +43,8 @@ namespace application_manager {
namespace commands {
struct ResponseInfo {
- // DEPRECATED
- ResponseInfo(hmi_apis::Common_Result::eType result,
- HmiInterfaces::InterfaceID interface);
+ DEPRECATED ResponseInfo(hmi_apis::Common_Result::eType result,
+ HmiInterfaces::InterfaceID interface);
ResponseInfo();
ResponseInfo(const hmi_apis::Common_Result::eType result,
const HmiInterfaces::InterfaceID hmi_interface,
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/alert_request.h b/src/components/application_manager/include/application_manager/commands/mobile/alert_request.h
index c6366f6ab2..01b9782662 100644
--- a/src/components/application_manager/include/application_manager/commands/mobile/alert_request.h
+++ b/src/components/application_manager/include/application_manager/commands/mobile/alert_request.h
@@ -72,16 +72,6 @@ class AlertRequest : public CommandRequestImpl {
**/
virtual void Run();
- /*
- * @brief Will caled by request controller, when default will be expired.
- * If Alert request has soft buttons, timeout response should not be sent to
- * mobile
- */
- // DEPRECATED
- virtual void onTimeOut() {
- CommandRequestImpl::onTimeOut();
- }
-
/**
* @brief Interface method that is called whenever new event received
*
diff --git a/src/components/application_manager/include/application_manager/commands/mobile/perform_audio_pass_thru_request.h b/src/components/application_manager/include/application_manager/commands/mobile/perform_audio_pass_thru_request.h
index c78c57755e..6e0e634459 100644
--- a/src/components/application_manager/include/application_manager/commands/mobile/perform_audio_pass_thru_request.h
+++ b/src/components/application_manager/include/application_manager/commands/mobile/perform_audio_pass_thru_request.h
@@ -107,10 +107,10 @@ class PerformAudioPassThruRequest : public CommandRequestImpl {
* application
* @param result_code contains result code for sending to mobile application
* @return result for sending to mobile application.
+ * @deprecated
*/
- // DEPRECATED
- bool PrepareResponseParameters(mobile_apis::Result::eType& result_code,
- std::string& info);
+ DEPRECATED bool PrepareResponseParameters(
+ mobile_apis::Result::eType& result_code, std::string& info);
/**
* @brief Prepare result code, 'success' result and info for sending
* to mobile application
diff --git a/src/components/application_manager/include/application_manager/message.h b/src/components/application_manager/include/application_manager/message.h
index 6eacf9fe3e..f399da6870 100644
--- a/src/components/application_manager/include/application_manager/message.h
+++ b/src/components/application_manager/include/application_manager/message.h
@@ -93,8 +93,7 @@ class Message {
void set_correlation_id(int32_t id);
void set_connection_key(int32_t key);
void set_message_type(MessageType type);
- // DEPRECATED
- void set_binary_data(BinaryData* data);
+ DEPRECATED void set_binary_data(BinaryData* data);
void set_binary_data(const BinaryData* data);
void set_json_message(const std::string& json_message);
void set_protocol_version(protocol_handler::MajorProtocolVersion version);
diff --git a/src/components/application_manager/src/application_manager_impl.cc b/src/components/application_manager/src/application_manager_impl.cc
index cacaadd996..b219635d46 100644
--- a/src/components/application_manager/src/application_manager_impl.cc
+++ b/src/components/application_manager/src/application_manager_impl.cc
@@ -1166,7 +1166,6 @@ void ApplicationManagerImpl::ReplaceHMIByMobileAppId(
}
}
-// DEPRECATED
bool ApplicationManagerImpl::StartNaviService(
uint32_t app_id, protocol_handler::ServiceType service_type) {
using namespace protocol_handler;
@@ -1338,7 +1337,9 @@ void ApplicationManagerImpl::StopNaviService(
app->StopStreaming(service_type);
}
-// DEPRECATED
+// Suppress warning for deprecated method used within another deprecated method
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
bool ApplicationManagerImpl::OnServiceStartedCallback(
const connection_handler::DeviceHandle& device_handle,
const int32_t& session_key,
@@ -1374,6 +1375,7 @@ bool ApplicationManagerImpl::OnServiceStartedCallback(
}
return false;
}
+#pragma GCC diagnostic pop
void ApplicationManagerImpl::OnServiceStartedCallback(
const connection_handler::DeviceHandle& device_handle,
@@ -2283,7 +2285,7 @@ bool ApplicationManagerImpl::ConvertSOtoMessage(
}
if (message.getElement(jhs::S_PARAMS).keyExists(strings::binary_data)) {
- application_manager::BinaryData binaryData(
+ const application_manager::BinaryData binaryData(
message.getElement(jhs::S_PARAMS)
.getElement(strings::binary_data)
.asBinary());
diff --git a/src/components/application_manager/src/commands/mobile/perform_audio_pass_thru_request.cc b/src/components/application_manager/src/commands/mobile/perform_audio_pass_thru_request.cc
index cff16e577c..a05d41c098 100644
--- a/src/components/application_manager/src/commands/mobile/perform_audio_pass_thru_request.cc
+++ b/src/components/application_manager/src/commands/mobile/perform_audio_pass_thru_request.cc
@@ -224,7 +224,6 @@ PerformAudioPassThruRequest::PrepareResponseParameters() {
return response_params_;
}
-// DEPRECATED
bool PerformAudioPassThruRequest::PrepareResponseParameters(
mobile_apis::Result::eType& result_code, std::string& info) {
LOG4CXX_AUTO_TRACE(logger_);
diff --git a/src/components/application_manager/src/message.cc b/src/components/application_manager/src/message.cc
index d67a235a76..7bc686aef1 100644
--- a/src/components/application_manager/src/message.cc
+++ b/src/components/application_manager/src/message.cc
@@ -89,7 +89,7 @@ Message& Message::operator=(const Message& message) {
set_data_size(message.data_size_);
set_payload_size(message.payload_size_);
if (message.binary_data_) {
- set_binary_data(message.binary_data_);
+ set_binary_data(static_cast<const BinaryData*>(message.binary_data_));
}
set_json_message(message.json_message_);
set_protocol_version(message.protocol_version());
@@ -194,7 +194,6 @@ void Message::set_message_type(MessageType type) {
type_ = type;
}
-// DEPRECATED
void Message::set_binary_data(BinaryData* data) {
if (NULL == data) {
NOTREACHED();
diff --git a/src/components/application_manager/src/mobile_message_handler.cc b/src/components/application_manager/src/mobile_message_handler.cc
index bc3aa32731..2f06c5f3b5 100644
--- a/src/components/application_manager/src/mobile_message_handler.cc
+++ b/src/components/application_manager/src/mobile_message_handler.cc
@@ -196,9 +196,8 @@ MobileMessageHandler::HandleIncomingMessageProtocolV2(
outgoing_message->set_payload_size(message->payload_size());
if (!payload.data.empty()) {
- BinaryData binary_payload_data(payload.data);
+ const BinaryData binary_payload_data(payload.data);
outgoing_message->set_binary_data(&binary_payload_data);
- outgoing_message->set_binary_data(&payload.data);
}
return outgoing_message.release();
}
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 3f2ba0a3c5..2fe28d8249 100644
--- a/src/components/application_manager/test/mobile_message_handler_test.cc
+++ b/src/components/application_manager/test/mobile_message_handler_test.cc
@@ -169,7 +169,7 @@ class MobileMessageHandlerTest : public testing::Test {
uint32_t correlation_id,
uint32_t connection_key,
const std::string& json_msg,
- application_manager::BinaryData* data = NULL) {
+ const application_manager::BinaryData* data = NULL) {
MobileMessage message = utils::MakeShared<Message>(
MessagePriority::FromServiceType(ServiceType::kRpc));
message->set_function_id(function_id);
@@ -256,10 +256,10 @@ TEST(mobile_message_test, basic_test) {
MobileMessage message =
utils::MakeShared<Message>(protocol_handler::MessagePriority::kDefault);
EXPECT_FALSE(message->has_binary_data());
- application_manager::BinaryData* binary_data =
- new application_manager::BinaryData;
- binary_data->push_back('X');
- message->set_binary_data(binary_data);
+ application_manager::BinaryData binary_data;
+ binary_data.push_back('X');
+ message->set_binary_data(
+ (const application_manager::BinaryData*)&binary_data);
EXPECT_TRUE(message->has_binary_data());
}
diff --git a/src/components/config_profile/include/config_profile/profile.h b/src/components/config_profile/include/config_profile/profile.h
index ac4950220e..67ec9368bc 100644
--- a/src/components/config_profile/include/config_profile/profile.h
+++ b/src/components/config_profile/include/config_profile/profile.h
@@ -110,9 +110,9 @@ class Profile : public protocol_handler::ProtocolHandlerSettings,
/**
* @brief Returns true, if SDL 4.0 is enabled
+ * @deprecated use max_supported_protocol_version instead
*/
- // DEPRECATED, use max_supported_protocol_version instead
- bool enable_protocol_4() const OVERRIDE;
+ DEPRECATED bool enable_protocol_4() const OVERRIDE;
/**
* @brief Returns application icons folder path
diff --git a/src/components/connection_handler/include/connection_handler/connection_handler_impl.h b/src/components/connection_handler/include/connection_handler/connection_handler_impl.h
index aebc612a22..47e573a06d 100644
--- a/src/components/connection_handler/include/connection_handler/connection_handler_impl.h
+++ b/src/components/connection_handler/include/connection_handler/connection_handler_impl.h
@@ -182,9 +182,9 @@ class ConnectionHandlerImpl
* \param is_protected would be service protected
* \param hash_id pointer for session hash identifier
* \return uint32_t Id (number) of new session if successful, otherwise 0.
+ * \deprecated
*/
- // DEPRECATED
- virtual uint32_t OnSessionStartedCallback(
+ DEPRECATED virtual uint32_t OnSessionStartedCallback(
const transport_manager::ConnectionUID connection_handle,
const uint8_t session_id,
const protocol_handler::ServiceType& service_type,
@@ -209,9 +209,18 @@ class ConnectionHandlerImpl
const protocol_handler::ServiceType& service_type,
const bool is_protected,
const BsonObject* params);
-
- // DEPRECATED
- uint32_t OnSessionEndedCallback(
+ /**
+ * \brief Callback function used by ProtocolHandler
+ * when Mobile Application initiates session ending.
+ * \param connection_handle Connection identifier within which session exists
+ * \param sessionId Identifier of the session to be ended
+ * \param hashCode Hash used only in second version of SmartDeviceLink
+ * protocol.
+ * If not equal to hash assigned to session on start then operation fails.
+ * \return uint32_t 0 if operation fails, session key otherwise
+ * \deprecated
+ */
+ DEPRECATED uint32_t OnSessionEndedCallback(
const transport_manager::ConnectionUID connection_handle,
const uint8_t session_id,
const uint32_t& hashCode,
diff --git a/src/components/connection_handler/src/connection_handler_impl.cc b/src/components/connection_handler/src/connection_handler_impl.cc
index bd5b3d79bb..254bb0194f 100644
--- a/src/components/connection_handler/src/connection_handler_impl.cc
+++ b/src/components/connection_handler/src/connection_handler_impl.cc
@@ -284,7 +284,6 @@ bool AllowProtection(const ConnectionHandlerSettings& settings,
}
#endif // ENABLE_SECURITY
-// DEPRECATED
uint32_t ConnectionHandlerImpl::OnSessionStartedCallback(
const transport_manager::ConnectionUID connection_handle,
const uint8_t session_id,
@@ -542,7 +541,6 @@ void ConnectionHandlerImpl::OnMalformedMessageCallback(
CloseConnection(connection_handle);
}
-// DEPRECATED
uint32_t ConnectionHandlerImpl::OnSessionEndedCallback(
const transport_manager::ConnectionUID connection_handle,
const uint8_t session_id,
diff --git a/src/components/connection_handler/test/connection_handler_impl_test.cc b/src/components/connection_handler/test/connection_handler_impl_test.cc
index ec4e12ffe2..0a05983623 100644
--- a/src/components/connection_handler/test/connection_handler_impl_test.cc
+++ b/src/components/connection_handler/test/connection_handler_impl_test.cc
@@ -1158,7 +1158,7 @@ TEST_F(ConnectionHandlerTest, SessionStop_CheckHash) {
for (uint32_t session = 0; session < 0xFF; ++session) {
AddTestSession();
- const uint32_t hash = connection_key_;
+ uint32_t hash = connection_key_;
uint32_t wrong_hash = hash + 1;
const uint32_t end_audio_wrong_hash =
@@ -1169,7 +1169,7 @@ TEST_F(ConnectionHandlerTest, SessionStop_CheckHash) {
CheckSessionExists(uid_, start_session_id_);
const uint32_t end_audio = connection_handler_->OnSessionEndedCallback(
- uid_, start_session_id_, hash, kRpc);
+ uid_, start_session_id_, &hash, kRpc);
EXPECT_EQ(connection_key_, end_audio);
CheckSessionExists(uid_, 0);
}
@@ -1181,17 +1181,17 @@ TEST_F(ConnectionHandlerTest, SessionStop_CheckSpecificHash) {
AddTestSession();
uint32_t wrong_hash = protocol_handler::HASH_ID_WRONG;
- const uint32_t hash = protocol_handler::HASH_ID_NOT_SUPPORTED;
+ uint32_t hash = protocol_handler::HASH_ID_NOT_SUPPORTED;
const uint32_t end_audio_wrong_hash =
connection_handler_->OnSessionEndedCallback(
- uid_, start_session_id_, wrong_hash, kRpc);
+ uid_, start_session_id_, &wrong_hash, kRpc);
EXPECT_EQ(0u, end_audio_wrong_hash);
EXPECT_EQ(protocol_handler::HASH_ID_WRONG, wrong_hash);
CheckSessionExists(uid_, start_session_id_);
const uint32_t end_audio = connection_handler_->OnSessionEndedCallback(
- uid_, start_session_id_, hash, kRpc);
+ uid_, start_session_id_, &hash, kRpc);
EXPECT_EQ(connection_key_, end_audio);
CheckSessionExists(uid_, 0);
}
diff --git a/src/components/include/protocol_handler/protocol_handler_settings.h b/src/components/include/protocol_handler/protocol_handler_settings.h
index 362f49e140..e1107cb2a9 100644
--- a/src/components/include/protocol_handler/protocol_handler_settings.h
+++ b/src/components/include/protocol_handler/protocol_handler_settings.h
@@ -34,8 +34,11 @@ class ProtocolHandlerSettings {
*/
virtual uint16_t max_supported_protocol_version() const = 0;
- // DEPRECATED
- virtual bool enable_protocol_4() const = 0;
+ /*
+ * @brief Returns true, if SDL 4.0 is enabled
+ * @deprecated Use max_supported_protocol_version instead
+ */
+ DEPRECATED virtual bool enable_protocol_4() const = 0;
virtual uint32_t multiframe_waiting_timeout() const = 0;
#ifdef ENABLE_SECURITY
diff --git a/src/components/include/protocol_handler/session_observer.h b/src/components/include/protocol_handler/session_observer.h
index e58d959c8c..7ac7a84d6d 100644
--- a/src/components/include/protocol_handler/session_observer.h
+++ b/src/components/include/protocol_handler/session_observer.h
@@ -75,9 +75,9 @@ class SessionObserver {
* \param is_protected would be service protected
* \param hash_id pointer for session hash identifier, uint32_t* hash_id
* \return uint32_t Id (number) of new session if successful, otherwise 0.
+ * \deprecated
*/
- // DEPRECATED
- virtual uint32_t OnSessionStartedCallback(
+ DEPRECATED virtual uint32_t OnSessionStartedCallback(
const transport_manager::ConnectionUID connection_handle,
const uint8_t sessionId,
const protocol_handler::ServiceType& service_type,
@@ -103,8 +103,19 @@ class SessionObserver {
const bool is_protected,
const BsonObject* params) = 0;
- // DEPRECATED
- virtual uint32_t OnSessionEndedCallback(
+ /**
+ * \brief Callback function used by ProtocolHandler
+ * when Mobile Application initiates session ending.
+ * \param connection_handle Connection identifier within which session exists
+ * \param sessionId Identifier of the session to be ended
+ * \param hashCode Hash used only in second version of SmartDeviceLink
+ * protocol.
+ * If not equal to hash assigned to session on start then operation fails.
+ * \param service_type Type of service
+ * \return uint32_t 0 if operation fails, session key otherwise
+ * \deprecated
+ */
+ DEPRECATED virtual uint32_t OnSessionEndedCallback(
const transport_manager::ConnectionUID connection_handle,
const uint8_t sessionId,
const uint32_t& hashCode,
@@ -116,7 +127,7 @@ class SessionObserver {
* \param connection_handle Connection identifier within which session exists
* \param sessionId Identifier of the session to be ended
* \param hashCode Hash used only in second version of SmartDeviceLink
- * protocol.
+ * protocol. (Set to HASH_ID_WRONG if the hash is incorrect)
* If not equal to hash assigned to session on start then operation fails.
* \param service_type Type of service
* \return uint32_t 0 if operation fails, session key otherwise
diff --git a/src/components/include/utils/macro.h b/src/components/include/utils/macro.h
index 4cf76fe022..e6f3b6b3ca 100644
--- a/src/components/include/utils/macro.h
+++ b/src/components/include/utils/macro.h
@@ -145,4 +145,22 @@
#define FRIEND_TEST(test_case_name, test_name)
#endif // BUILD_TESTS
+/*
+* @brief deprecate a method declaration, a warning will be thrown by your
+* compiler if a method with this macro is used
+*/
+#if __cplusplus > 201103L
+#define DEPRECATED [[deprecated]]
+#else
+#ifdef __GNUC__
+#define DEPRECATED __attribute__((deprecated))
+#define DEPRECATED_CLASS __attribute__((deprecated))
+#elif defined(_MSC_VER)
+#define DEPRECATED __declspec(deprecated)
+#else
+#pragma message("WARNING: You need to implement DEPRECATED for this compiler")
+#define DEPRECATED
+#endif
+#endif
+
#endif // SRC_COMPONENTS_INCLUDE_UTILS_MACRO_H_
diff --git a/src/components/protocol_handler/include/protocol_handler/protocol_handler_impl.h b/src/components/protocol_handler/include/protocol_handler/protocol_handler_impl.h
index c5a45c0dfe..90aad65ed4 100644
--- a/src/components/protocol_handler/include/protocol_handler/protocol_handler_impl.h
+++ b/src/components/protocol_handler/include/protocol_handler/protocol_handler_impl.h
@@ -553,8 +553,8 @@ class ProtocolHandlerImpl
RESULT_CODE HandleControlMessageEndServiceACK(const ProtocolPacket& packet);
- // DEPRECATED
- RESULT_CODE HandleControlMessageStartSession(const ProtocolPacket& packet);
+ DEPRECATED RESULT_CODE
+ HandleControlMessageStartSession(const ProtocolPacket& packet);
RESULT_CODE HandleControlMessageStartSession(const ProtocolFramePtr packet);
diff --git a/src/components/protocol_handler/src/protocol_handler_impl.cc b/src/components/protocol_handler/src/protocol_handler_impl.cc
index 23ac2927ef..0c4b72b535 100644
--- a/src/components/protocol_handler/src/protocol_handler_impl.cc
+++ b/src/components/protocol_handler/src/protocol_handler_impl.cc
@@ -1173,12 +1173,12 @@ RESULT_CODE ProtocolHandlerImpl::HandleControlMessageEndServiceACK(
LOG4CXX_AUTO_TRACE(logger_);
const uint8_t current_session_id = packet.session_id();
- const uint32_t hash_id = get_hash_id(packet);
+ uint32_t hash_id = get_hash_id(packet);
const ServiceType service_type = ServiceTypeFromByte(packet.service_type());
const ConnectionID connection_id = packet.connection_id();
const uint32_t session_key = session_observer_.OnSessionEndedCallback(
- connection_id, current_session_id, hash_id, service_type);
+ connection_id, current_session_id, &hash_id, service_type);
if (0 == session_key) {
LOG4CXX_WARN(logger_, "Refused to end service");
@@ -1307,7 +1307,9 @@ class StartSessionHandler : public security_manager::SecurityManagerListener {
} // namespace
#endif // ENABLE_SECURITY
-// DEPRECATED
+// Suppress warning for deprecated method used within another deprecated method
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
RESULT_CODE ProtocolHandlerImpl::HandleControlMessageStartSession(
const ProtocolPacket& packet) {
LOG4CXX_AUTO_TRACE(logger_);
@@ -1461,6 +1463,7 @@ RESULT_CODE ProtocolHandlerImpl::HandleControlMessageStartSession(
}
return RESULT_OK;
}
+#pragma GCC diagnostic pop
RESULT_CODE ProtocolHandlerImpl::HandleControlMessageStartSession(
const ProtocolFramePtr packet) {
@@ -1895,11 +1898,11 @@ RESULT_CODE ProtocolHandlerImpl::EncryptFrame(ProtocolFramePtr packet) {
connection_key,
security_manager::SecurityManager::ERROR_ENCRYPTION_FAILED,
error_text);
+
+ uint32_t hash_id = packet->message_id();
// Close session to prevent usage unprotected service/session
- session_observer_.OnSessionEndedCallback(packet->connection_id(),
- packet->session_id(),
- packet->message_id(),
- kRpc);
+ session_observer_.OnSessionEndedCallback(
+ packet->connection_id(), packet->session_id(), &hash_id, kRpc);
return RESULT_OK;
}
LOG4CXX_DEBUG(logger_,
@@ -1948,11 +1951,11 @@ RESULT_CODE ProtocolHandlerImpl::DecryptFrame(ProtocolFramePtr packet) {
connection_key,
security_manager::SecurityManager::ERROR_DECRYPTION_FAILED,
error_text);
+
+ uint32_t hash_id = packet->message_id();
// Close session to prevent usage unprotected service/session
- session_observer_.OnSessionEndedCallback(packet->connection_id(),
- packet->session_id(),
- packet->message_id(),
- kRpc);
+ session_observer_.OnSessionEndedCallback(
+ packet->connection_id(), packet->session_id(), &hash_id, kRpc);
return RESULT_ENCRYPTION_FAILED;
}
LOG4CXX_DEBUG(logger_,
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 57efb90551..e7c3576f31 100644
--- a/src/components/remote_control/test/src/rc_module_test.cc
+++ b/src/components/remote_control/test/src/rc_module_test.cc
@@ -169,7 +169,8 @@ TEST_F(RCModuleTest, ProcessMessagePass) {
application_manager::BinaryData* data = &buf;
data->push_back(1);
- message_->set_binary_data(data);
+ message_->set_binary_data(
+ static_cast<const application_manager::BinaryData*>(data));
Json::Value json_value = MessageHelper::StringToValue(json);
Json::Value module_type =
diff --git a/src/components/telemetry_monitor/include/telemetry_monitor/telemetry_monitor.h b/src/components/telemetry_monitor/include/telemetry_monitor/telemetry_monitor.h
index ab33e50df3..618901ffa8 100644
--- a/src/components/telemetry_monitor/include/telemetry_monitor/telemetry_monitor.h
+++ b/src/components/telemetry_monitor/include/telemetry_monitor/telemetry_monitor.h
@@ -92,8 +92,7 @@ class TelemetryMonitor {
virtual void Stop();
virtual void Start();
virtual void SendMetric(utils::SharedPtr<MetricWrapper> metric);
- // DEPRECATED
- void set_streamer(Streamer* streamer);
+ DEPRECATED void set_streamer(Streamer* streamer);
void set_streamer(utils::SharedPtr<Streamer> streamer);
const std::string& ip() const;
int16_t port() const;
diff --git a/src/components/telemetry_monitor/src/telemetry_monitor.cc b/src/components/telemetry_monitor/src/telemetry_monitor.cc
index a7d9cc6fd3..53a5a2dc70 100644
--- a/src/components/telemetry_monitor/src/telemetry_monitor.cc
+++ b/src/components/telemetry_monitor/src/telemetry_monitor.cc
@@ -64,7 +64,6 @@ void TelemetryMonitor::Start() {
thread_ = threads::CreateThread("TelemetryMonitor", streamer_.get());
}
-// DEPRECATED
void TelemetryMonitor::set_streamer(Streamer* streamer) {}
void TelemetryMonitor::set_streamer(utils::SharedPtr<Streamer> streamer) {