Patrik Höglund | 57fb315 | 2017-09-29 12:02:10 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2004 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 RTC_BASE_NETWORK_CONSTANTS_H_ |
| 12 | #define RTC_BASE_NETWORK_CONSTANTS_H_ |
| 13 | |
| 14 | #include <stdint.h> |
| 15 | |
| 16 | namespace rtc { |
| 17 | |
| 18 | static const uint16_t kNetworkCostMax = 999; |
| 19 | static const uint16_t kNetworkCostHigh = 900; |
| 20 | static const uint16_t kNetworkCostUnknown = 50; |
| 21 | static const uint16_t kNetworkCostLow = 10; |
| 22 | static const uint16_t kNetworkCostMin = 0; |
| 23 | |
| 24 | enum AdapterType { |
| 25 | // This enum resembles the one in Chromium net::ConnectionType. |
| 26 | ADAPTER_TYPE_UNKNOWN = 0, |
| 27 | ADAPTER_TYPE_ETHERNET = 1 << 0, |
| 28 | ADAPTER_TYPE_WIFI = 1 << 1, |
| 29 | ADAPTER_TYPE_CELLULAR = 1 << 2, |
| 30 | ADAPTER_TYPE_VPN = 1 << 3, |
| 31 | ADAPTER_TYPE_LOOPBACK = 1 << 4 |
| 32 | }; |
| 33 | |
| 34 | } // namespace rtc |
| 35 | |
| 36 | #endif // RTC_BASE_NETWORK_CONSTANTS_H_ |