OLD | NEW |
| (Empty) |
1 /* | |
2 * Copyright 2004 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_LIBJINGLE_SESSION_RAWTRANSPORTPARSER_H_ | |
12 #define WEBRTC_LIBJINGLE_SESSION_RAWTRANSPORTPARSER_H_ | |
13 | |
14 #include <string> | |
15 | |
16 #include "webrtc/p2p/base/constants.h" | |
17 #include "webrtc/libjingle/session/constants.h" | |
18 #include "webrtc/libjingle/session/transportparser.h" | |
19 | |
20 namespace cricket { | |
21 | |
22 class RawTransportParser : public TransportParser { | |
23 public: | |
24 RawTransportParser() {} | |
25 | |
26 virtual bool ParseCandidates(SignalingProtocol protocol, | |
27 const buzz::XmlElement* elem, | |
28 const CandidateTranslator* translator, | |
29 Candidates* candidates, | |
30 ParseError* error); | |
31 virtual bool WriteCandidates(SignalingProtocol protocol, | |
32 const Candidates& candidates, | |
33 const CandidateTranslator* translator, | |
34 XmlElements* candidate_elems, | |
35 WriteError* error); | |
36 private: | |
37 // Parses the given element, which should describe the address to use for a | |
38 // given channel. This will return false and signal an error if the address | |
39 // or channel name is bad. | |
40 bool ParseRawAddress(const buzz::XmlElement* elem, | |
41 rtc::SocketAddress* addr, | |
42 ParseError* error); | |
43 | |
44 DISALLOW_COPY_AND_ASSIGN(RawTransportParser); | |
45 }; | |
46 | |
47 } // namespace cricket | |
48 | |
49 #endif // WEBRTC_LIBJINGLE_SESSION_RAWTRANSPORTPARSER_H_ | |
OLD | NEW |