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

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

Issue 7551034: Move P2P candidate serialization/deserialization to jingle/glue. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « content/renderer/p2p/p2p_transport_impl.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>
9
8 namespace net { 10 namespace net {
9 class IPEndPoint; 11 class IPEndPoint;
10 } // namespace net 12 } // namespace net
11 13
12 namespace talk_base { 14 namespace talk_base {
13 class SocketAddress; 15 class SocketAddress;
14 } // namespace talk_base 16 } // namespace talk_base
15 17
18 namespace cricket {
19 class Candidate;
20 } // namespace cricket
21
16 namespace jingle_glue { 22 namespace jingle_glue {
17 23
18 // Chromium and libjingle represent socket addresses differently. The 24 // Chromium and libjingle represent socket addresses differently. The
19 // following two functions are used to convert addresses from one 25 // following two functions are used to convert addresses from one
20 // representation to another. 26 // representation to another.
21 bool IPEndPointToSocketAddress(const net::IPEndPoint& address_chrome, 27 bool IPEndPointToSocketAddress(const net::IPEndPoint& address_chrome,
22 talk_base::SocketAddress* address_lj); 28 talk_base::SocketAddress* address_lj);
23 bool SocketAddressToIPEndPoint(const talk_base::SocketAddress& address_lj, 29 bool SocketAddressToIPEndPoint(const talk_base::SocketAddress& address_lj,
24 net::IPEndPoint* address_chrome); 30 net::IPEndPoint* address_chrome);
25 31
32 // Helper functions to serialize and deserialize P2P candidates.
33 std::string SerializeP2PCandidate(const cricket::Candidate& candidate);
34 bool DeserializeP2PCandidate(const std::string& address,
35 cricket::Candidate* candidate);
36
26 } // namespace jingle_glue 37 } // namespace jingle_glue
27 38
28 #endif // JINGLE_GLUE_UTILS_H_ 39 #endif // JINGLE_GLUE_UTILS_H_
OLDNEW
« no previous file with comments | « content/renderer/p2p/p2p_transport_impl.cc ('k') | jingle/glue/utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698