| OLD | NEW |
| (Empty) |
| 1 /* Copyright (c) 2011 The Chromium Authors. All rights reserved. | |
| 2 * Use of this source code is governed by a BSD-style license that can be | |
| 3 * found in the LICENSE file. | |
| 4 */ | |
| 5 | |
| 6 /** | |
| 7 * This file defines the <code>PPB_Flash_NetAddress</code> interface. | |
| 8 */ | |
| 9 | |
| 10 label Chrome { | |
| 11 M17 = 0.1 | |
| 12 }; | |
| 13 | |
| 14 /** | |
| 15 * This is an opaque type holding a network address. | |
| 16 */ | |
| 17 [assert_size(132)] | |
| 18 struct PP_Flash_NetAddress { | |
| 19 uint32_t size; | |
| 20 char[128] data; | |
| 21 }; | |
| 22 | |
| 23 /** | |
| 24 * The <code>PPB_Flash_NetAddress</code> interface provides operations on | |
| 25 * network addresses. | |
| 26 */ | |
| 27 interface PPB_Flash_NetAddress { | |
| 28 /** | |
| 29 * Returns PP_TRUE if the two addresses are equal (host and port). | |
| 30 */ | |
| 31 PP_Bool AreEqual([in] PP_Flash_NetAddress addr1, | |
| 32 [in] PP_Flash_NetAddress addr2); | |
| 33 | |
| 34 /** | |
| 35 * Returns PP_TRUE if the two addresses refer to the same host. | |
| 36 */ | |
| 37 PP_Bool AreHostsEqual([in] PP_Flash_NetAddress addr1, | |
| 38 [in] PP_Flash_NetAddress addr2); | |
| 39 | |
| 40 /** | |
| 41 * Returns a human-readable description of the network address, optionally | |
| 42 * including the port (e.g., "192.168.0.1", "192.168.0.1:99", or "[::1]:80"), | |
| 43 * or an undefined var on failure. | |
| 44 */ | |
| 45 PP_Var Describe([in] PP_Module module, | |
| 46 [in] PP_Flash_NetAddress addr, | |
| 47 [in] PP_Bool include_port); | |
| 48 | |
| 49 /** | |
| 50 * Replaces the port in the given source address. Returns PP_TRUE on success. | |
| 51 */ | |
| 52 PP_Bool ReplacePort([in] PP_Flash_NetAddress src_addr, | |
| 53 [in] uint16_t port, | |
| 54 [out] PP_Flash_NetAddress dest_addr); | |
| 55 | |
| 56 /** | |
| 57 * Gets the "any" address (for IPv4 or IPv6); for use with UDP Bind. | |
| 58 */ | |
| 59 void GetAnyAddress([in] PP_Bool is_ipv6, | |
| 60 [out] PP_Flash_NetAddress addr); | |
| 61 }; | |
| OLD | NEW |