OLD | NEW |
---|---|
1 /* Copyright 2013 The Chromium Authors. All rights reserved. | 1 /* Copyright 2013 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 ppb_udp_socket.idl modified Wed Dec 10 04:11:03 2014. */ | 6 /* From ppb_udp_socket.idl modified Mon Dec 15 17:47:37 2014. */ |
7 | 7 |
8 #ifndef PPAPI_C_PPB_UDP_SOCKET_H_ | 8 #ifndef PPAPI_C_PPB_UDP_SOCKET_H_ |
9 #define PPAPI_C_PPB_UDP_SOCKET_H_ | 9 #define PPAPI_C_PPB_UDP_SOCKET_H_ |
10 | 10 |
11 #include "ppapi/c/pp_bool.h" | 11 #include "ppapi/c/pp_bool.h" |
12 #include "ppapi/c/pp_completion_callback.h" | 12 #include "ppapi/c/pp_completion_callback.h" |
13 #include "ppapi/c/pp_instance.h" | 13 #include "ppapi/c/pp_instance.h" |
14 #include "ppapi/c/pp_macros.h" | 14 #include "ppapi/c/pp_macros.h" |
15 #include "ppapi/c/pp_resource.h" | 15 #include "ppapi/c/pp_resource.h" |
16 #include "ppapi/c/pp_stdint.h" | 16 #include "ppapi/c/pp_stdint.h" |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
63 * Specifies the total per-socket buffer space reserved for receives. Value's | 63 * Specifies the total per-socket buffer space reserved for receives. Value's |
64 * type should be <code>PP_VARTYPE_INT32</code>. | 64 * type should be <code>PP_VARTYPE_INT32</code>. |
65 * On version 1.0, this option can only be set after a successful | 65 * On version 1.0, this option can only be set after a successful |
66 * <code>Bind()</code> call. On version 1.1 or later, there is no such | 66 * <code>Bind()</code> call. On version 1.1 or later, there is no such |
67 * limitation. | 67 * limitation. |
68 * | 68 * |
69 * Note: This is only treated as a hint for the browser to set the buffer | 69 * Note: This is only treated as a hint for the browser to set the buffer |
70 * size. Even if <code>SetOption()</code> succeeds, the browser doesn't | 70 * size. Even if <code>SetOption()</code> succeeds, the browser doesn't |
71 * guarantee it will conform to the size. | 71 * guarantee it will conform to the size. |
72 */ | 72 */ |
73 PP_UDPSOCKET_OPTION_RECV_BUFFER_SIZE = 3 | 73 PP_UDPSOCKET_OPTION_RECV_BUFFER_SIZE = 3, |
74 /** | |
75 * Specifies whether the packets sent from the host to the multicast group | |
76 * should be looped back to the host or not. Value's type should be | |
77 * <code>PP_VARTYPE_BOOL</code>. | |
78 * This option can only be set before calling <code>Bind()</code>. | |
79 * | |
80 * This is only supported in version 1.1 of the API (Chrome 41) and later. | |
81 */ | |
82 PP_UDPSOCKET_OPTION_MULTICAST_LOOP = 4, | |
83 /** | |
84 * Specifies the time-to-live for packets sent to the multicast group. The | |
85 * value should be within 0 to 255 range. The default value is 1 and means | |
86 * that packets will not be routed beyond the local network. Value's type | |
87 * should be <code>PP_VARTYPE_INT32</code>. | |
88 * This option can only be set before calling <code>Bind()</code>. | |
89 * | |
90 * This is only supported in version 1.1 of the API (Chrome 41) and later. | |
91 */ | |
92 PP_UDPSOCKET_OPTION_MULTICAST_TTL = 5, | |
93 /** | |
94 * Specifies the network interface from which the multicast packets will be | |
95 * sent and received, as specified by <code>PPB_NetworkList</code>. Value's | |
96 * type should be <code>PP_VARTYPE_INT32</code>. | |
97 * This option can only be set before calling <code>Bind()</code>. | |
98 * | |
99 * This is only supported in version 1.1 of the API (Chrome 41) and later. | |
100 */ | |
101 PP_UDPSOCKET_OPTION_MULTICAST_IF = 6, | |
102 /** | |
103 * Joins the multicast group with given address as specifed by | |
104 * <code>PPB_NetAddress</code> API. Value's type should be | |
105 * <code>PP_VARTYPE_RESOURCE</code>. | |
106 * This option can only be set after a successful <code>Bind()</code> call. | |
107 * | |
108 * This is only supported in version 1.1 of the API (Chrome 41) and later. | |
109 */ | |
110 PP_UDPSOCKET_OPTION_MULTICAST_JOIN = 7, | |
111 /** | |
112 * Leaves the multicast group with given address as specifed by | |
113 * <code>PPB_NetAddress</code> API. Value's type should be | |
114 * <code>PP_VARTYPE_RESOURCE</code>. | |
115 * This option can only be set after a successful <code>Bind()</code> call. | |
116 * | |
117 * This is only supported in version 1.1 of the API (Chrome 41) and later. | |
118 */ | |
119 PP_UDPSOCKET_OPTION_MULTICAST_LEAVE = 8 | |
74 } PP_UDPSocket_Option; | 120 } PP_UDPSocket_Option; |
75 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_UDPSocket_Option, 4); | 121 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_UDPSocket_Option, 4); |
76 /** | 122 /** |
77 * @} | 123 * @} |
78 */ | 124 */ |
79 | 125 |
80 /** | 126 /** |
81 * @addtogroup Interfaces | 127 * @addtogroup Interfaces |
82 * @{ | 128 * @{ |
83 */ | 129 */ |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
228 int32_t num_bytes, | 274 int32_t num_bytes, |
229 PP_Resource* addr, | 275 PP_Resource* addr, |
230 struct PP_CompletionCallback callback); | 276 struct PP_CompletionCallback callback); |
231 int32_t (*SendTo)(PP_Resource udp_socket, | 277 int32_t (*SendTo)(PP_Resource udp_socket, |
232 const char* buffer, | 278 const char* buffer, |
233 int32_t num_bytes, | 279 int32_t num_bytes, |
234 PP_Resource addr, | 280 PP_Resource addr, |
235 struct PP_CompletionCallback callback); | 281 struct PP_CompletionCallback callback); |
236 void (*Close)(PP_Resource udp_socket); | 282 void (*Close)(PP_Resource udp_socket); |
237 int32_t (*SetOption)(PP_Resource udp_socket, | 283 int32_t (*SetOption)(PP_Resource udp_socket, |
238 PP_UDPSocket_Option name, | 284 PP_UDPSocket_Option_1_0 name, |
etrunko
2014/12/17 17:39:36
Here is what we get from the generator when the en
| |
239 struct PP_Var value, | 285 struct PP_Var value, |
240 struct PP_CompletionCallback callback); | 286 struct PP_CompletionCallback callback); |
241 }; | 287 }; |
242 /** | 288 /** |
243 * @} | 289 * @} |
244 */ | 290 */ |
245 | 291 |
246 #endif /* PPAPI_C_PPB_UDP_SOCKET_H_ */ | 292 #endif /* PPAPI_C_PPB_UDP_SOCKET_H_ */ |
247 | 293 |
OLD | NEW |