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

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

Issue 1411103012: A little cleanup in the p2ptransportchannel. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Created 5 years, 1 month 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/p2ptransportchannel.cc ('k') | no next file » | 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 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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 // indicates where and how we are currently sending media. 147 // indicates where and how we are currently sending media.
148 sigslot::signal2<TransportChannel*, const Candidate&> SignalRouteChange; 148 sigslot::signal2<TransportChannel*, const Candidate&> SignalRouteChange;
149 149
150 // Invoked when the channel is being destroyed. 150 // Invoked when the channel is being destroyed.
151 sigslot::signal1<TransportChannel*> SignalDestroyed; 151 sigslot::signal1<TransportChannel*> SignalDestroyed;
152 152
153 // Debugging description of this transport channel. 153 // Debugging description of this transport channel.
154 std::string ToString() const; 154 std::string ToString() const;
155 155
156 protected: 156 protected:
157 // TODO(honghaiz): Remove this once chromium's unit tests no longer call it.
158 void set_readable(bool readable) { set_receiving(readable); }
159
160 // Sets the writable state, signaling if necessary. 157 // Sets the writable state, signaling if necessary.
161 void set_writable(bool writable); 158 void set_writable(bool writable);
162 159
163 // Sets the receiving state, signaling if necessary. 160 // Sets the receiving state, signaling if necessary.
164 void set_receiving(bool receiving); 161 void set_receiving(bool receiving);
165 162
166 // Sets the DTLS state, signaling if necessary. 163 // Sets the DTLS state, signaling if necessary.
167 void set_dtls_state(DtlsTransportState state); 164 void set_dtls_state(DtlsTransportState state);
168 165
169 private: 166 private:
170 // Used mostly for debugging. 167 // Used mostly for debugging.
171 std::string transport_name_; 168 std::string transport_name_;
172 int component_; 169 int component_;
173 bool writable_; 170 bool writable_;
174 bool receiving_; 171 bool receiving_;
175 DtlsTransportState dtls_state_ = DTLS_TRANSPORT_NEW; 172 DtlsTransportState dtls_state_ = DTLS_TRANSPORT_NEW;
176 173
177 RTC_DISALLOW_COPY_AND_ASSIGN(TransportChannel); 174 RTC_DISALLOW_COPY_AND_ASSIGN(TransportChannel);
178 }; 175 };
179 176
180 } // namespace cricket 177 } // namespace cricket
181 178
182 #endif // WEBRTC_P2P_BASE_TRANSPORTCHANNEL_H_ 179 #endif // WEBRTC_P2P_BASE_TRANSPORTCHANNEL_H_
OLDNEW
« no previous file with comments | « webrtc/p2p/base/p2ptransportchannel.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698