OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef JINGLE_GLUE_UTILS_H_ | 5 #ifndef JINGLE_GLUE_UTILS_H_ |
6 #define JINGLE_GLUE_UTILS_H_ | 6 #define JINGLE_GLUE_UTILS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 namespace net { | 10 namespace net { |
11 class IPEndPoint; | 11 class IPEndPoint; |
12 } // namespace net | 12 } // namespace net |
13 | 13 |
14 namespace rtc { | 14 namespace talk_base { |
15 class SocketAddress; | 15 class SocketAddress; |
16 } // namespace rtc | 16 } // namespace talk_base |
17 | 17 |
18 namespace cricket { | 18 namespace cricket { |
19 class Candidate; | 19 class Candidate; |
20 } // namespace cricket | 20 } // namespace cricket |
21 | 21 |
22 namespace jingle_glue { | 22 namespace jingle_glue { |
23 | 23 |
24 // Chromium and libjingle represent socket addresses differently. The | 24 // Chromium and libjingle represent socket addresses differently. The |
25 // following two functions are used to convert addresses from one | 25 // following two functions are used to convert addresses from one |
26 // representation to another. | 26 // representation to another. |
27 bool IPEndPointToSocketAddress(const net::IPEndPoint& ip_endpoint, | 27 bool IPEndPointToSocketAddress(const net::IPEndPoint& ip_endpoint, |
28 rtc::SocketAddress* address); | 28 talk_base::SocketAddress* address); |
29 bool SocketAddressToIPEndPoint(const rtc::SocketAddress& address, | 29 bool SocketAddressToIPEndPoint(const talk_base::SocketAddress& address, |
30 net::IPEndPoint* ip_endpoint); | 30 net::IPEndPoint* ip_endpoint); |
31 | 31 |
32 // Helper functions to serialize and deserialize P2P candidates. | 32 // Helper functions to serialize and deserialize P2P candidates. |
33 std::string SerializeP2PCandidate(const cricket::Candidate& candidate); | 33 std::string SerializeP2PCandidate(const cricket::Candidate& candidate); |
34 bool DeserializeP2PCandidate(const std::string& address, | 34 bool DeserializeP2PCandidate(const std::string& address, |
35 cricket::Candidate* candidate); | 35 cricket::Candidate* candidate); |
36 | 36 |
37 } // namespace jingle_glue | 37 } // namespace jingle_glue |
38 | 38 |
39 #endif // JINGLE_GLUE_UTILS_H_ | 39 #endif // JINGLE_GLUE_UTILS_H_ |
OLD | NEW |