Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(312)

Side by Side Diff: webrtc/p2p/base/dtlstransportchannel.h

Issue 2679103006: Rename "PacketTransportInterface" to "PacketTransportInternal". (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/p2p/BUILD.gn ('k') | webrtc/p2p/base/dtlstransportchannel.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2011 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_DTLSTRANSPORTCHANNEL_H_ 11 #ifndef WEBRTC_P2P_BASE_DTLSTRANSPORTCHANNEL_H_
12 #define WEBRTC_P2P_BASE_DTLSTRANSPORTCHANNEL_H_ 12 #define WEBRTC_P2P_BASE_DTLSTRANSPORTCHANNEL_H_
13 13
14 #include <memory> 14 #include <memory>
15 #include <string> 15 #include <string>
16 #include <vector> 16 #include <vector>
17 17
18 #include "webrtc/base/buffer.h" 18 #include "webrtc/base/buffer.h"
19 #include "webrtc/base/bufferqueue.h" 19 #include "webrtc/base/bufferqueue.h"
20 #include "webrtc/base/constructormagic.h" 20 #include "webrtc/base/constructormagic.h"
21 #include "webrtc/base/sslstreamadapter.h" 21 #include "webrtc/base/sslstreamadapter.h"
22 #include "webrtc/base/stream.h" 22 #include "webrtc/base/stream.h"
23 #include "webrtc/p2p/base/dtlstransportinternal.h" 23 #include "webrtc/p2p/base/dtlstransportinternal.h"
24 #include "webrtc/p2p/base/icetransportinternal.h" 24 #include "webrtc/p2p/base/icetransportinternal.h"
25 25
26 namespace rtc { 26 namespace rtc {
27 class PacketTransportInterface; 27 class PacketTransportInternal;
28 } 28 }
29 29
30 namespace cricket { 30 namespace cricket {
31 31
32 // A bridge between a packet-oriented/transport-type interface on 32 // A bridge between a packet-oriented/transport-type interface on
33 // the bottom and a StreamInterface on the top. 33 // the bottom and a StreamInterface on the top.
34 class StreamInterfaceChannel : public rtc::StreamInterface { 34 class StreamInterfaceChannel : public rtc::StreamInterface {
35 public: 35 public:
36 explicit StreamInterfaceChannel(IceTransportInternal* ice_transport); 36 explicit StreamInterfaceChannel(IceTransportInternal* ice_transport);
37 37
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 std::string ToString() const { 185 std::string ToString() const {
186 const char RECEIVING_ABBREV[2] = {'_', 'R'}; 186 const char RECEIVING_ABBREV[2] = {'_', 'R'};
187 const char WRITABLE_ABBREV[2] = {'_', 'W'}; 187 const char WRITABLE_ABBREV[2] = {'_', 'W'};
188 std::stringstream ss; 188 std::stringstream ss;
189 ss << "DtlsTransport[" << transport_name_ << "|" << component_ << "|" 189 ss << "DtlsTransport[" << transport_name_ << "|" << component_ << "|"
190 << RECEIVING_ABBREV[receiving()] << WRITABLE_ABBREV[writable()] << "]"; 190 << RECEIVING_ABBREV[receiving()] << WRITABLE_ABBREV[writable()] << "]";
191 return ss.str(); 191 return ss.str();
192 } 192 }
193 193
194 private: 194 private:
195 void OnWritableState(rtc::PacketTransportInterface* transport); 195 void OnWritableState(rtc::PacketTransportInternal* transport);
196 void OnReadPacket(rtc::PacketTransportInterface* transport, 196 void OnReadPacket(rtc::PacketTransportInternal* transport,
197 const char* data, 197 const char* data,
198 size_t size, 198 size_t size,
199 const rtc::PacketTime& packet_time, 199 const rtc::PacketTime& packet_time,
200 int flags); 200 int flags);
201 void OnSentPacket(rtc::PacketTransportInterface* transport, 201 void OnSentPacket(rtc::PacketTransportInternal* transport,
202 const rtc::SentPacket& sent_packet); 202 const rtc::SentPacket& sent_packet);
203 void OnReadyToSend(rtc::PacketTransportInterface* transport); 203 void OnReadyToSend(rtc::PacketTransportInternal* transport);
204 void OnReceivingState(rtc::PacketTransportInterface* transport); 204 void OnReceivingState(rtc::PacketTransportInternal* transport);
205 void OnDtlsEvent(rtc::StreamInterface* stream_, int sig, int err); 205 void OnDtlsEvent(rtc::StreamInterface* stream_, int sig, int err);
206 bool SetupDtls(); 206 bool SetupDtls();
207 void MaybeStartDtls(); 207 void MaybeStartDtls();
208 bool HandleDtlsPacket(const char* data, size_t size); 208 bool HandleDtlsPacket(const char* data, size_t size);
209 void OnDtlsHandshakeError(rtc::SSLHandshakeError error); 209 void OnDtlsHandshakeError(rtc::SSLHandshakeError error);
210 void ConfigureHandshakeTimeout(); 210 void ConfigureHandshakeTimeout();
211 211
212 void set_receiving(bool receiving); 212 void set_receiving(bool receiving);
213 void set_writable(bool writable); 213 void set_writable(bool writable);
214 // Sets the DTLS state, signaling if necessary. 214 // Sets the DTLS state, signaling if necessary.
(...skipping 23 matching lines...) Expand all
238 238
239 bool receiving_ = false; 239 bool receiving_ = false;
240 bool writable_ = false; 240 bool writable_ = false;
241 241
242 RTC_DISALLOW_COPY_AND_ASSIGN(DtlsTransport); 242 RTC_DISALLOW_COPY_AND_ASSIGN(DtlsTransport);
243 }; 243 };
244 244
245 } // namespace cricket 245 } // namespace cricket
246 246
247 #endif // WEBRTC_P2P_BASE_DTLSTRANSPORTCHANNEL_H_ 247 #endif // WEBRTC_P2P_BASE_DTLSTRANSPORTCHANNEL_H_
OLDNEW
« no previous file with comments | « webrtc/p2p/BUILD.gn ('k') | webrtc/p2p/base/dtlstransportchannel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698