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