Pepper_56_C_interfaces
Pepper_56_C_interfaces
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
ppb_websocket.h
Go to the documentation of this file.
1 /* Copyright (c) 2012 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 ppb_websocket.idl modified Thu Oct 20 13:57:04 2016. */
7 
8 #ifndef PPAPI_C_PPB_WEBSOCKET_H_
9 #define PPAPI_C_PPB_WEBSOCKET_H_
10 
11 #include "ppapi/c/pp_bool.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/pp_var.h"
18 
19 #define PPB_WEBSOCKET_INTERFACE_1_0 "PPB_WebSocket;1.0"
20 #define PPB_WEBSOCKET_INTERFACE PPB_WEBSOCKET_INTERFACE_1_0
21 
38 typedef enum {
61 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_WebSocketReadyState, 4);
62 
73 typedef enum {
161  PP_WEBSOCKETSTATUSCODE_USER_REGISTERED_MAX = 3999,
167  PP_WEBSOCKETSTATUSCODE_USER_PRIVATE_MAX = 4999
169 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_WebSocketCloseCode, 4);
245  int32_t (*Connect)(PP_Resource web_socket,
246  struct PP_Var url,
247  const struct PP_Var protocols[],
248  uint32_t protocol_count,
249  struct PP_CompletionCallback callback);
286  int32_t (*Close)(PP_Resource web_socket,
287  uint16_t code,
288  struct PP_Var reason,
289  struct PP_CompletionCallback callback);
314  int32_t (*ReceiveMessage)(PP_Resource web_socket,
315  struct PP_Var* message,
316  struct PP_CompletionCallback callback);
340  int32_t (*SendMessage)(PP_Resource web_socket, struct PP_Var message);
351  uint64_t (*GetBufferedAmount)(PP_Resource web_socket);
361  uint16_t (*GetCloseCode)(PP_Resource web_socket);
373  struct PP_Var (*GetCloseReason)(PP_Resource web_socket);
398  struct PP_Var (*GetExtensions)(PP_Resource web_socket);
410  struct PP_Var (*GetProtocol)(PP_Resource web_socket);
434  struct PP_Var (*GetURL)(PP_Resource web_socket);
435 };
436 
437 typedef struct PPB_WebSocket_1_0 PPB_WebSocket;
442 #endif /* PPAPI_C_PPB_WEBSOCKET_H_ */
443 
struct PP_Var(* GetURL)(PP_Resource web_socket)
Definition: ppb_websocket.h:434
Definition: ppb_websocket.h:46
struct PP_Var(* GetCloseReason)(PP_Resource web_socket)
Definition: ppb_websocket.h:373
Definition: ppb_websocket.h:51
uint16_t(* GetCloseCode)(PP_Resource web_socket)
Definition: ppb_websocket.h:361
Definition: ppb_websocket.h:115
Definition: ppb_websocket.h:42
PP_Resource(* Create)(PP_Instance instance)
Definition: ppb_websocket.h:192
Definition: ppb_websocket.h:131
int32_t(* Close)(PP_Resource web_socket, uint16_t code, struct PP_Var reason, struct PP_CompletionCallback callback)
Definition: ppb_websocket.h:286
Definition: ppb_websocket.h:97
Definition: ppb_websocket.h:55
int32_t(* SendMessage)(PP_Resource web_socket, struct PP_Var message)
Definition: ppb_websocket.h:340
int32_t PP_Resource
Definition: pp_resource.h:40
Definition: ppb_websocket.h:143
Definition: ppb_websocket.h:126
uint64_t(* GetBufferedAmount)(PP_Resource web_socket)
Definition: ppb_websocket.h:351
Definition: ppb_websocket.h:160
PP_WebSocketReadyState
Definition: ppb_websocket.h:38
Definition: pp_var.h:166
Definition: ppb_websocket.h:182
int32_t(* Connect)(PP_Resource web_socket, struct PP_Var url, const struct PP_Var protocols[], uint32_t protocol_count, struct PP_CompletionCallback callback)
Definition: ppb_websocket.h:245
PP_WebSocketCloseCode
Definition: ppb_websocket.h:73
Definition: ppb_websocket.h:138
int32_t PP_Instance
Definition: pp_instance.h:34
PP_Bool(* GetCloseWasClean)(PP_Resource web_socket)
Definition: ppb_websocket.h:386
Definition: ppb_websocket.h:166
struct PP_Var(* GetExtensions)(PP_Resource web_socket)
Definition: ppb_websocket.h:398
Definition: ppb_websocket.h:102
Definition: ppb_websocket.h:59
Definition: ppb_websocket.h:88
Definition: ppb_websocket.h:92
PP_Bool
Definition: pp_bool.h:30
Definition: ppb_websocket.h:110
PP_Bool(* IsWebSocket)(PP_Resource resource)
Definition: ppb_websocket.h:205
int32_t(* ReceiveMessage)(PP_Resource web_socket, struct PP_Var *message, struct PP_CompletionCallback callback)
Definition: ppb_websocket.h:314
PP_WebSocketReadyState(* GetReadyState)(PP_Resource web_socket)
Definition: ppb_websocket.h:422
Definition: pp_completion_callback.h:139
Definition: ppb_websocket.h:151
struct PP_Var(* GetProtocol)(PP_Resource web_socket)
Definition: ppb_websocket.h:410
Definition: ppb_websocket.h:81