| 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 API_TRANSPORT_ENUMS_H_ |
| 12 | #define API_TRANSPORT_ENUMS_H_ |
| 13 |
| 14 | namespace webrtc { |
| 15 |
| 16 | // See https://w3c.github.io/webrtc-pc/#rtcicetransportstate |
| 17 | // Note that kFailed is currently not a terminal state, and a transport might |
| 18 | // incorrectly be marked as failed while gathering candidates, see |
| 19 | // bugs.webrtc.org/8833 |
| 20 | enum class IceTransportState { |
| 21 | kNew, |
| 22 | kChecking, |
| 23 | kConnected, |
| 24 | kCompleted, |
| 25 | kFailed, |
| 26 | kDisconnected, |
| 27 | kClosed, |
| 28 | }; |
| 29 |
| 30 | enum PortPrunePolicy { |
| 31 | NO_PRUNE, // Do not prune. |
| 32 | PRUNE_BASED_ON_PRIORITY, // Prune lower-priority ports on the same network. |
| 33 | KEEP_FIRST_READY // Keep the first ready port and prune the rest |
| 34 | // on the same network. |
| 35 | }; |
| 36 |
| 37 | enum class VpnPreference { |
| 38 | kDefault, // No VPN preference. |
| 39 | kOnlyUseVpn, // only use VPN connections. |
| 40 | kNeverUseVpn, // never use VPN connections |
| 41 | kPreferVpn, // use a VPN connection if possible, |
| 42 | // i.e VPN connections sorts first. |
| 43 | kAvoidVpn, // only use VPN if there is no other connections, |
| 44 | // i.e VPN connections sorts last. |
| 45 | }; |
| 46 |
| 47 | } // namespace webrtc |
| 48 |
| 49 | #endif // API_TRANSPORT_ENUMS_H_ |
| 50 |