OLD | NEW |
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 PPAPI_CPP_PRIVATE_NET_ADDRESS_PRIVATE_H_ | 5 #ifndef PPAPI_CPP_PRIVATE_NET_ADDRESS_PRIVATE_H_ |
6 #define PPAPI_CPP_PRIVATE_NET_ADDRESS_PRIVATE_H_ | 6 #define PPAPI_CPP_PRIVATE_NET_ADDRESS_PRIVATE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "ppapi/c/pp_stdint.h" | 10 #include "ppapi/c/pp_stdint.h" |
11 | 11 |
12 struct PP_NetAddress_Private; | 12 struct PP_NetAddress_Private; |
13 | 13 |
14 namespace pp { | 14 namespace pp { |
15 | 15 |
16 class NetAddressPrivate { | 16 class NetAddressPrivate { |
17 public: | 17 public: |
| 18 // Returns true if the required interface is available. |
| 19 static bool IsAvailable(); |
| 20 |
18 static bool AreEqual(const PP_NetAddress_Private& addr1, | 21 static bool AreEqual(const PP_NetAddress_Private& addr1, |
19 const PP_NetAddress_Private& addr2); | 22 const PP_NetAddress_Private& addr2); |
20 static bool AreHostsEqual(const PP_NetAddress_Private& addr1, | 23 static bool AreHostsEqual(const PP_NetAddress_Private& addr1, |
21 const PP_NetAddress_Private& addr2); | 24 const PP_NetAddress_Private& addr2); |
22 static std::string Describe(const PP_NetAddress_Private& addr, | 25 static std::string Describe(const PP_NetAddress_Private& addr, |
23 bool include_port); | 26 bool include_port); |
24 static bool ReplacePort(const PP_NetAddress_Private& addr_in, | 27 static bool ReplacePort(const PP_NetAddress_Private& addr_in, |
25 uint16_t port, | 28 uint16_t port, |
26 PP_NetAddress_Private* addr_out); | 29 PP_NetAddress_Private* addr_out); |
27 static void GetAnyAddress(bool is_ipv6, PP_NetAddress_Private* addr); | 30 static void GetAnyAddress(bool is_ipv6, PP_NetAddress_Private* addr); |
28 }; | 31 }; |
29 | 32 |
30 } // namespace pp | 33 } // namespace pp |
31 | 34 |
32 #endif // PPAPI_CPP_PRIVATE_NET_ADDRESS_PRIVATE_H_ | 35 #endif // PPAPI_CPP_PRIVATE_NET_ADDRESS_PRIVATE_H_ |
OLD | NEW |