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

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

Issue 8357030: Add private Pepper API for dealing with PP_Flash_NetAddress. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: oops Created 9 years, 1 month 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 | « content/browser/renderer_host/pepper_message_filter.cc ('k') | ppapi/api/private/ppb_flash_tcp_socket.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/api/private/ppb_flash_net_address.idl
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 0000000000000000000000000000000000000000..012c024a6fc19f1bd863ead223bfb6d25645a097
--- /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);
+};
« no previous file with comments | « content/browser/renderer_host/pepper_message_filter.cc ('k') | ppapi/api/private/ppb_flash_tcp_socket.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698