/******************************************************************************** * Copyright (c) 2025-2026 ZF Friedrichshafen AG * * This program and the accompanying materials are made available under the * terms of the Apache License Version 2.0 which is available at * https://www.apache.org/licenses/LICENSE-2.0 * * SPDX-License-Identifier: Apache-2.0 * * Contributors: * Denisa Ros - initial API and implementation ********************************************************************************/ #ifdef _WIN32 #ifndef UDS_WIN_TUNNEL_WATCHDOG_H #define UDS_WIN_TUNNEL_WATCHDOG_H #include #include #include class CWinTunnelConnectionWatchDog { public: template void AddConnection(const std::shared_ptr& connection) { if (!connection) { return; } AddConnectionImpl(std::static_pointer_cast(connection)); } void RemoveConnection(const void* connection); void Clear(); private: void AddConnectionImpl(const std::shared_ptr& connection); std::mutex m_Mutex; std::map> m_Connections; }; #endif // UDS_WIN_TUNNEL_WATCHDOG_H #endif // _WIN32