Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Side by Side Diff: ppapi/cpp/private/net_address_private.h

Issue 9722008: Add CreateFromIPv[46]Address() in PPB_NetAddress_Private. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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"
(...skipping 13 matching lines...) Expand all
24 static std::string Describe(const PP_NetAddress_Private& addr, 24 static std::string Describe(const PP_NetAddress_Private& addr,
25 bool include_port); 25 bool include_port);
26 static bool ReplacePort(const PP_NetAddress_Private& addr_in, 26 static bool ReplacePort(const PP_NetAddress_Private& addr_in,
27 uint16_t port, 27 uint16_t port,
28 PP_NetAddress_Private* addr_out); 28 PP_NetAddress_Private* addr_out);
29 static void GetAnyAddress(bool is_ipv6, PP_NetAddress_Private* addr); 29 static void GetAnyAddress(bool is_ipv6, PP_NetAddress_Private* addr);
30 static PP_NetAddressFamily_Private GetFamily( 30 static PP_NetAddressFamily_Private GetFamily(
31 const PP_NetAddress_Private& addr); 31 const PP_NetAddress_Private& addr);
32 static uint16_t GetPort(const PP_NetAddress_Private& addr); 32 static uint16_t GetPort(const PP_NetAddress_Private& addr);
33 static bool GetAddress(const PP_NetAddress_Private& addr, 33 static bool GetAddress(const PP_NetAddress_Private& addr,
34 void* address, uint16_t address_size); 34 void* address,
35 uint16_t address_size);
36 static void CreateFromIPv4Address(const uint8_t ip[4],
37 uint16_t port,
38 struct PP_NetAddress_Private* addr_out);
39 static void CreateFromIPv6Address(const uint8_t ip[16],
40 uint32_t scope_id,
41 uint16_t port,
42 struct PP_NetAddress_Private* addr_out);
35 }; 43 };
36 44
37 } // namespace pp 45 } // namespace pp
38 46
39 #endif // PPAPI_CPP_PRIVATE_NET_ADDRESS_PRIVATE_H_ 47 #endif // PPAPI_CPP_PRIVATE_NET_ADDRESS_PRIVATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698