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

Side by Side Diff: ppapi/c/dev/ppb_tcp_socket_dev.h

Issue 17419008: Move PPB_NetAddress out of dev. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 months 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
OLDNEW
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 dev/ppb_tcp_socket_dev.idl modified Wed Jun 19 23:49:45 2013. */ 6 /* From dev/ppb_tcp_socket_dev.idl modified Thu Jun 20 11:02:50 2013. */
7 7
8 #ifndef PPAPI_C_DEV_PPB_TCP_SOCKET_DEV_H_ 8 #ifndef PPAPI_C_DEV_PPB_TCP_SOCKET_DEV_H_
9 #define PPAPI_C_DEV_PPB_TCP_SOCKET_DEV_H_ 9 #define PPAPI_C_DEV_PPB_TCP_SOCKET_DEV_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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 * @return <code>PP_TRUE</code> if the input is a 96 * @return <code>PP_TRUE</code> if the input is a
97 * <code>PPB_TCPSocket_Dev</code> resource; <code>PP_FALSE</code> 97 * <code>PPB_TCPSocket_Dev</code> resource; <code>PP_FALSE</code>
98 * otherwise. 98 * otherwise.
99 */ 99 */
100 PP_Bool (*IsTCPSocket)(PP_Resource resource); 100 PP_Bool (*IsTCPSocket)(PP_Resource resource);
101 /** 101 /**
102 * Connects to the given address. 102 * Connects to the given address.
103 * 103 *
104 * @param[in] tcp_socket A <code>PP_Resource</code> corresponding to a TCP 104 * @param[in] tcp_socket A <code>PP_Resource</code> corresponding to a TCP
105 * socket. 105 * socket.
106 * @param[in] addr A <code>PPB_NetAddress_Dev</code> resource. 106 * @param[in] addr A <code>PPB_NetAddress</code> resource.
107 * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon 107 * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
108 * completion. 108 * completion.
109 * 109 *
110 * @return An int32_t containing an error code from <code>pp_errors.h</code>, 110 * @return An int32_t containing an error code from <code>pp_errors.h</code>,
111 * including (but not limited to): 111 * including (but not limited to):
112 * - <code>PP_ERROR_NOACCESS</code>: the caller doesn't have required 112 * - <code>PP_ERROR_NOACCESS</code>: the caller doesn't have required
113 * permissions. 113 * permissions.
114 * - <code>PP_ERROR_ADDRESS_UNREACHABLE</code>: <code>addr</code> is 114 * - <code>PP_ERROR_ADDRESS_UNREACHABLE</code>: <code>addr</code> is
115 * unreachable. 115 * unreachable.
116 * - <code>PP_ERROR_CONNECTION_REFUSED</code>: the connection attempt was 116 * - <code>PP_ERROR_CONNECTION_REFUSED</code>: the connection attempt was
117 * refused. 117 * refused.
118 * - <code>PP_ERROR_CONNECTION_FAILED</code>: the connection attempt failed. 118 * - <code>PP_ERROR_CONNECTION_FAILED</code>: the connection attempt failed.
119 * - <code>PP_ERROR_CONNECTION_TIMEDOUT</code>: the connection attempt timed 119 * - <code>PP_ERROR_CONNECTION_TIMEDOUT</code>: the connection attempt timed
120 * out. 120 * out.
121 */ 121 */
122 int32_t (*Connect)(PP_Resource tcp_socket, 122 int32_t (*Connect)(PP_Resource tcp_socket,
123 PP_Resource addr, 123 PP_Resource addr,
124 struct PP_CompletionCallback callback); 124 struct PP_CompletionCallback callback);
125 /** 125 /**
126 * Gets the local address of the socket, if it has been connected. 126 * Gets the local address of the socket, if it has been connected.
127 * 127 *
128 * @param[in] tcp_socket A <code>PP_Resource</code> corresponding to a TCP 128 * @param[in] tcp_socket A <code>PP_Resource</code> corresponding to a TCP
129 * socket. 129 * socket.
130 * 130 *
131 * @return A <code>PPB_NetAddress_Dev</code> resource on success or 0 on 131 * @return A <code>PPB_NetAddress</code> resource on success or 0 on failure.
132 * failure.
133 */ 132 */
134 PP_Resource (*GetLocalAddress)(PP_Resource tcp_socket); 133 PP_Resource (*GetLocalAddress)(PP_Resource tcp_socket);
135 /** 134 /**
136 * Gets the remote address of the socket, if it has been connected. 135 * Gets the remote address of the socket, if it has been connected.
137 * 136 *
138 * @param[in] tcp_socket A <code>PP_Resource</code> corresponding to a TCP 137 * @param[in] tcp_socket A <code>PP_Resource</code> corresponding to a TCP
139 * socket. 138 * socket.
140 * 139 *
141 * @return A <code>PPB_NetAddress_Dev</code> resource on success or 0 on 140 * @return A <code>PPB_NetAddress</code> resource on success or 0 on failure.
142 * failure.
143 */ 141 */
144 PP_Resource (*GetRemoteAddress)(PP_Resource tcp_socket); 142 PP_Resource (*GetRemoteAddress)(PP_Resource tcp_socket);
145 /** 143 /**
146 * Reads data from the socket. It can only be called after a successful 144 * Reads data from the socket. It can only be called after a successful
147 * <code>Connect()</code> call. It may perform a partial read. 145 * <code>Connect()</code> call. It may perform a partial read.
148 * 146 *
149 * @param[in] tcp_socket A <code>PP_Resource</code> corresponding to a TCP 147 * @param[in] tcp_socket A <code>PP_Resource</code> corresponding to a TCP
150 * socket. 148 * socket.
151 * @param[out] buffer The buffer to store the received data on success. It 149 * @param[out] buffer The buffer to store the received data on success. It
152 * must be at least as large as <code>bytes_to_read</code>. 150 * must be at least as large as <code>bytes_to_read</code>.
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 struct PP_CompletionCallback callback); 212 struct PP_CompletionCallback callback);
215 }; 213 };
216 214
217 typedef struct PPB_TCPSocket_Dev_0_1 PPB_TCPSocket_Dev; 215 typedef struct PPB_TCPSocket_Dev_0_1 PPB_TCPSocket_Dev;
218 /** 216 /**
219 * @} 217 * @}
220 */ 218 */
221 219
222 #endif /* PPAPI_C_DEV_PPB_TCP_SOCKET_DEV_H_ */ 220 #endif /* PPAPI_C_DEV_PPB_TCP_SOCKET_DEV_H_ */
223 221
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698