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 /** | 6 /** |
7 * This file defines the <code>PPB_WebSocket_Dev</code> interface. | 7 * This file defines the <code>PPB_WebSocket_Dev</code> interface. |
8 */ | 8 */ |
9 label Chrome { | 9 label Chrome { |
10 M17 = 0.1 | 10 M17 = 0.1 |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
225 */ | 225 */ |
226 uint16_t GetCloseCode([in] PP_Resource web_socket); | 226 uint16_t GetCloseCode([in] PP_Resource web_socket); |
227 | 227 |
228 /** | 228 /** |
229 * GetCloseReason() returns the connection close reason for the WebSocket | 229 * GetCloseReason() returns the connection close reason for the WebSocket |
230 * connection. | 230 * connection. |
231 * | 231 * |
232 * @param[in] web_socket A <code>PP_Resource</code> corresponding to a | 232 * @param[in] web_socket A <code>PP_Resource</code> corresponding to a |
233 * WebSocket. | 233 * WebSocket. |
234 * | 234 * |
235 * @return Returns a <code>PP_VARTYPE_NULL</code> var if called before the | 235 * @return Returns a <code>PP_VARTYPE_STRING</code> var. if called before the |
236 * close reason is set, or <code>PP_VARTYPE_UNDEFINED</code> if called on an | 236 * close reason is set, its data is empty string. Returns a |
237 * invalid resource. | 237 * <code>PP_VARTYPE_UNDEFINED</code> if called on an invalid resource. |
238 */ | 238 */ |
239 PP_Var GetCloseReason([in] PP_Resource web_socket); | 239 PP_Var GetCloseReason([in] PP_Resource web_socket); |
240 | 240 |
241 /** | 241 /** |
242 * GetCloseWasClean() returns if the connection was closed cleanly for the | 242 * GetCloseWasClean() returns if the connection was closed cleanly for the |
243 * specified WebSocket connection. | 243 * specified WebSocket connection. |
244 * | 244 * |
245 * @param[in] web_socket A <code>PP_Resource</code> corresponding to a | 245 * @param[in] web_socket A <code>PP_Resource</code> corresponding to a |
246 * WebSocket. | 246 * WebSocket. |
247 * | 247 * |
248 * @return Returns <code>PP_FALSE</code> if called before the connection is | 248 * @return Returns <code>PP_FALSE</code> if called before the connection is |
249 * closed. Otherwise, returns <code>PP_TRUE</code> if the connection was | 249 * closed, or called on an invalid resource. Otherwise, returns |
250 * closed cleanly and returns <code>PP_FALSE</code> if the connection was | 250 * <code>PP_TRUE</code> if the connection was closed cleanly, or returns |
251 * closed by abnormal reasons. | 251 * <code>PP_FALSE</code> if the connection was closed by abnormal reasons. |
252 */ | 252 */ |
253 PP_Bool GetCloseWasClean([in] PP_Resource web_socket); | 253 PP_Bool GetCloseWasClean([in] PP_Resource web_socket); |
254 | 254 |
255 /** | 255 /** |
256 * GetExtensions() returns the extensions selected by the server for the | 256 * GetExtensions() returns the extensions selected by the server for the |
257 * specified WebSocket connection. | 257 * specified WebSocket connection. |
258 * | 258 * |
259 * @param[in] web_socket A <code>PP_Resource</code> corresponding to a | 259 * @param[in] web_socket A <code>PP_Resource</code> corresponding to a |
260 * WebSocket. | 260 * WebSocket. |
261 * | 261 * |
262 * @return Returns a <code>PP_VARTYPE_STRING</code> var. If called before the | 262 * @return Returns a <code>PP_VARTYPE_STRING</code> var. If called before the |
263 * connection is established or called on an invalid resource, its data is | 263 * connection is established, its data is empty string. Returns a |
264 * empty string. | 264 * <code>PP_VARTYPE_UNDEFINED</code> if called on an invalid resource. |
265 * Currently its data is always empty string. | 265 * Currently its data for valid resources are always empty string. |
266 */ | 266 */ |
267 PP_Var GetExtensions([in] PP_Resource web_socket); | 267 PP_Var GetExtensions([in] PP_Resource web_socket); |
268 | 268 |
269 /** | 269 /** |
270 * GetProtocol() returns the sub-protocol chosen by the server for the | 270 * GetProtocol() returns the sub-protocol chosen by the server for the |
271 * specified WebSocket connection. | 271 * specified WebSocket connection. |
272 * | 272 * |
273 * @param[in] web_socket A <code>PP_Resource</code> corresponding to a | 273 * @param[in] web_socket A <code>PP_Resource</code> corresponding to a |
274 * WebSocket. | 274 * WebSocket. |
275 * | 275 * |
276 * @return Returns a <code>PP_VARTYPE_STRING</code> var. If called before the | 276 * @return Returns a <code>PP_VARTYPE_STRING</code> var. If called before the |
277 * connection is established, or called on an invalid resource, its data is | 277 * connection is established, its data is empty string. Returns a |
278 * empty string. | 278 * <code>PP_VARTYPE_UNDEFINED</code> if called on an invalid resource. |
279 */ | 279 */ |
280 PP_Var GetProtocol([in] PP_Resource web_socket); | 280 PP_Var GetProtocol([in] PP_Resource web_socket); |
281 | 281 |
282 /** | 282 /** |
283 * GetReadyState() returns the ready state of the specified WebSocket | 283 * GetReadyState() returns the ready state of the specified WebSocket |
284 * connection. | 284 * connection. |
285 * | 285 * |
286 * @param[in] web_socket A <code>PP_Resource</code> corresponding to a | 286 * @param[in] web_socket A <code>PP_Resource</code> corresponding to a |
287 * WebSocket. | 287 * WebSocket. |
288 * | 288 * |
289 * @return Returns <code>PP_WEBSOCKETREADYSTATE_CONNECTING</code> if called | 289 * @return Returns <code>PP_WEBSOCKETREADYSTATE_CLOSED_DEV</code> if called |
290 * before the connection is established. | 290 * before connect() is called, or called on an invalid resource. |
dmichael (off chromium)
2011/11/15 17:33:11
It seems to me it would make sense to define a new
| |
291 */ | 291 */ |
292 PP_WebSocketReadyState_Dev GetReadyState([in] PP_Resource web_socket); | 292 PP_WebSocketReadyState_Dev GetReadyState([in] PP_Resource web_socket); |
293 | 293 |
294 /** | 294 /** |
295 * GetURL() returns the URL associated with specified WebSocket connection. | 295 * GetURL() returns the URL associated with specified WebSocket connection. |
296 * | 296 * |
297 * @param[in] web_socket A <code>PP_Resource</code> corresponding to a | 297 * @param[in] web_socket A <code>PP_Resource</code> corresponding to a |
298 * WebSocket. | 298 * WebSocket. |
299 * | 299 * |
300 * @return Returns a <code>PP_VARTYPE_STRING</code> var. If called before the | 300 * @return Returns a <code>PP_VARTYPE_STRING</code> var. If called before the |
301 * connection is established, or called on an invalid resource, its data is | 301 * connection is established, its data is empty string. Return a |
302 * empty string. | 302 * <code>PP_VARTYPE_UNDEFINED</code> if called on an invalid resource. |
303 */ | 303 */ |
304 PP_Var GetURL([in] PP_Resource web_socket); | 304 PP_Var GetURL([in] PP_Resource web_socket); |
305 }; | 305 }; |
OLD | NEW |