Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(141)

Side by Side Diff: jingle/glue/utils.h

Issue 1833523002: Migrate content/*/p2p/* code to net::IPAddress. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments sergeyu Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « jingle/glue/proxy_resolving_client_socket.cc ('k') | jingle/glue/utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "net/base/ip_address_number.h"
11 #include "third_party/webrtc/base/ipaddress.h" 10 #include "third_party/webrtc/base/ipaddress.h"
12 11
13 namespace net { 12 namespace net {
13 class IPAddress;
14 class IPEndPoint; 14 class IPEndPoint;
15 } // namespace net 15 } // namespace net
16 16
17 namespace rtc { 17 namespace rtc {
18 class SocketAddress; 18 class SocketAddress;
19 } // namespace rtc 19 } // namespace rtc
20 20
21 namespace cricket { 21 namespace cricket {
22 class Candidate; 22 class Candidate;
23 } // namespace cricket 23 } // namespace cricket
24 24
25 namespace jingle_glue { 25 namespace jingle_glue {
26 26
27 // Chromium and libjingle represent socket addresses differently. The 27 // Chromium and libjingle represent socket addresses differently. The
28 // following two functions are used to convert addresses from one 28 // following two functions are used to convert addresses from one
29 // representation to another. 29 // representation to another.
30 bool IPEndPointToSocketAddress(const net::IPEndPoint& ip_endpoint, 30 bool IPEndPointToSocketAddress(const net::IPEndPoint& ip_endpoint,
31 rtc::SocketAddress* address); 31 rtc::SocketAddress* address);
32 bool SocketAddressToIPEndPoint(const rtc::SocketAddress& address, 32 bool SocketAddressToIPEndPoint(const rtc::SocketAddress& address,
33 net::IPEndPoint* ip_endpoint); 33 net::IPEndPoint* ip_endpoint);
34 34
35 rtc::IPAddress IPAddressNumberToIPAddress( 35 rtc::IPAddress NetIPAddressToRtcIPAddress(const net::IPAddress& ip_address);
36 const net::IPAddressNumber& ip_address_number);
37 36
38 // Helper functions to serialize and deserialize P2P candidates. 37 // Helper functions to serialize and deserialize P2P candidates.
39 std::string SerializeP2PCandidate(const cricket::Candidate& candidate); 38 std::string SerializeP2PCandidate(const cricket::Candidate& candidate);
40 bool DeserializeP2PCandidate(const std::string& address, 39 bool DeserializeP2PCandidate(const std::string& address,
41 cricket::Candidate* candidate); 40 cricket::Candidate* candidate);
42 41
43 } // namespace jingle_glue 42 } // namespace jingle_glue
44 43
45 #endif // JINGLE_GLUE_UTILS_H_ 44 #endif // JINGLE_GLUE_UTILS_H_
OLDNEW
« no previous file with comments | « jingle/glue/proxy_resolving_client_socket.cc ('k') | jingle/glue/utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698