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

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

Issue 2606123002: Remove the dependency of TransportChannel and TransportChannelImpl. (Closed)
Patch Set: Fix the memory leak. Created 3 years, 11 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/base/jseptransport_unittest.cc ('k') | webrtc/p2p/base/transportchannel.h » ('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 2016 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2016 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_PACKETTRANSPORTINTERFACE_H_ 11 #ifndef WEBRTC_P2P_BASE_PACKETTRANSPORTINTERFACE_H_
12 #define WEBRTC_P2P_BASE_PACKETTRANSPORTINTERFACE_H_ 12 #define WEBRTC_P2P_BASE_PACKETTRANSPORTINTERFACE_H_
13 13
14 #include <string> 14 #include <string>
15 #include <vector> 15 #include <vector>
16 16
17 // This is included for PacketOptions.
18 #include "webrtc/base/asyncpacketsocket.h"
17 #include "webrtc/base/sigslot.h" 19 #include "webrtc/base/sigslot.h"
18 #include "webrtc/base/socket.h" 20 #include "webrtc/base/socket.h"
19 21
20 namespace cricket { 22 namespace cricket {
21 class TransportChannel; 23 class TransportChannel;
22 } 24 }
23 25
24 namespace rtc { 26 namespace rtc {
25 struct PacketOptions; 27 struct PacketOptions;
26 struct PacketTime; 28 struct PacketTime;
27 struct SentPacket; 29 struct SentPacket;
28 30
29 class PacketTransportInterface : public sigslot::has_slots<> { 31 class PacketTransportInterface : public sigslot::has_slots<> {
30 public: 32 public:
31 virtual ~PacketTransportInterface() {} 33 virtual ~PacketTransportInterface() {}
32 34
33 // Identify the object for logging and debug purpose. 35 // Identify the object for logging and debug purpose.
34 virtual const std::string debug_name() const = 0; 36 virtual std::string debug_name() const = 0;
35 37
36 // The transport has been established. 38 // The transport has been established.
37 virtual bool writable() const = 0; 39 virtual bool writable() const = 0;
38 40
39 // The transport has received a packet in the last X milliseconds, here X is 41 // The transport has received a packet in the last X milliseconds, here X is
40 // configured by each implementation. 42 // configured by each implementation.
41 virtual bool receiving() const = 0; 43 virtual bool receiving() const = 0;
42 44
43 // Attempts to send the given packet. 45 // Attempts to send the given packet.
44 // The return value is < 0 on failure. The return value in failure case is not 46 // The return value is < 0 on failure. The return value in failure case is not
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 SignalReadPacket; 88 SignalReadPacket;
87 89
88 // Signalled each time a packet is sent on this channel. 90 // Signalled each time a packet is sent on this channel.
89 sigslot::signal2<PacketTransportInterface*, const rtc::SentPacket&> 91 sigslot::signal2<PacketTransportInterface*, const rtc::SentPacket&>
90 SignalSentPacket; 92 SignalSentPacket;
91 }; 93 };
92 94
93 } // namespace rtc 95 } // namespace rtc
94 96
95 #endif // WEBRTC_P2P_BASE_PACKETTRANSPORTINTERFACE_H_ 97 #endif // WEBRTC_P2P_BASE_PACKETTRANSPORTINTERFACE_H_
OLDNEW
« no previous file with comments | « webrtc/p2p/base/jseptransport_unittest.cc ('k') | webrtc/p2p/base/transportchannel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698