OLD | NEW |
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 /** | 6 /** |
7 * This file defines the <code>PPB_UDPSocket_Private</code> interface. | 7 * This file defines the <code>PPB_UDPSocket_Private</code> interface. |
8 */ | 8 */ |
9 | 9 |
10 label Chrome { | 10 label Chrome { |
11 M17 = 0.2, | 11 M17 = 0.2, |
12 M19 = 0.3, | 12 M19 = 0.3, |
13 M23 = 0.4 | 13 M23 = 0.4 |
14 }; | 14 }; |
15 | 15 |
16 [assert_size(4)] | 16 [assert_size(4)] |
17 enum PP_UDPSocketFeature_Private { | 17 enum PP_UDPSocketFeature_Private { |
18 // Allow the socket to share the local address to which socket will | 18 // Allow the socket to share the local address to which socket will |
19 // be bound with other processes. Value's type should be | 19 // be bound with other processes. Value's type should be |
20 // PP_VARTYPE_BOOL. | 20 // PP_VARTYPE_BOOL. |
21 PP_UDPSOCKETFEATURE_ADDRESS_REUSE = 0, | 21 PP_UDPSOCKETFEATURE_PRIVATE_ADDRESS_REUSE = 0, |
22 | 22 |
23 // Allow sending and receiving packets sent to and from broadcast | 23 // Allow sending and receiving packets sent to and from broadcast |
24 // addresses. Value's type should be PP_VARTYPE_BOOL. | 24 // addresses. Value's type should be PP_VARTYPE_BOOL. |
25 PP_UDPSOCKETFEATURE_BROADCAST = 1, | 25 PP_UDPSOCKETFEATURE_PRIVATE_BROADCAST = 1, |
26 | 26 |
27 // Special value for counting the number of available | 27 // Special value for counting the number of available |
28 // features. Should not be passed to SetSocketFeature(). | 28 // features. Should not be passed to SetSocketFeature(). |
29 PP_UDPSOCKETFEATURE_COUNT = 2 | 29 PP_UDPSOCKETFEATURE_PRIVATE_COUNT = 2 |
30 }; | 30 }; |
31 | 31 |
32 interface PPB_UDPSocket_Private { | 32 interface PPB_UDPSocket_Private { |
33 /** | 33 /** |
34 * Creates a UDP socket resource. | 34 * Creates a UDP socket resource. |
35 */ | 35 */ |
36 PP_Resource Create([in] PP_Instance instance_id); | 36 PP_Resource Create([in] PP_Instance instance_id); |
37 | 37 |
38 /** | 38 /** |
39 * Determines if a given resource is a UDP socket. | 39 * Determines if a given resource is a UDP socket. |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 */ | 89 */ |
90 int32_t SendTo([in] PP_Resource udp_socket, | 90 int32_t SendTo([in] PP_Resource udp_socket, |
91 [in] str_t buffer, | 91 [in] str_t buffer, |
92 [in] int32_t num_bytes, | 92 [in] int32_t num_bytes, |
93 [in] PP_NetAddress_Private addr, | 93 [in] PP_NetAddress_Private addr, |
94 [in] PP_CompletionCallback callback); | 94 [in] PP_CompletionCallback callback); |
95 | 95 |
96 /* Cancels all pending reads and writes, and closes the socket. */ | 96 /* Cancels all pending reads and writes, and closes the socket. */ |
97 void Close([in] PP_Resource udp_socket); | 97 void Close([in] PP_Resource udp_socket); |
98 }; | 98 }; |
OLD | NEW |