1 /* 2 * Copyright 2018 The WebRTC Project Authors. All rights reserved. 3 * 4 * Use of this source code is governed by a BSD-style license 5 * that can be found in the LICENSE file in the root of the source 6 * tree. An additional intellectual property rights grant can be found 7 * in the file PATENTS. All contributing project authors may 8 * be found in the AUTHORS file in the root of the source tree. 9 */ 10 11 #ifndef P2P_BASE_MOCK_ICE_AGENT_H_ 12 #define P2P_BASE_MOCK_ICE_AGENT_H_ 13 14 #include <vector> 15 16 #include "p2p/base/connection.h" 17 #include "p2p/base/ice_agent_interface.h" 18 #include "p2p/base/ice_switch_reason.h" 19 #include "p2p/base/transport_description.h" 20 #include "test/gmock.h" 21 22 namespace cricket { 23 24 class MockIceAgent : public IceAgentInterface { 25 public: 26 ~MockIceAgent() override = default; 27 28 MOCK_METHOD(int64_t, GetLastPingSentMs, (), (override, const)); 29 MOCK_METHOD(IceRole, GetIceRole, (), (override, const)); 30 MOCK_METHOD(void, OnStartedPinging, (), (override)); 31 MOCK_METHOD(void, UpdateConnectionStates, (), (override)); 32 MOCK_METHOD(void, UpdateState, (), (override)); 33 MOCK_METHOD(void, 34 ForgetLearnedStateForConnections, 35 (rtc::ArrayView<const Connection* const>), 36 (override)); 37 MOCK_METHOD(void, SendPingRequest, (const Connection*), (override)); 38 MOCK_METHOD(void, 39 SwitchSelectedConnection, 40 (const Connection*, IceSwitchReason), 41 (override)); 42 MOCK_METHOD(bool, 43 PruneConnections, 44 (rtc::ArrayView<const Connection* const>), 45 (override)); 46 }; 47 48 } // namespace cricket 49 50 #endif // P2P_BASE_MOCK_ICE_AGENT_H_ 51