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

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

Issue 1363573002: Wire up transport sequence number / send time callbacks to webrtc via libjingle. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Add missing updated_options Created 5 years, 2 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
OLDNEW
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
(...skipping 30 matching lines...) Expand all
41 STATE_INIT, 41 STATE_INIT,
42 STATE_CONNECTING, // Will enter this state once a connection is created 42 STATE_CONNECTING, // Will enter this state once a connection is created
43 STATE_COMPLETED, 43 STATE_COMPLETED,
44 STATE_FAILED 44 STATE_FAILED
45 }; 45 };
46 46
47 // A TransportChannel represents one logical stream of packets that are sent 47 // A TransportChannel represents one logical stream of packets that are sent
48 // between the two sides of a session. 48 // between the two sides of a session.
49 class TransportChannel : public sigslot::has_slots<> { 49 class TransportChannel : public sigslot::has_slots<> {
50 public: 50 public:
51 explicit TransportChannel(const std::string& transport_name, int component) 51 TransportChannel(const std::string& transport_name, int component)
52 : transport_name_(transport_name), 52 : transport_name_(transport_name),
53 component_(component), 53 component_(component),
54 writable_(false), 54 writable_(false),
55 receiving_(false) {} 55 receiving_(false) {}
56 virtual ~TransportChannel() {} 56 virtual ~TransportChannel() {}
57 57
58 // TODO(guoweis) - Make this pure virtual once all subclasses of 58 // TODO(guoweis) - Make this pure virtual once all subclasses of
59 // TransportChannel have this defined. 59 // TransportChannel have this defined.
60 virtual TransportChannelState GetState() const { 60 virtual TransportChannelState GetState() const {
61 return TransportChannelState::STATE_CONNECTING; 61 return TransportChannelState::STATE_CONNECTING;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 const uint8_t* context, 127 const uint8_t* context,
128 size_t context_len, 128 size_t context_len,
129 bool use_context, 129 bool use_context,
130 uint8_t* result, 130 uint8_t* result,
131 size_t result_len) = 0; 131 size_t result_len) = 0;
132 132
133 // Signalled each time a packet is received on this channel. 133 // Signalled each time a packet is received on this channel.
134 sigslot::signal5<TransportChannel*, const char*, 134 sigslot::signal5<TransportChannel*, const char*,
135 size_t, const rtc::PacketTime&, int> SignalReadPacket; 135 size_t, const rtc::PacketTime&, int> SignalReadPacket;
136 136
137 // Signalled each time a packet is sent on this channel.
138 sigslot::signal2<TransportChannel*, const rtc::SentPacket&> SignalSentPacket;
139
137 // This signal occurs when there is a change in the way that packets are 140 // This signal occurs when there is a change in the way that packets are
138 // being routed, i.e. to a different remote location. The candidate 141 // being routed, i.e. to a different remote location. The candidate
139 // indicates where and how we are currently sending media. 142 // indicates where and how we are currently sending media.
140 sigslot::signal2<TransportChannel*, const Candidate&> SignalRouteChange; 143 sigslot::signal2<TransportChannel*, const Candidate&> SignalRouteChange;
141 144
142 // Invoked when the channel is being destroyed. 145 // Invoked when the channel is being destroyed.
143 sigslot::signal1<TransportChannel*> SignalDestroyed; 146 sigslot::signal1<TransportChannel*> SignalDestroyed;
144 147
145 // Debugging description of this transport channel. 148 // Debugging description of this transport channel.
146 std::string ToString() const; 149 std::string ToString() const;
(...skipping 14 matching lines...) Expand all
161 int component_; 164 int component_;
162 bool writable_; 165 bool writable_;
163 bool receiving_; 166 bool receiving_;
164 167
165 RTC_DISALLOW_COPY_AND_ASSIGN(TransportChannel); 168 RTC_DISALLOW_COPY_AND_ASSIGN(TransportChannel);
166 }; 169 };
167 170
168 } // namespace cricket 171 } // namespace cricket
169 172
170 #endif // WEBRTC_P2P_BASE_TRANSPORTCHANNEL_H_ 173 #endif // WEBRTC_P2P_BASE_TRANSPORTCHANNEL_H_
OLDNEW
« webrtc/call.h ('K') | « webrtc/p2p/base/stunport.cc ('k') | webrtc/transport.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698