| 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 // implemented these APIs. They should all just return the values the | 118 // implemented these APIs. They should all just return the values the |
| 119 // DataChannel was created with. | 119 // DataChannel was created with. |
| 120 virtual bool ordered() const { return false; } | 120 virtual bool ordered() const { return false; } |
| 121 virtual uint16_t maxRetransmitTime() const { return 0; } | 121 virtual uint16_t maxRetransmitTime() const { return 0; } |
| 122 virtual uint16_t maxRetransmits() const { return 0; } | 122 virtual uint16_t maxRetransmits() const { return 0; } |
| 123 virtual std::string protocol() const { return std::string(); } | 123 virtual std::string protocol() const { return std::string(); } |
| 124 virtual bool negotiated() const { return false; } | 124 virtual bool negotiated() const { return false; } |
| 125 | 125 |
| 126 virtual int id() const = 0; | 126 virtual int id() const = 0; |
| 127 virtual DataState state() const = 0; | 127 virtual DataState state() const = 0; |
| 128 virtual uint32_t messages_sent() const = 0; |
| 129 virtual uint64_t bytes_sent() const = 0; |
| 130 virtual uint32_t messages_received() const = 0; |
| 131 virtual uint64_t bytes_received() const = 0; |
| 128 // The buffered_amount returns the number of bytes of application data | 132 // The buffered_amount returns the number of bytes of application data |
| 129 // (UTF-8 text and binary data) that have been queued using SendBuffer but | 133 // (UTF-8 text and binary data) that have been queued using SendBuffer but |
| 130 // have not yet been transmitted to the network. | 134 // have not yet been transmitted to the network. |
| 131 virtual uint64_t buffered_amount() const = 0; | 135 virtual uint64_t buffered_amount() const = 0; |
| 132 virtual void Close() = 0; | 136 virtual void Close() = 0; |
| 133 // Sends |data| to the remote peer. | 137 // Sends |data| to the remote peer. |
| 134 virtual bool Send(const DataBuffer& buffer) = 0; | 138 virtual bool Send(const DataBuffer& buffer) = 0; |
| 135 | 139 |
| 136 protected: | 140 protected: |
| 137 virtual ~DataChannelInterface() {} | 141 virtual ~DataChannelInterface() {} |
| 138 }; | 142 }; |
| 139 | 143 |
| 140 } // namespace webrtc | 144 } // namespace webrtc |
| 141 | 145 |
| 142 #endif // WEBRTC_API_DATACHANNELINTERFACE_H_ | 146 #endif // WEBRTC_API_DATACHANNELINTERFACE_H_ |
| OLD | NEW |