diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-01 23:35:42 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-01 23:35:42 +0000 |
commit | 03fd0b387c8a0d052cc565ec35f65eddcf40f64b (patch) | |
tree | 16dd61ef4ea0a5dc539a449984b2a4272b0574be /jingle/glue/utils.h | |
parent | 0ad9685912a070af01439a27d8a5b164724c947c (diff) | |
download | chromium_src-03fd0b387c8a0d052cc565ec35f65eddcf40f64b.zip chromium_src-03fd0b387c8a0d052cc565ec35f65eddcf40f64b.tar.gz chromium_src-03fd0b387c8a0d052cc565ec35f65eddcf40f64b.tar.bz2 |
Add FakeSocketFactory.
The new FakeSocketFactory will be used for P2P transport and remoting unittests. Also moved socket address conversion functions to the new jingle/glue/utils.h .
BUG=None
TEST=None
Review URL: http://codereview.chromium.org/6670134
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80242 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'jingle/glue/utils.h')
-rw-r--r-- | jingle/glue/utils.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/jingle/glue/utils.h b/jingle/glue/utils.h new file mode 100644 index 0000000..895cf2c --- /dev/null +++ b/jingle/glue/utils.h @@ -0,0 +1,28 @@ +// 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. + +#ifndef JINGLE_GLUE_UTILS_H_ +#define JINGLE_GLUE_UTILS_H_ + +namespace net { +class IPEndPoint; +} // namespace net + +namespace talk_base { + class SocketAddress; +} // namespace talk_base + +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); + +} // namespace jingle_glue + +#endif // JINGLE_GLUE_UTILS_H_ |