summaryrefslogtreecommitdiffstats
path: root/ppapi/api
diff options
context:
space:
mode:
authorviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-09 01:53:23 +0000
committerviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-09 01:53:23 +0000
commit6903130df04c68841a9815be736a6b4eb5b393c1 (patch)
treedab0d15397a7b4e68800e9fbc0ea5dfe18cb2e67 /ppapi/api
parent6c8bbcb719653d761d688d3a47d85a8451e498e4 (diff)
downloadchromium_src-6903130df04c68841a9815be736a6b4eb5b393c1.zip
chromium_src-6903130df04c68841a9815be736a6b4eb5b393c1.tar.gz
chromium_src-6903130df04c68841a9815be736a6b4eb5b393c1.tar.bz2
Re-land r109086: Add private Pepper API for dealing with PP_Flash_NetAddress.
[The Win components build was already fixed, and the broken unrevert reverted. The original review was here: http://codereview.chromium.org/8357030 .] BUG=none TEST=none Review URL: http://codereview.chromium.org/8496045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109165 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/api')
-rw-r--r--ppapi/api/private/ppb_flash_net_address.idl61
-rw-r--r--ppapi/api/private/ppb_flash_tcp_socket.idl10
2 files changed, 61 insertions, 10 deletions
diff --git a/ppapi/api/private/ppb_flash_net_address.idl b/ppapi/api/private/ppb_flash_net_address.idl
new file mode 100644
index 0000000..012c024
--- /dev/null
+++ b/ppapi/api/private/ppb_flash_net_address.idl
@@ -0,0 +1,61 @@
+/* Copyright (c) 2011 The Chromium Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+/**
+ * This file defines the <code>PPB_Flash_NetAddress</code> interface.
+ */
+
+label Chrome {
+ M17 = 0.1
+};
+
+/**
+ * This is an opaque type holding a network address.
+ */
+[assert_size(132)]
+struct PP_Flash_NetAddress {
+ uint32_t size;
+ char[128] data;
+};
+
+/**
+ * The <code>PPB_Flash_NetAddress</code> interface provides operations on
+ * network addresses.
+ */
+interface PPB_Flash_NetAddress {
+ /**
+ * Returns PP_TRUE if the two addresses are equal (host and port).
+ */
+ PP_Bool AreEqual([in] PP_Flash_NetAddress addr1,
+ [in] PP_Flash_NetAddress addr2);
+
+ /**
+ * Returns PP_TRUE if the two addresses refer to the same host.
+ */
+ PP_Bool AreHostsEqual([in] PP_Flash_NetAddress addr1,
+ [in] PP_Flash_NetAddress addr2);
+
+ /**
+ * Returns a human-readable description of the network address, optionally
+ * including the port (e.g., "192.168.0.1", "192.168.0.1:99", or "[::1]:80"),
+ * or an undefined var on failure.
+ */
+ PP_Var Describe([in] PP_Module module,
+ [in] PP_Flash_NetAddress addr,
+ [in] PP_Bool include_port);
+
+ /**
+ * Replaces the port in the given source address. Returns PP_TRUE on success.
+ */
+ PP_Bool ReplacePort([in] PP_Flash_NetAddress src_addr,
+ [in] uint16_t port,
+ [out] PP_Flash_NetAddress dest_addr);
+
+ /**
+ * Gets the "any" address (for IPv4 or IPv6); for use with UDP Bind.
+ */
+ void GetAnyAddress([in] PP_Bool is_ipv6,
+ [out] PP_Flash_NetAddress addr);
+};
diff --git a/ppapi/api/private/ppb_flash_tcp_socket.idl b/ppapi/api/private/ppb_flash_tcp_socket.idl
index 7a8c4ca..e832809 100644
--- a/ppapi/api/private/ppb_flash_tcp_socket.idl
+++ b/ppapi/api/private/ppb_flash_tcp_socket.idl
@@ -12,15 +12,6 @@ label Chrome {
};
/**
- * This is an opaque type holding a network address.
- */
-[assert_size(132)]
-struct PP_Flash_NetAddress {
- uint32_t size;
- char[128] data;
-};
-
-/**
* The <code>PPB_Flash_TCPSocket</code> interface provides TCP socket
* operations.
*/
@@ -121,4 +112,3 @@ interface PPB_Flash_TCPSocket {
*/
void Disconnect([in] PP_Resource tcp_socket);
};
-