OLD | NEW |
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_udp_socket.idl modified Wed Nov 9 12:53:35 2011. */ | 6 /* From private/ppb_flash_udp_socket.idl modified Thu Nov 10 10:21:43 2011. */ |
7 | 7 |
8 #ifndef PPAPI_C_PRIVATE_PPB_FLASH_UDP_SOCKET_H_ | 8 #ifndef PPAPI_C_PRIVATE_PPB_FLASH_UDP_SOCKET_H_ |
9 #define PPAPI_C_PRIVATE_PPB_FLASH_UDP_SOCKET_H_ | 9 #define PPAPI_C_PRIVATE_PPB_FLASH_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" |
17 #include "ppapi/c/private/ppb_net_address_private.h" | 17 #include "ppapi/c/private/ppb_net_address_private.h" |
18 | 18 |
19 #define PPB_FLASH_UDPSOCKET_INTERFACE_0_1 "PPB_Flash_UDPSocket;0.1" | 19 #define PPB_FLASH_UDPSOCKET_INTERFACE_0_1 "PPB_Flash_UDPSocket;0.1" |
20 #define PPB_FLASH_UDPSOCKET_INTERFACE PPB_FLASH_UDPSOCKET_INTERFACE_0_1 | 20 #define PPB_FLASH_UDPSOCKET_INTERFACE PPB_FLASH_UDPSOCKET_INTERFACE_0_1 |
21 | 21 |
22 /** | 22 /** |
23 * @file | 23 * @file |
24 * This file defines the <code>PPB_Flash_UDPSocket</code> interface. | 24 * This file defines the <code>PPB_Flash_UDPSocket</code> interface. |
25 */ | 25 */ |
26 | 26 |
27 | 27 |
28 /** | 28 /** |
29 * @addtogroup Interfaces | 29 * @addtogroup Interfaces |
30 * @{ | 30 * @{ |
31 */ | 31 */ |
32 struct PPB_Flash_UDPSocket { | 32 struct PPB_Flash_UDPSocket_0_1 { |
33 /** | 33 /** |
34 * Creates a UDP socket resource. | 34 * Creates a UDP socket resource. |
35 */ | 35 */ |
36 PP_Resource (*Create)(PP_Instance instance_id); | 36 PP_Resource (*Create)(PP_Instance instance_id); |
37 /** | 37 /** |
38 * Determines if a given resource is a UDP socket. | 38 * Determines if a given resource is a UDP socket. |
39 */ | 39 */ |
40 PP_Bool (*IsFlashUDPSocket)(PP_Resource resource_id); | 40 PP_Bool (*IsFlashUDPSocket)(PP_Resource resource_id); |
41 /* Creates a socket and binds to the address given by |addr|. */ | 41 /* Creates a socket and binds to the address given by |addr|. */ |
42 int32_t (*Bind)(PP_Resource udp_socket, | 42 int32_t (*Bind)(PP_Resource udp_socket, |
(...skipping 18 matching lines...) Expand all Loading... |
61 * invoked when sendto completes. | 61 * invoked when sendto completes. |
62 */ | 62 */ |
63 int32_t (*SendTo)(PP_Resource udp_socket, | 63 int32_t (*SendTo)(PP_Resource udp_socket, |
64 const char* buffer, | 64 const char* buffer, |
65 int32_t num_bytes, | 65 int32_t num_bytes, |
66 const struct PP_NetAddress_Private* addr, | 66 const struct PP_NetAddress_Private* addr, |
67 struct PP_CompletionCallback callback); | 67 struct PP_CompletionCallback callback); |
68 /* Cancels all pending reads and writes, and closes the socket. */ | 68 /* Cancels all pending reads and writes, and closes the socket. */ |
69 void (*Close)(PP_Resource udp_socket); | 69 void (*Close)(PP_Resource udp_socket); |
70 }; | 70 }; |
| 71 |
| 72 typedef struct PPB_Flash_UDPSocket_0_1 PPB_Flash_UDPSocket; |
71 /** | 73 /** |
72 * @} | 74 * @} |
73 */ | 75 */ |
74 | 76 |
75 #endif /* PPAPI_C_PRIVATE_PPB_FLASH_UDP_SOCKET_H_ */ | 77 #endif /* PPAPI_C_PRIVATE_PPB_FLASH_UDP_SOCKET_H_ */ |
76 | 78 |
OLD | NEW |