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

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

Issue 9398003: Change PPB_NetAddress_Private.GetFamily to return a PP_AddressFamily_Private value instead of uint1… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 months 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) 2012 The Chromium Authors. All rights reserved. 1 /* Copyright (c) 2012 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_net_address_private.idl, 6 /* From private/ppb_net_address_private.idl,
7 * modified Sun Feb 5 10:36:30 2012. 7 * modified Tue Feb 14 14:02:57 2012.
8 */ 8 */
9 9
10 #ifndef PPAPI_C_PRIVATE_PPB_NET_ADDRESS_PRIVATE_H_ 10 #ifndef PPAPI_C_PRIVATE_PPB_NET_ADDRESS_PRIVATE_H_
11 #define PPAPI_C_PRIVATE_PPB_NET_ADDRESS_PRIVATE_H_ 11 #define PPAPI_C_PRIVATE_PPB_NET_ADDRESS_PRIVATE_H_
12 12
13 #include "ppapi/c/pp_bool.h" 13 #include "ppapi/c/pp_bool.h"
14 #include "ppapi/c/pp_macros.h" 14 #include "ppapi/c/pp_macros.h"
15 #include "ppapi/c/pp_module.h" 15 #include "ppapi/c/pp_module.h"
16 #include "ppapi/c/pp_stdint.h" 16 #include "ppapi/c/pp_stdint.h"
17 #include "ppapi/c/pp_var.h" 17 #include "ppapi/c/pp_var.h"
18 18
19 #define PPB_NETADDRESS_PRIVATE_INTERFACE_0_1 "PPB_NetAddress_Private;0.1" 19 #define PPB_NETADDRESS_PRIVATE_INTERFACE_0_1 "PPB_NetAddress_Private;0.1"
20 #define PPB_NETADDRESS_PRIVATE_INTERFACE_1_0 "PPB_NetAddress_Private;1.0" 20 #define PPB_NETADDRESS_PRIVATE_INTERFACE_1_0 "PPB_NetAddress_Private;1.0"
21 #define PPB_NETADDRESS_PRIVATE_INTERFACE PPB_NETADDRESS_PRIVATE_INTERFACE_1_0 21 #define PPB_NETADDRESS_PRIVATE_INTERFACE PPB_NETADDRESS_PRIVATE_INTERFACE_1_0
22 22
23 /** 23 /**
24 * @file 24 * @file
25 * This file defines the <code>PPB_NetAddress_Private</code> interface. 25 * This file defines the <code>PPB_NetAddress_Private</code> interface.
26 */ 26 */
27 27
28 28
29 /** 29 /**
30 * @addtogroup Enums
31 * @{
32 */
33 typedef enum {
34 /**
35 * The address family is unspecified.
36 */
37 PP_ADDRESSFAMILY_UNSPECIFIED = 0,
38 /**
39 * The Internet Protocol version 4 (IPv4) address family.
40 */
41 PP_ADDRESSFAMILY_IPV4 = 1,
42 /**
43 * The Internet Protocol version 6 (IPv6) address family.
44 */
45 PP_ADDRESSFAMILY_IPV6 = 2
46 } PP_AddressFamily_Private;
viettrungluu 2012/02/15 01:43:03 I'm not sure I like this name a lot. (I might have
yzshen1 2012/02/15 18:40:55 I did the change, but without the '_' between NetA
47 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_AddressFamily_Private, 4);
48 /**
49 * @}
50 */
51
52 /**
30 * @addtogroup Structs 53 * @addtogroup Structs
31 * @{ 54 * @{
32 */ 55 */
33 /** 56 /**
34 * This is an opaque type holding a network address. 57 * This is an opaque type holding a network address.
35 */ 58 */
36 struct PP_NetAddress_Private { 59 struct PP_NetAddress_Private {
37 uint32_t size; 60 uint32_t size;
38 char data[128]; 61 char data[128];
39 }; 62 };
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 PP_Bool (*ReplacePort)(const struct PP_NetAddress_Private* src_addr, 98 PP_Bool (*ReplacePort)(const struct PP_NetAddress_Private* src_addr,
76 uint16_t port, 99 uint16_t port,
77 struct PP_NetAddress_Private* dest_addr); 100 struct PP_NetAddress_Private* dest_addr);
78 /** 101 /**
79 * Gets the "any" address (for IPv4 or IPv6); for use with UDP Bind. 102 * Gets the "any" address (for IPv4 or IPv6); for use with UDP Bind.
80 */ 103 */
81 void (*GetAnyAddress)(PP_Bool is_ipv6, struct PP_NetAddress_Private* addr); 104 void (*GetAnyAddress)(PP_Bool is_ipv6, struct PP_NetAddress_Private* addr);
82 /** 105 /**
83 * Gets the address family. 106 * Gets the address family.
84 */ 107 */
85 uint16_t (*GetFamily)(const struct PP_NetAddress_Private* addr); 108 PP_AddressFamily_Private (*GetFamily)(
109 const struct PP_NetAddress_Private* addr);
86 /** 110 /**
87 * Gets the port. The port is returned in host byte order. 111 * Gets the port. The port is returned in host byte order.
88 */ 112 */
89 uint16_t (*GetPort)(const struct PP_NetAddress_Private* addr); 113 uint16_t (*GetPort)(const struct PP_NetAddress_Private* addr);
90 /** 114 /**
91 * Gets the address. The output, address, must be large enough for the 115 * Gets the address. The output, address, must be large enough for the
92 * current socket family. The output will be the binary representation of an 116 * current socket family. The output will be the binary representation of an
93 * address for the current socket family. For IPv4 and IPv6 the address is in 117 * address for the current socket family. For IPv4 and IPv6 the address is in
94 * network byte order. PP_TRUE is returned if the address was successfully 118 * network byte order. PP_TRUE is returned if the address was successfully
95 * retrieved. 119 * retrieved.
(...skipping 17 matching lines...) Expand all
113 uint16_t port, 137 uint16_t port,
114 struct PP_NetAddress_Private* dest_addr); 138 struct PP_NetAddress_Private* dest_addr);
115 void (*GetAnyAddress)(PP_Bool is_ipv6, struct PP_NetAddress_Private* addr); 139 void (*GetAnyAddress)(PP_Bool is_ipv6, struct PP_NetAddress_Private* addr);
116 }; 140 };
117 /** 141 /**
118 * @} 142 * @}
119 */ 143 */
120 144
121 #endif /* PPAPI_C_PRIVATE_PPB_NET_ADDRESS_PRIVATE_H_ */ 145 #endif /* PPAPI_C_PRIVATE_PPB_NET_ADDRESS_PRIVATE_H_ */
122 146
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698