blob: 803416a7abfe7f18b39bc454d72cdc7e9756b230 [file] [log] [blame]
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <string>
namespace net {
class IPEndPoint;
} // namespace net
namespace talk_base {
class SocketAddress;
} // namespace talk_base
namespace cricket {
class Candidate;
} // namespace cricket
namespace jingle_glue {
// Chromium and libjingle represent socket addresses differently. The
// following two functions are used to convert addresses from one
// representation to another.
bool IPEndPointToSocketAddress(const net::IPEndPoint& address_chrome,
talk_base::SocketAddress* address_lj);
bool SocketAddressToIPEndPoint(const talk_base::SocketAddress& address_lj,
net::IPEndPoint* address_chrome);
// Helper functions to serialize and deserialize P2P candidates.
std::string SerializeP2PCandidate(const cricket::Candidate& candidate);
bool DeserializeP2PCandidate(const std::string& address,
cricket::Candidate* candidate);
} // namespace jingle_glue