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

Unified Diff: ppapi/api/private/ppb_net_address_private.idl

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 | « no previous file | ppapi/c/private/ppb_net_address_private.h » ('j') | ppapi/cpp/private/net_address_private.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/api/private/ppb_net_address_private.idl
diff --git a/ppapi/api/private/ppb_net_address_private.idl b/ppapi/api/private/ppb_net_address_private.idl
index 01a370b41206261ed9e55bc53220a6f485ee0771..295685fe8bf37db33966309c4aaaaf667b262a6e 100644
--- a/ppapi/api/private/ppb_net_address_private.idl
+++ b/ppapi/api/private/ppb_net_address_private.idl
@@ -9,7 +9,8 @@
label Chrome {
M17 = 0.1,
- M19 = 1.0
+ M19_0 = 1.0,
+ M19_1 = 1.1
};
[assert_size(4)]
@@ -68,7 +69,7 @@ interface PPB_NetAddress_Private {
*/
PP_Bool ReplacePort([in] PP_NetAddress_Private src_addr,
[in] uint16_t port,
- [out] PP_NetAddress_Private dest_addr);
+ [out] PP_NetAddress_Private addr_out);
/**
* Gets the "any" address (for IPv4 or IPv6); for use with UDP Bind.
@@ -99,4 +100,22 @@ interface PPB_NetAddress_Private {
PP_Bool GetAddress([in] PP_NetAddress_Private addr,
[out] mem_t address,
[in] uint16_t address_size);
+
+ /**
+ * Creates NetAddress with the specified IPv4 address and port
+ * number.
+ */
+ [version=1.1]
+ void CreateFromIPv4Address([in] uint8_t[4] ip,
+ [in] uint16_t port,
+ [out] PP_NetAddress_Private addr_out);
+ /**
+ * Creates NetAddress with the specified IPv6 address, scope_id and
+ * port number.
+ */
+ [version=1.1]
+ void CreateFromIPv6Address([in] uint8_t[16] ip,
dmichael (off chromium) 2012/03/21 19:33:17 It seems like the natural way to represent this is
Sergey Ulanov 2012/03/21 19:44:51 I don't agree it's more natural than uint8_t. E.g.
Sergey Ulanov 2012/03/21 19:46:35 Sorry, I meant net::IPAddressNumber.
viettrungluu 2012/03/22 04:54:34 I agree that it should be an array of |uint8_t|s;
+ [in] uint32_t scope_id,
+ [in] uint16_t port,
+ [out] PP_NetAddress_Private addr_out);
};
« no previous file with comments | « no previous file | ppapi/c/private/ppb_net_address_private.h » ('j') | ppapi/cpp/private/net_address_private.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698