Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 /* | |
| 2 * Copyright 2016 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 WEBRTC_BASE_NETWORK_ROUTE_H_ | |
| 12 #define WEBRTC_BASE_NETWORK_ROUTE_H_ | |
| 13 | |
| 14 namespace cricket { | |
|
pthatcher1
2016/03/24 18:46:36
It seems like this shouldn't be in base/. We don'
honghaiz3
2016/03/24 22:37:11
If we do that, call dir has to include webrtc/medi
pthatcher1
2016/03/25 21:30:21
Yeah, since the network code doesn't depend on the
honghaiz3
2016/03/28 04:03:16
Done. Thanks!
| |
| 15 | |
| 16 struct NetworkRoute { | |
| 17 bool connected; | |
| 18 uint16_t local_network_id; | |
| 19 uint16_t remote_network_id; | |
| 20 | |
| 21 NetworkRoute(): connected(false), local_network_id(0), remote_network_id(0) {} | |
| 22 | |
| 23 // The route is connected if the local and remote network ids are provided. | |
| 24 NetworkRoute(uint16_t local_net_id, uint16_t remote_net_id) | |
| 25 : connected(true), | |
| 26 local_network_id(local_net_id), | |
| 27 remote_network_id(remote_net_id) {} | |
| 28 | |
| 29 bool operator==(const NetworkRoute& nr) const { | |
| 30 return connected == nr.connected && | |
| 31 local_network_id == nr.local_network_id && | |
| 32 remote_network_id == nr.remote_network_id; | |
| 33 } | |
| 34 | |
| 35 bool operator!=(const NetworkRoute& nr) const { return !(*this == nr); } | |
| 36 }; | |
| 37 } // namespace cricket | |
| 38 | |
| 39 #endif // WEBRTC_BASE_NETWORK_ROUTE_H_ | |
| OLD | NEW |