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

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

Issue 9235035: Add getter methods for sockaddr. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Fixing errors found by review system. Created 8 years, 11 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
Index: ppapi/api/private/ppb_net_address_private.idl
===================================================================
--- ppapi/api/private/ppb_net_address_private.idl (revision 119128)
+++ ppapi/api/private/ppb_net_address_private.idl (working copy)
@@ -8,7 +8,8 @@
*/
label Chrome {
- M17 = 0.1
+ M17 = 0.1,
+ M18 = 1.0
};
/**
@@ -28,12 +29,14 @@
/**
* Returns PP_TRUE if the two addresses are equal (host and port).
*/
+ [version=0.1]
PP_Bool AreEqual([in] PP_NetAddress_Private addr1,
[in] PP_NetAddress_Private addr2);
/**
* Returns PP_TRUE if the two addresses refer to the same host.
*/
+ [version=0.1]
PP_Bool AreHostsEqual([in] PP_NetAddress_Private addr1,
[in] PP_NetAddress_Private addr2);
@@ -42,6 +45,7 @@
* including the port (e.g., "192.168.0.1", "192.168.0.1:99", or "[::1]:80"),
* or an undefined var on failure.
*/
+ [version=0.1]
PP_Var Describe([in] PP_Module module,
[in] PP_NetAddress_Private addr,
[in] PP_Bool include_port);
@@ -49,6 +53,7 @@
/**
* Replaces the port in the given source address. Returns PP_TRUE on success.
*/
+ [version=0.1]
PP_Bool ReplacePort([in] PP_NetAddress_Private src_addr,
[in] uint16_t port,
[out] PP_NetAddress_Private dest_addr);
@@ -56,6 +61,31 @@
/**
* Gets the "any" address (for IPv4 or IPv6); for use with UDP Bind.
*/
+ [version=0.1]
void GetAnyAddress([in] PP_Bool is_ipv6,
[out] PP_NetAddress_Private addr);
+
+ /**
+ * Gets the address family.
+ */
+ [version=1.0]
+ uint16_t GetFamily([in] PP_NetAddress_Private addr);
+
+ /**
+ * Gets the port. The port is returned in host byte order.
+ */
+ [version=1.0]
+ uint16_t GetPort([in] PP_NetAddress_Private addr);
+
+ /**
+ * Gets the address. The output, address, must be large enough for the
+ * current socket family. The output will be the binary representation of an
+ * address for the current socket family. For IPv4 and IPv6 the address is in
+ * network byte order. True is returned if the address was successfully
+ * retrieved.
+ */
+ [version=1.0]
+ PP_Bool GetAddress([in] PP_NetAddress_Private addr,
+ [out] mem_t address,
+ [in] uint16_t address_size);
};

Powered by Google App Engine
This is Rietveld 408576698