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

Side by Side Diff: talk/app/webrtc/datachannelinterface.h

Issue 1207613006: Support for onbufferedamountlow (Closed) Base URL: https://chromium.googlesource.com/external/webrtc/trunk/talk.git@master
Patch Set: Fix path problems Created 5 years, 5 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 * libjingle 2 * libjingle
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 // Indicates if the received data contains UTF-8 or binary data. 82 // Indicates if the received data contains UTF-8 or binary data.
83 // Note that the upper layers are left to verify the UTF-8 encoding. 83 // Note that the upper layers are left to verify the UTF-8 encoding.
84 // TODO(jiayl): prefer to use an enum instead of a bool. 84 // TODO(jiayl): prefer to use an enum instead of a bool.
85 bool binary; 85 bool binary;
86 }; 86 };
87 87
88 class DataChannelObserver { 88 class DataChannelObserver {
89 public: 89 public:
90 // The data channel state have changed. 90 // The data channel state have changed.
91 virtual void OnStateChange() = 0; 91 virtual void OnStateChange() = 0;
92 // The data channel's buffered_amount has changed.
93 virtual void OnBufferedAmountChange(uint64 previous_amount) = 0;
92 // A data buffer was successfully received. 94 // A data buffer was successfully received.
93 virtual void OnMessage(const DataBuffer& buffer) = 0; 95 virtual void OnMessage(const DataBuffer& buffer) = 0;
94 96
95 protected: 97 protected:
96 virtual ~DataChannelObserver() {} 98 virtual ~DataChannelObserver() {}
97 }; 99 };
98 100
99 class DataChannelInterface : public rtc::RefCountInterface { 101 class DataChannelInterface : public rtc::RefCountInterface {
100 public: 102 public:
101 // Keep in sync with DataChannel.java:State and 103 // Keep in sync with DataChannel.java:State and
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 // Sends |data| to the remote peer. 150 // Sends |data| to the remote peer.
149 virtual bool Send(const DataBuffer& buffer) = 0; 151 virtual bool Send(const DataBuffer& buffer) = 0;
150 152
151 protected: 153 protected:
152 virtual ~DataChannelInterface() {} 154 virtual ~DataChannelInterface() {}
153 }; 155 };
154 156
155 } // namespace webrtc 157 } // namespace webrtc
156 158
157 #endif // TALK_APP_WEBRTC_DATACHANNELINTERFACE_H_ 159 #endif // TALK_APP_WEBRTC_DATACHANNELINTERFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698