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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/c/private/ppb_net_address_private.h ('k') | ppapi/cpp/private/net_address_private.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/cpp/private/net_address_private.h
diff --git a/ppapi/cpp/private/net_address_private.h b/ppapi/cpp/private/net_address_private.h
index c242175a1de57974a45dcbd3240b8ccba37171ff..5ad50d736e8f7d3cf97289a898c3bb5ec925799c 100644
--- a/ppapi/cpp/private/net_address_private.h
+++ b/ppapi/cpp/private/net_address_private.h
@@ -26,12 +26,21 @@ class NetAddressPrivate {
static bool ReplacePort(const PP_NetAddress_Private& addr_in,
uint16_t port,
PP_NetAddress_Private* addr_out);
- static void GetAnyAddress(bool is_ipv6, PP_NetAddress_Private* addr);
+ static bool GetAnyAddress(bool is_ipv6, PP_NetAddress_Private* addr);
static PP_NetAddressFamily_Private GetFamily(
const PP_NetAddress_Private& addr);
static uint16_t GetPort(const PP_NetAddress_Private& addr);
static bool GetAddress(const PP_NetAddress_Private& addr,
- void* address, uint16_t address_size);
+ void* address,
+ uint16_t address_size);
+ static uint32_t GetScopeID(const PP_NetAddress_Private& addr);
+ static bool CreateFromIPv4Address(const uint8_t ip[4],
+ uint16_t port,
+ struct PP_NetAddress_Private* addr_out);
+ static bool CreateFromIPv6Address(const uint8_t ip[16],
+ uint32_t scope_id,
+ uint16_t port,
+ struct PP_NetAddress_Private* addr_out);
};
} // namespace pp
« no previous file with comments | « ppapi/c/private/ppb_net_address_private.h ('k') | ppapi/cpp/private/net_address_private.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698