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

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

Issue 8506016: Remove 'Flash' from TCP/UDP Pepper interfaces. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: resolved last comments Created 9 years, 1 month 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
« no previous file with comments | « ppapi/c/private/ppb_tcp_socket_private.h ('k') | ppapi/cpp/private/tcp_socket_private.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 * found in the LICENSE file.
4 */
5
6 /* From private/ppb_udp_socket_private.idl modified Wed Nov 9 12:53:35 2011. */
7
8 #ifndef PPAPI_C_PRIVATE_PPB_UDP_SOCKET_PRIVATE_H_
9 #define PPAPI_C_PRIVATE_PPB_UDP_SOCKET_PRIVATE_H_
10
11 #include "ppapi/c/pp_bool.h"
12 #include "ppapi/c/pp_completion_callback.h"
13 #include "ppapi/c/pp_instance.h"
14 #include "ppapi/c/pp_macros.h"
15 #include "ppapi/c/pp_resource.h"
16 #include "ppapi/c/pp_stdint.h"
17 #include "ppapi/c/private/ppb_net_address_private.h"
18
19 #define PPB_UDPSOCKET_PRIVATE_INTERFACE_0_2 "PPB_UDPSocket_Private;0.2"
20 #define PPB_UDPSOCKET_PRIVATE_INTERFACE PPB_UDPSOCKET_PRIVATE_INTERFACE_0_2
21
22 /**
23 * @file
24 * This file defines the <code>PPB_UDPSocket_Private</code> interface.
25 */
26
27
28 /**
29 * @addtogroup Interfaces
30 * @{
31 */
32 struct PPB_UDPSocket_Private {
33 /**
34 * Creates a UDP socket resource.
35 */
36 PP_Resource (*Create)(PP_Instance instance_id);
37 /**
38 * Determines if a given resource is a UDP socket.
39 */
40 PP_Bool (*IsUDPSocket)(PP_Resource resource_id);
41 /* Creates a socket and binds to the address given by |addr|. */
42 int32_t (*Bind)(PP_Resource udp_socket,
43 const struct PP_NetAddress_Private* addr,
44 struct PP_CompletionCallback callback);
45 /* Performs a non-blocking recvfrom call on socket.
46 * Bind must be called first. |callback| is invoked when recvfrom
47 * reads data. You must call GetRecvFromAddress to recover the
48 * address the data was retrieved from.
49 */
50 int32_t (*RecvFrom)(PP_Resource udp_socket,
51 char* buffer,
52 int32_t num_bytes,
53 struct PP_CompletionCallback callback);
54 /* Upon successful completion of RecvFrom, the address that the data
55 * was received from is stored in |addr|.
56 */
57 PP_Bool (*GetRecvFromAddress)(PP_Resource udp_socket,
58 struct PP_NetAddress_Private* addr);
59 /* Performs a non-blocking sendto call on the socket created and
60 * bound(has already called Bind). The callback |callback| is
61 * invoked when sendto completes.
62 */
63 int32_t (*SendTo)(PP_Resource udp_socket,
64 const char* buffer,
65 int32_t num_bytes,
66 const struct PP_NetAddress_Private* addr,
67 struct PP_CompletionCallback callback);
68 /* Cancels all pending reads and writes, and closes the socket. */
69 void (*Close)(PP_Resource udp_socket);
70 };
71 /**
72 * @}
73 */
74
75 #endif /* PPAPI_C_PRIVATE_PPB_UDP_SOCKET_PRIVATE_H_ */
76
OLDNEW
« no previous file with comments | « ppapi/c/private/ppb_tcp_socket_private.h ('k') | ppapi/cpp/private/tcp_socket_private.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698