OLD | NEW |
| (Empty) |
1 /* | |
2 * Copyright 2013 The WebRTC project authors. All Rights Reserved. | |
3 * | |
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 | |
6 * tree. An additional intellectual property rights grant can be found | |
7 * in the file PATENTS. All contributing project authors may | |
8 * be found in the AUTHORS file in the root of the source tree. | |
9 */ | |
10 | |
11 #ifndef WEBRTC_API_SCTPUTILS_H_ | |
12 #define WEBRTC_API_SCTPUTILS_H_ | |
13 | |
14 #include <string> | |
15 | |
16 #include "webrtc/api/datachannelinterface.h" | |
17 | |
18 namespace rtc { | |
19 class CopyOnWriteBuffer; | |
20 } // namespace rtc | |
21 | |
22 namespace webrtc { | |
23 struct DataChannelInit; | |
24 | |
25 // Read the message type and return true if it's an OPEN message. | |
26 bool IsOpenMessage(const rtc::CopyOnWriteBuffer& payload); | |
27 | |
28 bool ParseDataChannelOpenMessage(const rtc::CopyOnWriteBuffer& payload, | |
29 std::string* label, | |
30 DataChannelInit* config); | |
31 | |
32 bool ParseDataChannelOpenAckMessage(const rtc::CopyOnWriteBuffer& payload); | |
33 | |
34 bool WriteDataChannelOpenMessage(const std::string& label, | |
35 const DataChannelInit& config, | |
36 rtc::CopyOnWriteBuffer* payload); | |
37 | |
38 void WriteDataChannelOpenAckMessage(rtc::CopyOnWriteBuffer* payload); | |
39 } // namespace webrtc | |
40 | |
41 #endif // WEBRTC_API_SCTPUTILS_H_ | |
OLD | NEW |