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

Unified Diff: webrtc/p2p/base/transportchannel.h

Issue 1356103002: Revert of Replace readable with receiving where receiving means receiving anything (stun ping, response or da… (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/p2p/base/transport.cc ('k') | webrtc/p2p/base/transportchannel.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/transportchannel.h
diff --git a/webrtc/p2p/base/transportchannel.h b/webrtc/p2p/base/transportchannel.h
index 60d1ed0b35f0138537f331367bdd28d8067a535c..f492e4e000ee5d27bc0e7dd3c47df6c6ca6e8fa0 100644
--- a/webrtc/p2p/base/transportchannel.h
+++ b/webrtc/p2p/base/transportchannel.h
@@ -46,8 +46,7 @@
explicit TransportChannel(const std::string& content_name, int component)
: content_name_(content_name),
component_(component),
- writable_(false),
- receiving_(false) {}
+ readable_(false), writable_(false), receiving_(false) {}
virtual ~TransportChannel() {}
// TODO(guoweis) - Make this pure virtual once all subclasses of
@@ -63,10 +62,13 @@
const std::string& content_name() const { return content_name_; }
int component() const { return component_; }
- // Returns the states of this channel. Each time one of these states changes,
- // a signal is raised. These states are aggregated by the TransportManager.
+ // Returns the readable and states of this channel. Each time one of these
+ // states changes, a signal is raised. These states are aggregated by the
+ // TransportManager.
+ bool readable() const { return readable_; }
bool writable() const { return writable_; }
bool receiving() const { return receiving_; }
+ sigslot::signal1<TransportChannel*> SignalReadableState;
sigslot::signal1<TransportChannel*> SignalWritableState;
// Emitted when the TransportChannel's ability to send has changed.
sigslot::signal1<TransportChannel*> SignalReadyToSend;
@@ -137,6 +139,8 @@
std::string ToString() const;
protected:
+ // Sets the readable state, signaling if necessary.
+ void set_readable(bool readable);
// Sets the writable state, signaling if necessary.
void set_writable(bool writable);
@@ -149,6 +153,7 @@
// Used mostly for debugging.
std::string content_name_;
int component_;
+ bool readable_;
bool writable_;
bool receiving_;
« no previous file with comments | « webrtc/p2p/base/transport.cc ('k') | webrtc/p2p/base/transportchannel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698