blob: 28987892a0c1d179abcdb581541a23c2ae19411d [file] [log] [blame]
[email protected]e174c49b2012-04-08 02:58:451// Copyright (c) 2012 The Chromium Authors. All rights reserved.
[email protected]c708db42010-07-16 13:34:082// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef REMOTING_CLIENT_PLUGIN_PLUGIN_UTIL_H_
6#define REMOTING_CLIENT_PLUGIN_PLUGIN_UTIL_H_
7
[email protected]da3e7b232013-08-24 15:20:158#include <stdint.h>
9
[email protected]8ef69222011-12-20 03:12:5410#include "base/callback_forward.h"
[email protected]c708db42010-07-16 13:34:0811
[email protected]da3e7b232013-08-24 15:20:1512namespace pp {
13class InstanceHandle;
14class NetAddress;
15}
[email protected]0807c352012-05-16 03:50:5516
[email protected]e758d4c2014-08-06 16:48:1617namespace rtc {
[email protected]0807c352012-05-16 03:50:5518class SocketAddress;
[email protected]da3e7b232013-08-24 15:20:1519}
[email protected]0807c352012-05-16 03:50:5520
[email protected]c708db42010-07-16 13:34:0821namespace remoting {
22
[email protected]0807c352012-05-16 03:50:5523// Helpers to convert between different socket address representations.
[email protected]da3e7b232013-08-24 15:20:1524bool SocketAddressToPpNetAddressWithPort(
25 const pp::InstanceHandle& instance,
[email protected]e758d4c2014-08-06 16:48:1626 const rtc::SocketAddress& address,
[email protected]da3e7b232013-08-24 15:20:1527 pp::NetAddress* pp_net_address,
28 uint16_t port);
29bool SocketAddressToPpNetAddress(const pp::InstanceHandle& instance,
[email protected]e758d4c2014-08-06 16:48:1630 const rtc::SocketAddress& address,
[email protected]da3e7b232013-08-24 15:20:1531 pp::NetAddress* pp_net_address);
32void PpNetAddressToSocketAddress(const pp::NetAddress& pp_net_address,
[email protected]e758d4c2014-08-06 16:48:1633 rtc::SocketAddress* address);
[email protected]0807c352012-05-16 03:50:5534
[email protected]c708db42010-07-16 13:34:0835} // namespace remoting
36
37#endif // REMOTING_CLIENT_PLUGIN_PLUGIN_UTIL_H_