• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // 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 
8 #include <stdint.h>
9 
10 #include "base/callback_forward.h"
11 
12 namespace pp {
13 class InstanceHandle;
14 class NetAddress;
15 }
16 
17 namespace talk_base {
18 class SocketAddress;
19 }
20 
21 namespace remoting {
22 
23 // Helpers to convert between different socket address representations.
24 bool SocketAddressToPpNetAddressWithPort(
25     const pp::InstanceHandle& instance,
26     const talk_base::SocketAddress& address,
27     pp::NetAddress* pp_net_address,
28     uint16_t port);
29 bool SocketAddressToPpNetAddress(const pp::InstanceHandle& instance,
30                                  const talk_base::SocketAddress& address,
31                                  pp::NetAddress* pp_net_address);
32 void PpNetAddressToSocketAddress(const pp::NetAddress& pp_net_address,
33                                  talk_base::SocketAddress* address);
34 
35 }  // namespace remoting
36 
37 #endif  // REMOTING_CLIENT_PLUGIN_PLUGIN_UTIL_H_
38