| # Copyright (c) 2012 The Native Client Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| # |
| # RPC methods used to implement PPB_WebSocket calls from the plugin. |
| # See ppapi/c/ppb_websocket.h for interface details. |
| |
| { |
| 'name': 'PpbWebSocketRpc', |
| 'rpcs': [ |
| {'name': 'PPB_WebSocket_Create', |
| 'inputs': [['instance', 'PP_Instance'], # PP_Instance |
| ], |
| 'outputs': [['resource', 'PP_Resource'], # PP_Resource |
| ] |
| }, |
| {'name': 'PPB_WebSocket_IsWebSocket', |
| 'inputs': [['instance', 'PP_Resource'], # PP_Resource |
| ], |
| 'outputs': [['is_websocket', 'int32_t'], # PP_Bool |
| ] |
| }, |
| {'name': 'PPB_WebSocket_Connect', |
| 'inputs': [['ws', 'PP_Resource'], # PP_Resource |
| ['url', 'char[]'], # PP_Var |
| ['protocols', 'char[]'], # PP_Var[] |
| ['protocol_count', 'int32_t'], # uint32_t |
| ['callback_id', 'int32_t'], # PP_CompletionCallback |
| ], |
| 'outputs': [['pp_error', 'int32_t'], # int32_t |
| ] |
| }, |
| {'name': 'PPB_WebSocket_Close', |
| 'inputs': [['ws', 'PP_Resource'], # PP_Resource |
| ['code', 'int32_t'], # uint16_t |
| ['reason', 'char[]'], # PP_Var |
| ['callback_id', 'int32_t'], # PP_CompletionCallback |
| ], |
| 'outputs': [['pp_error', 'int32_t'], # int32_t |
| ] |
| }, |
| {'name': 'PPB_WebSocket_ReceiveMessage', |
| 'inputs': [['ws', 'PP_Resource'], # PP_Resource |
| ['callback_id', 'int32_t'], # PP_CompletionCallback |
| ], |
| 'outputs': [['pp_error', 'int32_t'], # int32_t |
| ['sync_read_buffer', 'char[]'], # PP_Var |
| ] |
| }, |
| {'name': 'PPB_WebSocket_SendMessage', |
| 'inputs': [['ws', 'PP_Resource'], # PP_Resource |
| ['message', 'char[]'], # PP_Var |
| ], |
| 'outputs': [['pp_error', 'int32_t'], # int32_t |
| ] |
| }, |
| {'name': 'PPB_WebSocket_GetBufferedAmount', |
| 'inputs': [['ws', 'PP_Resource'], # PP_Resource |
| ], |
| 'outputs': [['buffered_amount', 'int64_t'], # uint64_t |
| ] |
| }, |
| {'name': 'PPB_WebSocket_GetCloseCode', |
| 'inputs': [['ws', 'PP_Resource'], # PP_Resource |
| ], |
| 'outputs': [['close_code', 'int32_t'], # uint16_t |
| ] |
| }, |
| {'name': 'PPB_WebSocket_GetCloseReason', |
| 'inputs': [['ws', 'PP_Resource'], # PP_Resource |
| ], |
| 'outputs': [['reason', 'char[]'], # PP_Var |
| ] |
| }, |
| {'name': 'PPB_WebSocket_GetCloseWasClean', |
| 'inputs': [['ws', 'PP_Resource'], # PP_Resource |
| ], |
| 'outputs': [['was_clean', 'int32_t'], # PP_Bool |
| ] |
| }, |
| {'name': 'PPB_WebSocket_GetExtensions', |
| 'inputs': [['ws', 'PP_Resource'], # PP_Resource |
| ], |
| 'outputs': [['extensions', 'char[]'], # PP_Var |
| ] |
| }, |
| {'name': 'PPB_WebSocket_GetProtocol', |
| 'inputs': [['ws', 'PP_Resource'], # PP_Resource |
| ], |
| 'outputs': [['protocol', 'char[]'], # PP_Var |
| ] |
| }, |
| {'name': 'PPB_WebSocket_GetReadyState', |
| 'inputs': [['ws', 'PP_Resource'], # PP_Resource |
| ], |
| 'outputs': [['ready_state', 'int32_t'], # PP_WebSocketReadyState |
| ] |
| }, |
| {'name': 'PPB_WebSocket_GetURL', |
| 'inputs': [['ws', 'PP_Resource'], # PP_Resource |
| ], |
| 'outputs': [['url', 'char[]'], # PP_Var |
| ] |
| } |
| ] |
| } |