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

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

Issue 8572009: WebSocket Pepper API documents minor revision (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
OLDNEW
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 dev/ppb_websocket_dev.idl modified Mon Nov 7 15:21:42 2011. */ 6 /* From dev/ppb_websocket_dev.idl modified Tue Nov 15 23:29:03 2011. */
7 7
8 #ifndef PPAPI_C_DEV_PPB_WEBSOCKET_DEV_H_ 8 #ifndef PPAPI_C_DEV_PPB_WEBSOCKET_DEV_H_
9 #define PPAPI_C_DEV_PPB_WEBSOCKET_DEV_H_ 9 #define PPAPI_C_DEV_PPB_WEBSOCKET_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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 * @return Returns 0 if called before the close code is set. 236 * @return Returns 0 if called before the close code is set.
237 */ 237 */
238 uint16_t (*GetCloseCode)(PP_Resource web_socket); 238 uint16_t (*GetCloseCode)(PP_Resource web_socket);
239 /** 239 /**
240 * GetCloseReason() returns the connection close reason for the WebSocket 240 * GetCloseReason() returns the connection close reason for the WebSocket
241 * connection. 241 * connection.
242 * 242 *
243 * @param[in] web_socket A <code>PP_Resource</code> corresponding to a 243 * @param[in] web_socket A <code>PP_Resource</code> corresponding to a
244 * WebSocket. 244 * WebSocket.
245 * 245 *
246 * @return Returns a <code>PP_VARTYPE_NULL</code> var if called before the 246 * @return Returns a <code>PP_VARTYPE_STRING</code> var. if called before the
247 * close reason is set, or <code>PP_VARTYPE_UNDEFINED</code> if called on an 247 * close reason is set, its data is empty string. Returns a
248 * invalid resource. 248 * <code>PP_VARTYPE_UNDEFINED</code> if called on an invalid resource.
249 */ 249 */
250 struct PP_Var (*GetCloseReason)(PP_Resource web_socket); 250 struct PP_Var (*GetCloseReason)(PP_Resource web_socket);
251 /** 251 /**
252 * GetCloseWasClean() returns if the connection was closed cleanly for the 252 * GetCloseWasClean() returns if the connection was closed cleanly for the
253 * specified WebSocket connection. 253 * specified WebSocket connection.
254 * 254 *
255 * @param[in] web_socket A <code>PP_Resource</code> corresponding to a 255 * @param[in] web_socket A <code>PP_Resource</code> corresponding to a
256 * WebSocket. 256 * WebSocket.
257 * 257 *
258 * @return Returns <code>PP_FALSE</code> if called before the connection is 258 * @return Returns <code>PP_FALSE</code> if called before the connection is
259 * closed. Otherwise, returns <code>PP_TRUE</code> if the connection was 259 * closed, or called on an invalid resource. Otherwise, returns
260 * closed cleanly and returns <code>PP_FALSE</code> if the connection was 260 * <code>PP_TRUE</code> if the connection was closed cleanly, or returns
261 * closed by abnormal reasons. 261 * <code>PP_FALSE</code> if the connection was closed by abnormal reasons.
262 */ 262 */
263 PP_Bool (*GetCloseWasClean)(PP_Resource web_socket); 263 PP_Bool (*GetCloseWasClean)(PP_Resource web_socket);
264 /** 264 /**
265 * GetExtensions() returns the extensions selected by the server for the 265 * GetExtensions() returns the extensions selected by the server for the
266 * specified WebSocket connection. 266 * specified WebSocket connection.
267 * 267 *
268 * @param[in] web_socket A <code>PP_Resource</code> corresponding to a 268 * @param[in] web_socket A <code>PP_Resource</code> corresponding to a
269 * WebSocket. 269 * WebSocket.
270 * 270 *
271 * @return Returns a <code>PP_VARTYPE_STRING</code> var. If called before the 271 * @return Returns a <code>PP_VARTYPE_STRING</code> var. If called before the
272 * connection is established or called on an invalid resource, its data is 272 * connection is established, its data is empty string. Returns a
273 * empty string. 273 * <code>PP_VARTYPE_UNDEFINED</code> if called on an invalid resource.
274 * Currently its data is always empty string. 274 * Currently its data for valid resources are always empty string.
275 */ 275 */
276 struct PP_Var (*GetExtensions)(PP_Resource web_socket); 276 struct PP_Var (*GetExtensions)(PP_Resource web_socket);
277 /** 277 /**
278 * GetProtocol() returns the sub-protocol chosen by the server for the 278 * GetProtocol() returns the sub-protocol chosen by the server for the
279 * specified WebSocket connection. 279 * specified WebSocket connection.
280 * 280 *
281 * @param[in] web_socket A <code>PP_Resource</code> corresponding to a 281 * @param[in] web_socket A <code>PP_Resource</code> corresponding to a
282 * WebSocket. 282 * WebSocket.
283 * 283 *
284 * @return Returns a <code>PP_VARTYPE_STRING</code> var. If called before the 284 * @return Returns a <code>PP_VARTYPE_STRING</code> var. If called before the
285 * connection is established, or called on an invalid resource, its data is 285 * connection is established, its data is empty string. Returns a
286 * empty string. 286 * <code>PP_VARTYPE_UNDEFINED</code> if called on an invalid resource.
287 */ 287 */
288 struct PP_Var (*GetProtocol)(PP_Resource web_socket); 288 struct PP_Var (*GetProtocol)(PP_Resource web_socket);
289 /** 289 /**
290 * GetReadyState() returns the ready state of the specified WebSocket 290 * GetReadyState() returns the ready state of the specified WebSocket
291 * connection. 291 * connection.
292 * 292 *
293 * @param[in] web_socket A <code>PP_Resource</code> corresponding to a 293 * @param[in] web_socket A <code>PP_Resource</code> corresponding to a
294 * WebSocket. 294 * WebSocket.
295 * 295 *
296 * @return Returns <code>PP_WEBSOCKETREADYSTATE_CONNECTING</code> if called 296 * @return Returns <code>PP_WEBSOCKETREADYSTATE_CLOSED_DEV</code> if called
297 * before the connection is established. 297 * before connect() is called, or called on an invalid resource.
298 */ 298 */
299 PP_WebSocketReadyState_Dev (*GetReadyState)(PP_Resource web_socket); 299 PP_WebSocketReadyState_Dev (*GetReadyState)(PP_Resource web_socket);
300 /** 300 /**
301 * GetURL() returns the URL associated with specified WebSocket connection. 301 * GetURL() returns the URL associated with specified WebSocket connection.
302 * 302 *
303 * @param[in] web_socket A <code>PP_Resource</code> corresponding to a 303 * @param[in] web_socket A <code>PP_Resource</code> corresponding to a
304 * WebSocket. 304 * WebSocket.
305 * 305 *
306 * @return Returns a <code>PP_VARTYPE_STRING</code> var. If called before the 306 * @return Returns a <code>PP_VARTYPE_STRING</code> var. If called before the
307 * connection is established, or called on an invalid resource, its data is 307 * connection is established, its data is empty string. Return a
308 * empty string. 308 * <code>PP_VARTYPE_UNDEFINED</code> if called on an invalid resource.
309 */ 309 */
310 struct PP_Var (*GetURL)(PP_Resource web_socket); 310 struct PP_Var (*GetURL)(PP_Resource web_socket);
311 }; 311 };
312 /** 312 /**
313 * @} 313 * @}
314 */ 314 */
315 315
316 #endif /* PPAPI_C_DEV_PPB_WEBSOCKET_DEV_H_ */ 316 #endif /* PPAPI_C_DEV_PPB_WEBSOCKET_DEV_H_ */
317 317
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698