diff options
author | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-10 00:00:49 +0000 |
---|---|---|
committer | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-10 00:00:49 +0000 |
commit | 5a2b68f0a99d6b22d25488753e09112a9c64bfc2 (patch) | |
tree | 2cad627d0387e9195f160889f8ae354b7f2409ce /ppapi/api/private/ppb_net_address_private.idl | |
parent | 2ee178bd82a60dfb6e6e009362a892095a707653 (diff) | |
download | chromium_src-5a2b68f0a99d6b22d25488753e09112a9c64bfc2.zip chromium_src-5a2b68f0a99d6b22d25488753e09112a9c64bfc2.tar.gz chromium_src-5a2b68f0a99d6b22d25488753e09112a9c64bfc2.tar.bz2 |
Make the Pepper Flash net address just private, not Flash-specific.
Note that, though the PP_Flash_NetAddress struct is being renamed, binary
compatibility is being maintained. It's also safe to just rename the
PPB_Flash_NetAddress interface without maintaining backwards compatibility since
Pepper Flash isn't using it yet.
Review URL: http://codereview.chromium.org/8511032
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109335 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/api/private/ppb_net_address_private.idl')
-rw-r--r-- | ppapi/api/private/ppb_net_address_private.idl | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/ppapi/api/private/ppb_net_address_private.idl b/ppapi/api/private/ppb_net_address_private.idl new file mode 100644 index 0000000..a086d7f --- /dev/null +++ b/ppapi/api/private/ppb_net_address_private.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_NetAddress_Private</code> interface. + */ + +label Chrome { + M17 = 0.1 +}; + +/** + * This is an opaque type holding a network address. + */ +[assert_size(132)] +struct PP_NetAddress_Private { + uint32_t size; + char[128] data; +}; + +/** + * The <code>PPB_NetAddress_Private</code> interface provides operations on + * network addresses. + */ +interface PPB_NetAddress_Private { + /** + * Returns PP_TRUE if the two addresses are equal (host and port). + */ + 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. + */ + PP_Bool AreHostsEqual([in] PP_NetAddress_Private addr1, + [in] PP_NetAddress_Private 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_NetAddress_Private addr, + [in] PP_Bool include_port); + + /** + * Replaces the port in the given source address. Returns PP_TRUE on success. + */ + PP_Bool ReplacePort([in] PP_NetAddress_Private src_addr, + [in] uint16_t port, + [out] PP_NetAddress_Private dest_addr); + + /** + * Gets the "any" address (for IPv4 or IPv6); for use with UDP Bind. + */ + void GetAnyAddress([in] PP_Bool is_ipv6, + [out] PP_NetAddress_Private addr); +}; |