OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2012 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 virtual bool Send(const DataBuffer& buffer); | 137 virtual bool Send(const DataBuffer& buffer); |
138 | 138 |
139 // rtc::MessageHandler override. | 139 // rtc::MessageHandler override. |
140 virtual void OnMessage(rtc::Message* msg); | 140 virtual void OnMessage(rtc::Message* msg); |
141 | 141 |
142 // Called when the channel's ready to use. That can happen when the | 142 // Called when the channel's ready to use. That can happen when the |
143 // underlying DataMediaChannel becomes ready, or when this channel is a new | 143 // underlying DataMediaChannel becomes ready, or when this channel is a new |
144 // stream on an existing DataMediaChannel, and we've finished negotiation. | 144 // stream on an existing DataMediaChannel, and we've finished negotiation. |
145 void OnChannelReady(bool writable); | 145 void OnChannelReady(bool writable); |
146 | 146 |
147 // Slots for provider to connect signals to. | 147 // Sigslots from cricket::DataChannel |
148 void OnDataReceived(const cricket::ReceiveDataParams& params, | 148 void OnDataReceived(cricket::DataChannel* channel, |
| 149 const cricket::ReceiveDataParams& params, |
149 const rtc::CopyOnWriteBuffer& payload); | 150 const rtc::CopyOnWriteBuffer& payload); |
150 void OnStreamClosedRemotely(int sid); | 151 void OnStreamClosedRemotely(uint32_t sid); |
151 | 152 |
152 // The remote peer request that this channel should be closed. | 153 // The remote peer request that this channel should be closed. |
153 void RemotePeerRequestClose(); | 154 void RemotePeerRequestClose(); |
154 | 155 |
155 // The following methods are for SCTP only. | 156 // The following methods are for SCTP only. |
156 | 157 |
157 // Sets the SCTP sid and adds to transport layer if not set yet. Should only | 158 // Sets the SCTP sid and adds to transport layer if not set yet. Should only |
158 // be called once. | 159 // be called once. |
159 void SetSctpSid(int sid); | 160 void SetSctpSid(int sid); |
160 // Called when the transport channel is created. | 161 // Called when the transport channel is created. |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 PROXY_CONSTMETHOD0(uint32_t, messages_received) | 289 PROXY_CONSTMETHOD0(uint32_t, messages_received) |
289 PROXY_CONSTMETHOD0(uint64_t, bytes_received) | 290 PROXY_CONSTMETHOD0(uint64_t, bytes_received) |
290 PROXY_CONSTMETHOD0(uint64_t, buffered_amount) | 291 PROXY_CONSTMETHOD0(uint64_t, buffered_amount) |
291 PROXY_METHOD0(void, Close) | 292 PROXY_METHOD0(void, Close) |
292 PROXY_METHOD1(bool, Send, const DataBuffer&) | 293 PROXY_METHOD1(bool, Send, const DataBuffer&) |
293 END_SIGNALING_PROXY() | 294 END_SIGNALING_PROXY() |
294 | 295 |
295 } // namespace webrtc | 296 } // namespace webrtc |
296 | 297 |
297 #endif // WEBRTC_API_DATACHANNEL_H_ | 298 #endif // WEBRTC_API_DATACHANNEL_H_ |
OLD | NEW |