diff options
Diffstat (limited to 'src/components/protocol_handler/include')
6 files changed, 153 insertions, 123 deletions
diff --git a/src/components/protocol_handler/include/protocol_handler/incoming_data_handler.h b/src/components/protocol_handler/include/protocol_handler/incoming_data_handler.h index b02e7de3bf..4633be6c6e 100644 --- a/src/components/protocol_handler/include/protocol_handler/incoming_data_handler.h +++ b/src/components/protocol_handler/include/protocol_handler/incoming_data_handler.h @@ -42,7 +42,8 @@ namespace protocol_handler { /** * \class IncomingDataHandler - * \brief Class for contecat TM messages to ford frames and validate ford header data + * \brief Class for contecat TM messages to ford frames and validate ford header + * data * IncomingDataHandler methods are reentrant and not thread-safe */ class IncomingDataHandler { @@ -52,7 +53,8 @@ class IncomingDataHandler { * @brief Setting additional validator for checking malformed packets * \param validator pointer */ - void set_validator(const ProtocolPacket::ProtocolHeaderValidator* const validator); + void set_validator( + const ProtocolPacket::ProtocolHeaderValidator* const validator); /** * @brief Concatenate TM messages to ford frames and validate ford header data * \param TM messages for converting to frames @@ -70,13 +72,11 @@ class IncomingDataHandler { /** * @brief Add connection for data handling and verification */ - void AddConnection( - const transport_manager::ConnectionUID connection_id); + void AddConnection(const transport_manager::ConnectionUID connection_id); /** * @brief Remove connection and all unhandled data */ - void RemoveConnection( - const transport_manager::ConnectionUID connection_id); + void RemoveConnection(const transport_manager::ConnectionUID connection_id); private: /** @@ -100,10 +100,10 @@ class IncomingDataHandler { const transport_manager::ConnectionUID connection_id); typedef std::map<transport_manager::ConnectionUID, std::vector<uint8_t> > - ConnectionsDataMap; + ConnectionsDataMap; ConnectionsDataMap connections_data_; ProtocolPacket::ProtocolHeader header_; - const ProtocolPacket::ProtocolHeaderValidator* validator_; + const ProtocolPacket::ProtocolHeaderValidator* validator_; bool last_portion_of_data_was_malformed_; DISALLOW_COPY_AND_ASSIGN(IncomingDataHandler); }; diff --git a/src/components/protocol_handler/include/protocol_handler/multiframe_builder.h b/src/components/protocol_handler/include/protocol_handler/multiframe_builder.h index 6ccf891b38..bac37b508c 100644 --- a/src/components/protocol_handler/include/protocol_handler/multiframe_builder.h +++ b/src/components/protocol_handler/include/protocol_handler/multiframe_builder.h @@ -34,9 +34,9 @@ #define SRC_COMPONENTS_PROTOCOL_HANDLER_INCLUDE_PROTOCOL_HANDLER_MULTIFRAME_BUILDER_H_ #include <map> -#include <ostream> // std::basic_ostream -#include <iterator> // std::ostream_iterator -#include <algorithm> // std::copy +#include <ostream> // std::basic_ostream +#include <iterator> // std::ostream_iterator +#include <algorithm> // std::copy #include "utils/date_time.h" #include "protocol_handler/protocol_packet.h" @@ -63,15 +63,18 @@ struct ProtocolFrameData { TimevalStruct append_time; }; /** - *\brief Map of frames with last frame data for messages received in multiple frames. + *\brief Map of frames with last frame data for messages received in multiple + *frames. */ typedef std::map<MessageID, ProtocolFrameData> MessageIDToFrameMap; /** - *\brief Map of frames with last frame data for messages received in multiple frames. + *\brief Map of frames with last frame data for messages received in multiple + *frames. */ typedef std::map<SessionID, MessageIDToFrameMap> SessionToFrameMap; /** - *\brief Map of frames with last frame data for messages received in multiple frames. + *\brief Map of frames with last frame data for messages received in multiple + *frames. */ typedef std::map<ConnectionID, SessionToFrameMap> MultiFrameMap; @@ -119,33 +122,39 @@ class MultiFrameBuilder { RESULT_CODE HandleFirstFrame(const ProtocolFramePtr packet); RESULT_CODE HandleConsecutiveFrame(const ProtocolFramePtr packet); - // Map of frames with last frame data for messages received in multiple frames. + // Map of frames with last frame data for messages received in multiple + // frames. MultiFrameMap multiframes_map_; int64_t consecutive_frame_wait_msecs_; }; -template<typename _CharT> -std::basic_ostream<_CharT>& operator<<(std::basic_ostream<_CharT>& stream, - const protocol_handler::MultiFrameMap& map) { +template <typename _CharT> +std::basic_ostream<_CharT>& operator<<( + std::basic_ostream<_CharT>& stream, + const protocol_handler::MultiFrameMap& map) { if (map.empty()) { stream << "{empty}"; return stream; } for (MultiFrameMap::const_iterator connection_it = map.begin(); - connection_it != map.end(); ++connection_it) { + connection_it != map.end(); + ++connection_it) { const SessionToFrameMap& session_map = connection_it->second; for (SessionToFrameMap::const_iterator session_it = session_map.begin(); - session_it != session_map.end(); ++session_it) { + session_it != session_map.end(); + ++session_it) { const MessageIDToFrameMap& messageId_map = session_it->second; - for (MessageIDToFrameMap::const_iterator messageId_it = messageId_map.begin(); - messageId_it != messageId_map.end(); ++messageId_it) { + for (MessageIDToFrameMap::const_iterator messageId_it = + messageId_map.begin(); + messageId_it != messageId_map.end(); + ++messageId_it) { const ProtocolFrameData& frame_data = messageId_it->second; stream << "ConnectionID: " << connection_it->first - << ", SessionID: " << static_cast<uint32_t>(session_it->first) - << ", MessageID: " << static_cast<uint32_t>(messageId_it->first) + << ", SessionID: " << static_cast<uint32_t>(session_it->first) + << ", MessageID: " << static_cast<uint32_t>(messageId_it->first) << " msec, frame: " << frame_data.frame << std::endl; } } 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 9378081854..cd50f98bdb 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 @@ -95,36 +95,37 @@ namespace impl { * TODO(ik): replace these with globally defined message types * when we have them. */ -struct RawFordMessageFromMobile: public ProtocolFramePtr { +struct RawFordMessageFromMobile : public ProtocolFramePtr { RawFordMessageFromMobile() {} explicit RawFordMessageFromMobile(const ProtocolFramePtr message) - : ProtocolFramePtr(message) {} + : ProtocolFramePtr(message) {} // PrioritizedQueue requires this method to decide which priority to assign size_t PriorityOrder() const { return MessagePriority::FromServiceType( - ServiceTypeFromByte(get()->service_type())).OrderingValue(); + ServiceTypeFromByte(get()->service_type())).OrderingValue(); } }; -struct RawFordMessageToMobile: public ProtocolFramePtr { +struct RawFordMessageToMobile : public ProtocolFramePtr { RawFordMessageToMobile() : is_final(false) {} explicit RawFordMessageToMobile(const ProtocolFramePtr message, bool final_message) - : ProtocolFramePtr(message), is_final(final_message) {} + : ProtocolFramePtr(message), is_final(final_message) {} // PrioritizedQueue requires this method to decide which priority to assign size_t PriorityOrder() const { return MessagePriority::FromServiceType( - ServiceTypeFromByte(get()->service_type())).OrderingValue(); + ServiceTypeFromByte(get()->service_type())).OrderingValue(); } - // Signals whether connection to mobile must be closed after processing this message + // Signals whether connection to mobile must be closed after processing this + // message bool is_final; }; // Short type names for prioritized message queues -typedef threads::MessageLoopThread < - utils::PrioritizedQueue<RawFordMessageFromMobile> > FromMobileQueue; -typedef threads::MessageLoopThread < - utils::PrioritizedQueue<RawFordMessageToMobile> > ToMobileQueue; +typedef threads::MessageLoopThread< + utils::PrioritizedQueue<RawFordMessageFromMobile> > FromMobileQueue; +typedef threads::MessageLoopThread< + utils::PrioritizedQueue<RawFordMessageToMobile> > ToMobileQueue; } // namespace impl /** @@ -136,15 +137,15 @@ typedef threads::MessageLoopThread < * about activities around sessions. */ class ProtocolHandlerImpl - : public ProtocolHandler, - public TransportManagerListenerEmpty, - public impl::FromMobileQueue::Handler, - public impl::ToMobileQueue::Handler + : public ProtocolHandler, + public TransportManagerListenerEmpty, + public impl::FromMobileQueue::Handler, + public impl::ToMobileQueue::Handler #ifdef TELEMETRY_MONITOR - , - public telemetry_monitor::TelemetryObservable<PHTelemetryObserver> + , + public telemetry_monitor::TelemetryObservable<PHTelemetryObserver> #endif // TELEMETRY_MONITOR - { + { public: /** * @brief Constructor @@ -153,10 +154,10 @@ class ProtocolHandlerImpl * information and controll session life cycle * @param transportManager Pointer to Transport layer handler for */ - ProtocolHandlerImpl(const ProtocolHandlerSettings& settings, - protocol_handler::SessionObserver& session_observer, - connection_handler::ConnectionHandler& connection_handler, - transport_manager::TransportManager& transport_manager); + ProtocolHandlerImpl(const ProtocolHandlerSettings& settings, + protocol_handler::SessionObserver& session_observer, + connection_handler::ConnectionHandler& connection_handler, + transport_manager::TransportManager& transport_manager); /** * \brief Destructor */ @@ -167,17 +168,18 @@ class ProtocolHandlerImpl * \param observer Pointer to object of the class implementing * IProtocolObserver */ - void AddProtocolObserver(ProtocolObserver *observer); + void AddProtocolObserver(ProtocolObserver* observer); - void RemoveProtocolObserver( - ProtocolObserver* observer) OVERRIDE; + void RemoveProtocolObserver(ProtocolObserver* observer) OVERRIDE; #ifdef ENABLE_SECURITY /** - * \brief Sets pointer for SecurityManager layer for managing protection routine + * \brief Sets pointer for SecurityManager layer for managing protection + * routine * \param security_manager Pointer to SecurityManager object */ - void set_security_manager(security_manager::SecurityManager *security_manager); + void set_security_manager( + security_manager::SecurityManager* security_manager); #endif // ENABLE_SECURITY /** @@ -194,7 +196,8 @@ class ProtocolHandlerImpl /** * \brief Sends number of processed frames in case of binary nav streaming - * \param connection_key Unique key used by other components as session identifier + * \param connection_key Unique key used by other components as session + * identifier * \param number_of_frames Number of frames processed by * streaming server and displayed to user. */ @@ -206,7 +209,7 @@ class ProtocolHandlerImpl * * @param observer - pointer to observer */ - void SetTelemetryObserver(PHTelemetryObserver *observer); + void SetTelemetryObserver(PHTelemetryObserver* observer); #endif // TELEMETRY_MONITOR /* @@ -292,11 +295,11 @@ class ProtocolHandlerImpl uint8_t protocol_version, uint8_t service_type); - - SessionObserver &get_session_observer() OVERRIDE; + SessionObserver& get_session_observer() OVERRIDE; private: - void SendEndServicePrivate(int32_t connection_id, uint8_t session_id, + void SendEndServicePrivate(int32_t connection_id, + uint8_t session_id, uint8_t service_type); /* @@ -311,8 +314,7 @@ class ProtocolHandlerImpl * * @param message Received message **/ - void OnTMMessageReceived( - const RawMessagePtr message) OVERRIDE; + void OnTMMessageReceived(const RawMessagePtr message) OVERRIDE; /** * @brief Notifies about error on receiving message from TM. @@ -320,7 +322,7 @@ class ProtocolHandlerImpl * @param error Occurred error **/ void OnTMMessageReceiveFailed( - const transport_manager::DataReceiveError &error) OVERRIDE; + const transport_manager::DataReceiveError& error) OVERRIDE; /** * @brief Notifies about successfully sending message. @@ -335,15 +337,15 @@ class ProtocolHandlerImpl * @param error Describes occurred error. * @param message Message during sending which error occurred. **/ - void OnTMMessageSendFailed( - const transport_manager::DataSendError &error, - const RawMessagePtr message) OVERRIDE; + void OnTMMessageSendFailed(const transport_manager::DataSendError& error, + const RawMessagePtr message) OVERRIDE; - void OnConnectionEstablished(const transport_manager::DeviceInfo &device_info, - const transport_manager::ConnectionUID connection_id) OVERRIDE; + void OnConnectionEstablished( + const transport_manager::DeviceInfo& device_info, + const transport_manager::ConnectionUID connection_id) OVERRIDE; void OnConnectionClosed( - const transport_manager::ConnectionUID connection_id) OVERRIDE; + const transport_manager::ConnectionUID connection_id) OVERRIDE; /** * @brief Notifies subscribers about message @@ -369,7 +371,7 @@ class ProtocolHandlerImpl const uint32_t protocol_version, const uint8_t service_type, const size_t data_size, - const uint8_t *data, + const uint8_t* data, const bool is_final_message); /** @@ -390,7 +392,7 @@ class ProtocolHandlerImpl const uint8_t protocol_version, const uint8_t service_type, const size_t data_size, - const uint8_t *data, + const uint8_t* data, const size_t max_frame_size, const bool is_final_message); @@ -462,9 +464,9 @@ class ProtocolHandlerImpl RESULT_CODE DecryptFrame(ProtocolFramePtr packet); #endif // ENABLE_SECURITY - bool TrackMessage(const uint32_t &connection_key); + bool TrackMessage(const uint32_t& connection_key); - bool TrackMalformedMessage(const uint32_t &connection_key, + bool TrackMalformedMessage(const uint32_t& connection_key, const size_t count); /** * @brief Function returns supported SDL Protocol Version, @@ -544,7 +546,7 @@ class ProtocolHandlerImpl utils::MessageMeter<uint32_t> malformed_message_meter_; #ifdef ENABLE_SECURITY - security_manager::SecurityManager *security_manager_; + security_manager::SecurityManager* security_manager_; #endif // ENABLE_SECURITY // Thread that pumps non-parsed messages coming from mobile side. @@ -555,7 +557,7 @@ class ProtocolHandlerImpl sync_primitives::Lock protocol_observers_lock_; #ifdef TELEMETRY_MONITOR - PHTelemetryObserver *metric_observer_; + PHTelemetryObserver* metric_observer_; #endif // TELEMETRY_MONITOR }; } // namespace protocol_handler diff --git a/src/components/protocol_handler/include/protocol_handler/protocol_packet.h b/src/components/protocol_handler/include/protocol_handler/protocol_packet.h index 1b68e6c870..f8696c46a0 100644 --- a/src/components/protocol_handler/include/protocol_handler/protocol_packet.h +++ b/src/components/protocol_handler/include/protocol_handler/protocol_packet.h @@ -59,7 +59,7 @@ class ProtocolPacket { struct ProtocolData { ProtocolData(); ~ProtocolData(); - uint8_t *data; + uint8_t* data; uint32_t totalDataBytes; }; @@ -70,11 +70,14 @@ class ProtocolPacket { class ProtocolHeader { public: ProtocolHeader(); - ProtocolHeader(uint8_t version, bool protection, + ProtocolHeader(uint8_t version, + bool protection, uint8_t frameType, uint8_t serviceType, - uint8_t frameData, uint8_t sessionID, - uint32_t dataSize, uint32_t messageID); + uint8_t frameData, + uint8_t sessionID, + uint32_t dataSize, + uint32_t messageID); uint8_t version; bool protection_flag; uint8_t frameType; @@ -83,7 +86,7 @@ class ProtocolPacket { uint8_t sessionId; uint32_t dataSize; uint32_t messageId; - void deserialize(const uint8_t *message, const size_t messageSize); + void deserialize(const uint8_t* message, const size_t messageSize); }; /** * \class ProtocolHeaderValidator @@ -101,6 +104,7 @@ class ProtocolPacket { * \brief Check ProtocolHeader according to protocol requiements */ RESULT_CODE validate(const ProtocolHeader& header) const; + private: size_t max_payload_size_; }; @@ -132,10 +136,15 @@ class ProtocolPacket { * \param data Message string if provided */ ProtocolPacket(ConnectionID connection_id, - uint8_t version, bool protection, uint8_t frameType, - uint8_t serviceType, uint8_t frameData, - uint8_t sessionId, uint32_t dataSize, - uint32_t messageID, const uint8_t *data = 0); + uint8_t version, + bool protection, + uint8_t frameType, + uint8_t serviceType, + uint8_t frameData, + uint8_t sessionId, + uint32_t dataSize, + uint32_t messageID, + const uint8_t* data = 0); /*Serialization*/ /** @@ -150,7 +159,7 @@ class ProtocolPacket { * \param chunkDataSize Size of current message string * \return \saRESULT_CODE Status of serialization */ - RESULT_CODE appendData(uint8_t *chunkData, uint32_t chunkDataSize); + RESULT_CODE appendData(uint8_t* chunkData, uint32_t chunkDataSize); /** * \brief Getter of message size including protocol header @@ -171,7 +180,7 @@ class ProtocolPacket { * \param messageSize Incoming message size * \return \saRESULT_CODE Status of serialization */ - RESULT_CODE deserializePacket(const uint8_t *message, + RESULT_CODE deserializePacket(const uint8_t* message, const size_t messageSize); /** @@ -200,7 +209,8 @@ class ProtocolPacket { uint8_t service_type() const; /** - *\brief Getter and setter of frame data (start/end session, number of frame etc) + *\brief Getter and setter of frame data (start/end session, number of frame + *etc) */ uint8_t frame_data() const; @@ -224,7 +234,7 @@ class ProtocolPacket { /** *\brief Getter of message string */ - uint8_t *data() const; + uint8_t* data() const; /** *\brief Setter for size of multiframe message @@ -234,8 +244,7 @@ class ProtocolPacket { /** *\brief Setter for new data */ - void set_data(const uint8_t *const new_data, - const size_t new_data_size); + void set_data(const uint8_t* const new_data, const size_t new_data_size); /** *\brief Getter for size of multiframe message @@ -283,38 +292,41 @@ class ProtocolPacket { DISALLOW_COPY_AND_ASSIGN(ProtocolPacket); }; } // namespace protocol_handler -/** - * @brief Type definition for variable that hold shared pointer to protocolol packet - */ + /** + * @brief Type definition for variable that hold shared pointer to protocolol + * packet + */ typedef utils::SharedPtr<protocol_handler::ProtocolPacket> ProtocolFramePtr; -typedef std::list<ProtocolFramePtr> ProtocolFramePtrList; - -template<typename _CharT> -std::basic_ostream<_CharT>& operator<<(std::basic_ostream<_CharT>& stream, - const protocol_handler::ProtocolPacket::ProtocolHeader& header) { - stream << "Version: " << static_cast<uint32_t>(header.version) << - ", Protection: " << (header.protection_flag ? "ON" : "OFF") << - ", FrameType: " << static_cast<uint32_t>(header.frameType) << - ", ServiceType: " << static_cast<uint32_t>(header.serviceType) << - ", FrameData: " << static_cast<uint32_t>(header.frameData) << - ", SessionId: " << static_cast<uint32_t>(header.sessionId) << - ", DataSize: " << static_cast<uint32_t>(header.dataSize) << - ", MessageId: " << static_cast<uint32_t>(header.messageId); +typedef std::list<ProtocolFramePtr> ProtocolFramePtrList; + +template <typename _CharT> +std::basic_ostream<_CharT>& operator<<( + std::basic_ostream<_CharT>& stream, + const protocol_handler::ProtocolPacket::ProtocolHeader& header) { + stream << "Version: " << static_cast<uint32_t>(header.version) + << ", Protection: " << (header.protection_flag ? "ON" : "OFF") + << ", FrameType: " << static_cast<uint32_t>(header.frameType) + << ", ServiceType: " << static_cast<uint32_t>(header.serviceType) + << ", FrameData: " << static_cast<uint32_t>(header.frameData) + << ", SessionId: " << static_cast<uint32_t>(header.sessionId) + << ", DataSize: " << static_cast<uint32_t>(header.dataSize) + << ", MessageId: " << static_cast<uint32_t>(header.messageId); return stream; } -template<typename _CharT> -std::basic_ostream<_CharT>& operator<<(std::basic_ostream<_CharT>& stream, - const protocol_handler::ProtocolPacket& packet) { - stream << packet.packet_header() << - ", ConnectionID: " << static_cast<uint32_t>(packet.connection_id()) << - ", TotalDataBytes: " << (packet.total_data_bytes()) << - ", Data: " << static_cast<void*>(packet.data()); +template <typename _CharT> +std::basic_ostream<_CharT>& operator<<( + std::basic_ostream<_CharT>& stream, + const protocol_handler::ProtocolPacket& packet) { + stream << packet.packet_header() + << ", ConnectionID: " << static_cast<uint32_t>(packet.connection_id()) + << ", TotalDataBytes: " << (packet.total_data_bytes()) + << ", Data: " << static_cast<void*>(packet.data()); return stream; } -template<typename _CharT> +template <typename _CharT> std::basic_ostream<_CharT>& operator<<(std::basic_ostream<_CharT>& stream, const ProtocolFramePtr packet_ptr) { - if(packet_ptr) { + if (packet_ptr) { return stream << *packet_ptr; } return stream << "empty smart pointer"; diff --git a/src/components/protocol_handler/include/protocol_handler/protocol_payload.h b/src/components/protocol_handler/include/protocol_handler/protocol_payload.h index 861d29d4d4..ed61d3588d 100644 --- a/src/components/protocol_handler/include/protocol_handler/protocol_payload.h +++ b/src/components/protocol_handler/include/protocol_handler/protocol_payload.h @@ -48,9 +48,11 @@ namespace protocol_handler { // Applink Protocolv5 4.1.2 Protocol Payload Binary header struct ProtocolPayloadHeaderV2 { ProtocolPayloadHeaderV2() - : rpc_type(kRpcTypeReserved), - rpc_function_id(0), correlation_id(0), json_size(0) {} - RpcType rpc_type; + : rpc_type(kRpcTypeReserved) + , rpc_function_id(0) + , correlation_id(0) + , json_size(0) {} + RpcType rpc_type; uint32_t rpc_function_id; uint32_t correlation_id; uint32_t json_size; @@ -66,14 +68,18 @@ struct ProtocolPayloadV2 { // Procedures that extract and validate defined protocol structures from // a bit stream. // If error during parsing is detected, bit stream is marked as invalid -void Extract(utils::BitStream *bs, ProtocolPayloadHeaderV2 *headerv2); -void Extract(utils::BitStream *bs, ProtocolPayloadV2 *payload, size_t payload_size); +void Extract(utils::BitStream* bs, ProtocolPayloadHeaderV2* headerv2); +void Extract(utils::BitStream* bs, + ProtocolPayloadV2* payload, + size_t payload_size); -std::ostream &operator<<(std::ostream &os, const ProtocolPayloadHeaderV2 &payload_header); -std::ostream &operator<<(std::ostream &os, const ProtocolPayloadV2 &payload); +std::ostream& operator<<(std::ostream& os, + const ProtocolPayloadHeaderV2& payload_header); +std::ostream& operator<<(std::ostream& os, const ProtocolPayloadV2& payload); -//Add for tests +// Add for tests size_t ProtocolPayloadV2SizeBits(); -} // namespace protocol_handler +} // namespace protocol_handler -#endif /* SRC_COMPONENTS_PROTOCOL_HANDLER_INCLUDE_PROTOCOL_HANDLER_PROTOCOL_PAYLOAD_H_ */ +#endif /* SRC_COMPONENTS_PROTOCOL_HANDLER_INCLUDE_PROTOCOL_HANDLER_PROTOCOL_PAYLOAD_H_ \ + */ diff --git a/src/components/protocol_handler/include/protocol_handler/telemetry_observer.h b/src/components/protocol_handler/include/protocol_handler/telemetry_observer.h index f0923623e0..1f4c1ebcb5 100644 --- a/src/components/protocol_handler/include/protocol_handler/telemetry_observer.h +++ b/src/components/protocol_handler/include/protocol_handler/telemetry_observer.h @@ -48,9 +48,10 @@ class PHTelemetryObserver { TimevalStruct begin; TimevalStruct end; }; - virtual void StartMessageProcess(uint32_t message_id, const TimevalStruct &start_time) = 0; + virtual void StartMessageProcess(uint32_t message_id, + const TimevalStruct& start_time) = 0; virtual void EndMessageProcess(utils::SharedPtr<MessageMetric> m) = 0; - virtual ~PHTelemetryObserver(){} + virtual ~PHTelemetryObserver() {} }; } // protocol_handler #endif // SRC_COMPONENTS_PROTOCOL_HANDLER_INCLUDE_PROTOCOL_HANDLER_TIME_METRIC_OBSERVER_H_ |