OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2012 The WebRTC Project Authors. All rights reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 StunMessage* request, const rtc::SocketAddress& addr, | 100 StunMessage* request, const rtc::SocketAddress& addr, |
101 int error_code, const std::string& reason) = 0; | 101 int error_code, const std::string& reason) = 0; |
102 | 102 |
103 // Signaled when this port decides to delete itself because it no longer has | 103 // Signaled when this port decides to delete itself because it no longer has |
104 // any usefulness. | 104 // any usefulness. |
105 sigslot::signal1<PortInterface*> SignalDestroyed; | 105 sigslot::signal1<PortInterface*> SignalDestroyed; |
106 | 106 |
107 // Signaled when the network used by this port becomes inactive. | 107 // Signaled when the network used by this port becomes inactive. |
108 sigslot::signal1<PortInterface*> SignalNetworkInactive; | 108 sigslot::signal1<PortInterface*> SignalNetworkInactive; |
109 | 109 |
| 110 // Signaled when the network cost of the port changes and the port has created |
| 111 // any connections. |
| 112 sigslot::signal1<PortInterface*> SignalNetworkCostChanged; |
| 113 |
110 // Signaled when Port discovers ice role conflict with the peer. | 114 // Signaled when Port discovers ice role conflict with the peer. |
111 sigslot::signal1<PortInterface*> SignalRoleConflict; | 115 sigslot::signal1<PortInterface*> SignalRoleConflict; |
112 | 116 |
113 // Normally, packets arrive through a connection (or they result signaling of | 117 // Normally, packets arrive through a connection (or they result signaling of |
114 // unknown address). Calling this method turns off delivery of packets | 118 // unknown address). Calling this method turns off delivery of packets |
115 // through their respective connection and instead delivers every packet | 119 // through their respective connection and instead delivers every packet |
116 // through this port. | 120 // through this port. |
117 virtual void EnablePortPackets() = 0; | 121 virtual void EnablePortPackets() = 0; |
118 sigslot::signal4<PortInterface*, const char*, size_t, | 122 sigslot::signal4<PortInterface*, const char*, size_t, |
119 const rtc::SocketAddress&> SignalReadPacket; | 123 const rtc::SocketAddress&> SignalReadPacket; |
120 | 124 |
121 // Emitted each time a packet is sent on this port. | 125 // Emitted each time a packet is sent on this port. |
122 sigslot::signal1<const rtc::SentPacket&> SignalSentPacket; | 126 sigslot::signal1<const rtc::SentPacket&> SignalSentPacket; |
123 | 127 |
124 virtual std::string ToString() const = 0; | 128 virtual std::string ToString() const = 0; |
125 | 129 |
126 protected: | 130 protected: |
127 PortInterface() {} | 131 PortInterface() {} |
128 }; | 132 }; |
129 | 133 |
130 } // namespace cricket | 134 } // namespace cricket |
131 | 135 |
132 #endif // WEBRTC_P2P_BASE_PORTINTERFACE_H_ | 136 #endif // WEBRTC_P2P_BASE_PORTINTERFACE_H_ |
OLD | NEW |