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

Side by Side Diff: ppapi/api/private/ppb_udp_socket_private.idl

Issue 704133005: Pepper: Add support for multicast in PPB_UDPSocket API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase, version new enum values Created 6 years 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
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 /** 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 M41 = 0.5
14 }; 15 };
15 16
16 [assert_size(4)] 17 [assert_size(4)]
17 enum PP_UDPSocketFeature_Private { 18 enum PP_UDPSocketFeature_Private {
18 // Allow the socket to share the local address to which socket will 19 // Allow the socket to share the local address to which socket will
19 // be bound with other processes. Value's type should be 20 // be bound with other processes. Value's type should be
20 // PP_VARTYPE_BOOL. 21 // PP_VARTYPE_BOOL.
21 PP_UDPSOCKETFEATURE_PRIVATE_ADDRESS_REUSE = 0, 22 PP_UDPSOCKETFEATURE_PRIVATE_ADDRESS_REUSE = 0,
22 23
23 // Allow sending and receiving packets sent to and from broadcast 24 // Allow sending and receiving packets sent to and from broadcast
24 // addresses. Value's type should be PP_VARTYPE_BOOL. 25 // addresses. Value's type should be PP_VARTYPE_BOOL.
25 PP_UDPSOCKETFEATURE_PRIVATE_BROADCAST = 1, 26 PP_UDPSOCKETFEATURE_PRIVATE_BROADCAST = 1,
26 27
28 // Whether multicast packets sent from the host to the multicast group should
29 // be looped back to the host or not. Value's type should be PP_VARTYPE_BOOL.
30 // This is only supported in version 0.5 of the API (Chrome 41) and later.
31 [version=0.5]
32 PP_UDPSOCKETFEATURE_PRIVATE_MULTICAST_LOOP = 2,
33
34 // Set time-to-live for multicast packets, from 0 to 255. Value's type should
35 // be PP_VARTYPE_INT32.
36 // This is only supported in version 0.5 of the API (Chrome 41) and later.
37 [version=0.5]
38 PP_UDPSOCKETFEATURE_PRIVATE_MULTICAST_TTL = 3,
39
40 // Set network interface from which the multicast packets will be sent and
41 // received. Value's type should be PP_VARTYPE_INT32.
42 // This is only supported in version 0.5 of the API (Chrome 41) and later.
43 [version=0.5]
44 PP_UDPSOCKETFEATURE_PRIVATE_MULTICAST_IF = 4,
45
46 // Join a multicast group and start receiving packets. Value's type should be
47 // PP_VARTYPE_RESOURCE.
48 // This is only supported in version 0.5 of the API (Chrome 41) and later.
49 [version=0.5]
50 PP_UDPSOCKETFEATURE_PRIVATE_MULTICAST_JOIN = 5,
51
52 // Leave a multicast group previously joined. Value's type should be
53 // PP_VARTYPE_RESOURCE.
54 // This is only supported in version 0.5 of the API (Chrome 41) and later.
55 [version=0.5]
56 PP_UDPSOCKETFEATURE_PRIVATE_MULTICAST_LEAVE = 6,
57
27 // Special value for counting the number of available 58 // Special value for counting the number of available
28 // features. Should not be passed to SetSocketFeature(). 59 // features. Should not be passed to SetSocketFeature().
29 PP_UDPSOCKETFEATURE_PRIVATE_COUNT = 2 60 PP_UDPSOCKETFEATURE_PRIVATE_COUNT = 7
30 }; 61 };
31 62
32 interface PPB_UDPSocket_Private { 63 interface PPB_UDPSocket_Private {
33 /** 64 /**
34 * Creates a UDP socket resource. 65 * Creates a UDP socket resource.
35 */ 66 */
36 PP_Resource Create([in] PP_Instance instance_id); 67 PP_Resource Create([in] PP_Instance instance_id);
37 68
38 /** 69 /**
39 * Determines if a given resource is a UDP socket. 70 * Determines if a given resource is a UDP socket.
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 */ 120 */
90 int32_t SendTo([in] PP_Resource udp_socket, 121 int32_t SendTo([in] PP_Resource udp_socket,
91 [in] str_t buffer, 122 [in] str_t buffer,
92 [in] int32_t num_bytes, 123 [in] int32_t num_bytes,
93 [in] PP_NetAddress_Private addr, 124 [in] PP_NetAddress_Private addr,
94 [in] PP_CompletionCallback callback); 125 [in] PP_CompletionCallback callback);
95 126
96 /* Cancels all pending reads and writes, and closes the socket. */ 127 /* Cancels all pending reads and writes, and closes the socket. */
97 void Close([in] PP_Resource udp_socket); 128 void Close([in] PP_Resource udp_socket);
98 }; 129 };
OLDNEW
« no previous file with comments | « ppapi/api/ppb_udp_socket.idl ('k') | ppapi/c/pp_macros.h » ('j') | ppapi/c/ppb_udp_socket.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698