OLD | NEW |
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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 switch (state) { | 113 switch (state) { |
114 case kConnecting: | 114 case kConnecting: |
115 return "connecting"; | 115 return "connecting"; |
116 case kOpen: | 116 case kOpen: |
117 return "open"; | 117 return "open"; |
118 case kClosing: | 118 case kClosing: |
119 return "closing"; | 119 return "closing"; |
120 case kClosed: | 120 case kClosed: |
121 return "closed"; | 121 return "closed"; |
122 } | 122 } |
123 CHECK(false) << "Unknown DataChannel state: " << state; | 123 RTC_CHECK(false) << "Unknown DataChannel state: " << state; |
124 return ""; | 124 return ""; |
125 } | 125 } |
126 | 126 |
127 virtual void RegisterObserver(DataChannelObserver* observer) = 0; | 127 virtual void RegisterObserver(DataChannelObserver* observer) = 0; |
128 virtual void UnregisterObserver() = 0; | 128 virtual void UnregisterObserver() = 0; |
129 // The label attribute represents a label that can be used to distinguish this | 129 // The label attribute represents a label that can be used to distinguish this |
130 // DataChannel object from other DataChannel objects. | 130 // DataChannel object from other DataChannel objects. |
131 virtual std::string label() const = 0; | 131 virtual std::string label() const = 0; |
132 virtual bool reliable() const = 0; | 132 virtual bool reliable() const = 0; |
133 | 133 |
(...skipping 16 matching lines...) Expand all Loading... |
150 // Sends |data| to the remote peer. | 150 // Sends |data| to the remote peer. |
151 virtual bool Send(const DataBuffer& buffer) = 0; | 151 virtual bool Send(const DataBuffer& buffer) = 0; |
152 | 152 |
153 protected: | 153 protected: |
154 virtual ~DataChannelInterface() {} | 154 virtual ~DataChannelInterface() {} |
155 }; | 155 }; |
156 | 156 |
157 } // namespace webrtc | 157 } // namespace webrtc |
158 | 158 |
159 #endif // TALK_APP_WEBRTC_DATACHANNELINTERFACE_H_ | 159 #endif // TALK_APP_WEBRTC_DATACHANNELINTERFACE_H_ |
OLD | NEW |