| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 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 |
| 11 #ifndef WEBRTC_P2P_BASE_TRANSPORTCHANNEL_H_ | 11 #ifndef WEBRTC_P2P_BASE_TRANSPORTCHANNEL_H_ |
| 12 #define WEBRTC_P2P_BASE_TRANSPORTCHANNEL_H_ | 12 #define WEBRTC_P2P_BASE_TRANSPORTCHANNEL_H_ |
| 13 | 13 |
| 14 #include <string> | 14 #include <string> |
| 15 #include <vector> | 15 #include <vector> |
| 16 | 16 |
| 17 #include "webrtc/p2p/base/candidate.h" | 17 #include "webrtc/p2p/base/candidate.h" |
| 18 #include "webrtc/p2p/base/candidatepairinterface.h" |
| 18 #include "webrtc/p2p/base/transport.h" | 19 #include "webrtc/p2p/base/transport.h" |
| 19 #include "webrtc/p2p/base/transportdescription.h" | 20 #include "webrtc/p2p/base/transportdescription.h" |
| 20 #include "webrtc/base/asyncpacketsocket.h" | 21 #include "webrtc/base/asyncpacketsocket.h" |
| 21 #include "webrtc/base/basictypes.h" | 22 #include "webrtc/base/basictypes.h" |
| 22 #include "webrtc/base/dscp.h" | 23 #include "webrtc/base/dscp.h" |
| 23 #include "webrtc/base/sigslot.h" | 24 #include "webrtc/base/sigslot.h" |
| 24 #include "webrtc/base/socket.h" | 25 #include "webrtc/base/socket.h" |
| 25 #include "webrtc/base/sslidentity.h" | 26 #include "webrtc/base/sslidentity.h" |
| 26 #include "webrtc/base/sslstreamadapter.h" | 27 #include "webrtc/base/sslstreamadapter.h" |
| 27 | 28 |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 uint8_t* result, | 140 uint8_t* result, |
| 140 size_t result_len) = 0; | 141 size_t result_len) = 0; |
| 141 | 142 |
| 142 // Signalled each time a packet is received on this channel. | 143 // Signalled each time a packet is received on this channel. |
| 143 sigslot::signal5<TransportChannel*, const char*, | 144 sigslot::signal5<TransportChannel*, const char*, |
| 144 size_t, const rtc::PacketTime&, int> SignalReadPacket; | 145 size_t, const rtc::PacketTime&, int> SignalReadPacket; |
| 145 | 146 |
| 146 // Signalled each time a packet is sent on this channel. | 147 // Signalled each time a packet is sent on this channel. |
| 147 sigslot::signal2<TransportChannel*, const rtc::SentPacket&> SignalSentPacket; | 148 sigslot::signal2<TransportChannel*, const rtc::SentPacket&> SignalSentPacket; |
| 148 | 149 |
| 150 // Deprecated by SignalSelectedCandidatePairChanged |
| 149 // This signal occurs when there is a change in the way that packets are | 151 // This signal occurs when there is a change in the way that packets are |
| 150 // being routed, i.e. to a different remote location. The candidate | 152 // being routed, i.e. to a different remote location. The candidate |
| 151 // indicates where and how we are currently sending media. | 153 // indicates where and how we are currently sending media. |
| 152 sigslot::signal2<TransportChannel*, const Candidate&> SignalRouteChange; | 154 sigslot::signal2<TransportChannel*, const Candidate&> SignalRouteChange; |
| 153 | 155 |
| 156 // Signalled when the current selected candidate pair has changed. |
| 157 // The first parameter is the transport channel that signals the event. |
| 158 // The second parameter is the new selected candidate pair. |
| 159 sigslot::signal2<TransportChannel*, CandidatePairInterface*> |
| 160 SignalSelectedCandidatePairChanged; |
| 161 |
| 154 // Invoked when the channel is being destroyed. | 162 // Invoked when the channel is being destroyed. |
| 155 sigslot::signal1<TransportChannel*> SignalDestroyed; | 163 sigslot::signal1<TransportChannel*> SignalDestroyed; |
| 156 | 164 |
| 157 // Debugging description of this transport channel. | 165 // Debugging description of this transport channel. |
| 158 std::string ToString() const; | 166 std::string ToString() const; |
| 159 | 167 |
| 160 protected: | 168 protected: |
| 161 // Sets the writable state, signaling if necessary. | 169 // Sets the writable state, signaling if necessary. |
| 162 void set_writable(bool writable); | 170 void set_writable(bool writable); |
| 163 | 171 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 174 bool writable_; | 182 bool writable_; |
| 175 bool receiving_; | 183 bool receiving_; |
| 176 DtlsTransportState dtls_state_ = DTLS_TRANSPORT_NEW; | 184 DtlsTransportState dtls_state_ = DTLS_TRANSPORT_NEW; |
| 177 | 185 |
| 178 RTC_DISALLOW_COPY_AND_ASSIGN(TransportChannel); | 186 RTC_DISALLOW_COPY_AND_ASSIGN(TransportChannel); |
| 179 }; | 187 }; |
| 180 | 188 |
| 181 } // namespace cricket | 189 } // namespace cricket |
| 182 | 190 |
| 183 #endif // WEBRTC_P2P_BASE_TRANSPORTCHANNEL_H_ | 191 #endif // WEBRTC_P2P_BASE_TRANSPORTCHANNEL_H_ |
| OLD | NEW |