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

Side by Side Diff: ppapi/c/private/ppb_net_address_private.h

Issue 8511032: Make the Pepper Flash net address just private, not Flash-specific. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 /* From private/ppb_flash_net_address.idl modified Fri Nov 4 12:47:53 2011. */ 6 /* From private/ppb_net_address_private.idl modified Wed Nov 9 12:53:35 2011. * /
7 7
8 #ifndef PPAPI_C_PRIVATE_PPB_FLASH_NET_ADDRESS_H_ 8 #ifndef PPAPI_C_PRIVATE_PPB_NET_ADDRESS_PRIVATE_H_
9 #define PPAPI_C_PRIVATE_PPB_FLASH_NET_ADDRESS_H_ 9 #define PPAPI_C_PRIVATE_PPB_NET_ADDRESS_PRIVATE_H_
10 10
11 #include "ppapi/c/pp_bool.h" 11 #include "ppapi/c/pp_bool.h"
12 #include "ppapi/c/pp_macros.h" 12 #include "ppapi/c/pp_macros.h"
13 #include "ppapi/c/pp_module.h" 13 #include "ppapi/c/pp_module.h"
14 #include "ppapi/c/pp_stdint.h" 14 #include "ppapi/c/pp_stdint.h"
15 #include "ppapi/c/pp_var.h" 15 #include "ppapi/c/pp_var.h"
16 16
17 #define PPB_FLASH_NETADDRESS_INTERFACE_0_1 "PPB_Flash_NetAddress;0.1" 17 #define PPB_NETADDRESS_PRIVATE_INTERFACE_0_1 "PPB_NetAddress_Private;0.1"
18 #define PPB_FLASH_NETADDRESS_INTERFACE PPB_FLASH_NETADDRESS_INTERFACE_0_1 18 #define PPB_NETADDRESS_PRIVATE_INTERFACE PPB_NETADDRESS_PRIVATE_INTERFACE_0_1
19 19
20 /** 20 /**
21 * @file 21 * @file
22 * This file defines the <code>PPB_Flash_NetAddress</code> interface. 22 * This file defines the <code>PPB_NetAddress_Private</code> interface.
23 */ 23 */
24 24
25 25
26 /** 26 /**
27 * @addtogroup Structs 27 * @addtogroup Structs
28 * @{ 28 * @{
29 */ 29 */
30 /** 30 /**
31 * This is an opaque type holding a network address. 31 * This is an opaque type holding a network address.
32 */ 32 */
33 struct PP_Flash_NetAddress { 33 struct PP_NetAddress_Private {
34 uint32_t size; 34 uint32_t size;
35 char data[128]; 35 char data[128];
36 }; 36 };
37 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_Flash_NetAddress, 132); 37 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_NetAddress_Private, 132);
38 /** 38 /**
39 * @} 39 * @}
40 */ 40 */
41 41
42 /** 42 /**
43 * @addtogroup Interfaces 43 * @addtogroup Interfaces
44 * @{ 44 * @{
45 */ 45 */
46 /** 46 /**
47 * The <code>PPB_Flash_NetAddress</code> interface provides operations on 47 * The <code>PPB_NetAddress_Private</code> interface provides operations on
48 * network addresses. 48 * network addresses.
49 */ 49 */
50 struct PPB_Flash_NetAddress { 50 struct PPB_NetAddress_Private {
51 /** 51 /**
52 * Returns PP_TRUE if the two addresses are equal (host and port). 52 * Returns PP_TRUE if the two addresses are equal (host and port).
53 */ 53 */
54 PP_Bool (*AreEqual)(const struct PP_Flash_NetAddress* addr1, 54 PP_Bool (*AreEqual)(const struct PP_NetAddress_Private* addr1,
55 const struct PP_Flash_NetAddress* addr2); 55 const struct PP_NetAddress_Private* addr2);
56 /** 56 /**
57 * Returns PP_TRUE if the two addresses refer to the same host. 57 * Returns PP_TRUE if the two addresses refer to the same host.
58 */ 58 */
59 PP_Bool (*AreHostsEqual)(const struct PP_Flash_NetAddress* addr1, 59 PP_Bool (*AreHostsEqual)(const struct PP_NetAddress_Private* addr1,
60 const struct PP_Flash_NetAddress* addr2); 60 const struct PP_NetAddress_Private* addr2);
61 /** 61 /**
62 * Returns a human-readable description of the network address, optionally 62 * Returns a human-readable description of the network address, optionally
63 * including the port (e.g., "192.168.0.1", "192.168.0.1:99", or "[::1]:80"), 63 * including the port (e.g., "192.168.0.1", "192.168.0.1:99", or "[::1]:80"),
64 * or an undefined var on failure. 64 * or an undefined var on failure.
65 */ 65 */
66 struct PP_Var (*Describe)(PP_Module module, 66 struct PP_Var (*Describe)(PP_Module module,
67 const struct PP_Flash_NetAddress* addr, 67 const struct PP_NetAddress_Private* addr,
68 PP_Bool include_port); 68 PP_Bool include_port);
69 /** 69 /**
70 * Replaces the port in the given source address. Returns PP_TRUE on success. 70 * Replaces the port in the given source address. Returns PP_TRUE on success.
71 */ 71 */
72 PP_Bool (*ReplacePort)(const struct PP_Flash_NetAddress* src_addr, 72 PP_Bool (*ReplacePort)(const struct PP_NetAddress_Private* src_addr,
73 uint16_t port, 73 uint16_t port,
74 struct PP_Flash_NetAddress* dest_addr); 74 struct PP_NetAddress_Private* dest_addr);
75 /** 75 /**
76 * Gets the "any" address (for IPv4 or IPv6); for use with UDP Bind. 76 * Gets the "any" address (for IPv4 or IPv6); for use with UDP Bind.
77 */ 77 */
78 void (*GetAnyAddress)(PP_Bool is_ipv6, struct PP_Flash_NetAddress* addr); 78 void (*GetAnyAddress)(PP_Bool is_ipv6, struct PP_NetAddress_Private* addr);
79 }; 79 };
80 /** 80 /**
81 * @} 81 * @}
82 */ 82 */
83 83
84 #endif /* PPAPI_C_PRIVATE_PPB_FLASH_NET_ADDRESS_H_ */ 84 #endif /* PPAPI_C_PRIVATE_PPB_NET_ADDRESS_PRIVATE_H_ */
85 85
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698