Index: ppapi/api/dev/ppb_net_address_dev.idl |
diff --git a/ppapi/api/dev/ppb_net_address_dev.idl b/ppapi/api/dev/ppb_net_address_dev.idl |
index b3d1d1b864edd643e85d6f3cbbd248a7306d035d..cae7d298e0b4bb03dbe20435318bdbda0df24005 100644 |
--- a/ppapi/api/dev/ppb_net_address_dev.idl |
+++ b/ppapi/api/dev/ppb_net_address_dev.idl |
@@ -11,6 +11,9 @@ label Chrome { |
M29 = 0.1 |
}; |
+/** |
+ * Network address family types. |
+ */ |
[assert_size(4)] |
enum PP_NetAddress_Family_Dev { |
/** |
@@ -65,6 +68,13 @@ interface PPB_NetAddress_Dev { |
/** |
* Creates a <code>PPB_NetAddress_Dev</code> resource with the specified IPv4 |
* address. |
+ * |
+ * @param[in] instance A <code>PP_Instance</code> identifying one instance of |
+ * a module. |
+ * @param[in] ipv4_addr An IPv4 address. |
+ * |
+ * @return A <code>PP_Resource</code> representing the same address as |
+ * <code>ipv4_addr</code> or 0 on failure. |
*/ |
PP_Resource CreateFromIPv4Address([in] PP_Instance instance, |
[in] PP_NetAddress_IPv4_Dev ipv4_addr); |
@@ -72,17 +82,35 @@ interface PPB_NetAddress_Dev { |
/** |
* Creates a <code>PPB_NetAddress_Dev</code> resource with the specified IPv6 |
* address. |
+ * |
+ * @param[in] instance A <code>PP_Instance</code> identifying one instance of |
+ * a module. |
+ * @param[in] ipv6_addr An IPv6 address. |
+ * |
+ * @return A <code>PP_Resource</code> representing the same address as |
+ * <code>ipv6_addr</code> or 0 on failure. |
*/ |
PP_Resource CreateFromIPv6Address([in] PP_Instance instance, |
[in] PP_NetAddress_IPv6_Dev ipv6_addr); |
/** |
* Determines if a given resource is a network address. |
+ * |
+ * @param[in] resource A <code>PP_Resource</code> to check. |
+ * |
+ * @return <code>PP_TRUE</code> if the input is a |
+ * <code>PPB_NetAddress_Dev</code> resource; <code>PP_FALSE</code> otherwise. |
*/ |
- PP_Bool IsNetAddress([in] PP_Resource addr); |
+ PP_Bool IsNetAddress([in] PP_Resource resource); |
/** |
* Gets the address family. |
+ * |
+ * @param[in] addr A <code>PP_Resource</code> corresponding to a network |
+ * address. |
+ * |
+ * @return The address family on success; |
+ * <code>PP_NETADDRESS_FAMILY_UNSPECIFIED</code> on failure. |
*/ |
PP_NetAddress_Family_Dev GetFamily([in] PP_Resource addr); |
@@ -91,7 +119,14 @@ interface PPB_NetAddress_Dev { |
* description is in the form of host [ ":" port ] and conforms to |
* http://tools.ietf.org/html/rfc3986#section-3.2 for IPv4 and IPv6 addresses |
* (e.g., "192.168.0.1", "192.168.0.1:99", or "[::1]:80"). |
- * Returns an undefined var on failure. |
+ * |
+ * @param[in] addr A <code>PP_Resource</code> corresponding to a network |
+ * address. |
+ * @param[in] include_port Whether to include the port number in the |
+ * description. |
+ * |
+ * @return A string <code>PP_Var</code> on success; an undefined |
+ * <code>PP_Var</code> on failure. |
*/ |
PP_Var DescribeAsString([in] PP_Resource addr, |
[in] PP_Bool include_port); |
@@ -99,9 +134,17 @@ interface PPB_NetAddress_Dev { |
/** |
* Fills a <code>PP_NetAddress_IPv4_Dev</code> structure if the network |
* address is of <code>PP_NETADDRESS_FAMILY_IPV4</code> address family. |
- * Returns PP_FALSE on failure. Note that passing a network address of |
+ * Note that passing a network address of |
* <code>PP_NETADDRESS_FAMILY_IPV6</code> address family will fail even if the |
* address is an IPv4-mapped IPv6 address. |
+ * |
+ * @param[in] addr A <code>PP_Resource</code> corresponding to a network |
+ * address. |
+ * @param[out] ipv4_addr A <code>PP_NetAddress_IPv4_Dev</code> structure to |
+ * store the result. |
+ * |
+ * @return A <code>PP_Bool</code> value indicating whether the operation |
+ * succeeded. |
*/ |
PP_Bool DescribeAsIPv4Address([in] PP_Resource addr, |
[out] PP_NetAddress_IPv4_Dev ipv4_addr); |
@@ -109,9 +152,17 @@ interface PPB_NetAddress_Dev { |
/** |
* Fills a <code>PP_NetAddress_IPv6_Dev</code> structure if the network |
* address is of <code>PP_NETADDRESS_FAMILY_IPV6</code> address family. |
- * Returns PP_FALSE on failure. Note that passing a network address of |
+ * Note that passing a network address of |
* <code>PP_NETADDRESS_FAMILY_IPV4</code> address family will fail - this |
* method doesn't map it to an IPv6 address. |
+ * |
+ * @param[in] addr A <code>PP_Resource</code> corresponding to a network |
+ * address. |
+ * @param[out] ipv6_addr A <code>PP_NetAddress_IPv6_Dev</code> structure to |
+ * store the result. |
+ * |
+ * @return A <code>PP_Bool</code> value indicating whether the operation |
+ * succeeded. |
*/ |
PP_Bool DescribeAsIPv6Address([in] PP_Resource addr, |
[out] PP_NetAddress_IPv6_Dev ipv6_addr); |