1 /* 2 * Copyright 2022 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_ICE_SWITCH_REASON_H_ 12 #define P2P_BASE_ICE_SWITCH_REASON_H_ 13 14 #include <string> 15 16 namespace cricket { 17 18 enum class IceSwitchReason { 19 REMOTE_CANDIDATE_GENERATION_CHANGE, 20 NETWORK_PREFERENCE_CHANGE, 21 NEW_CONNECTION_FROM_LOCAL_CANDIDATE, 22 NEW_CONNECTION_FROM_REMOTE_CANDIDATE, 23 NEW_CONNECTION_FROM_UNKNOWN_REMOTE_ADDRESS, 24 NOMINATION_ON_CONTROLLED_SIDE, 25 DATA_RECEIVED, 26 CONNECT_STATE_CHANGE, 27 SELECTED_CONNECTION_DESTROYED, 28 // The ICE_CONTROLLER_RECHECK enum value lets an IceController request 29 // P2PTransportChannel to recheck a switch periodically without an event 30 // taking place. 31 ICE_CONTROLLER_RECHECK, 32 }; 33 34 std::string IceSwitchReasonToString(IceSwitchReason reason); 35 36 } // namespace cricket 37 38 #endif // P2P_BASE_ICE_SWITCH_REASON_H_ 39