OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef PPAPI_THUNK_WEBSOCKET_API_H_ |
| 6 #define PPAPI_THUNK_WEBSOCKET_API_H_ |
| 7 |
| 8 #include "ppapi/c/pp_completion_callback.h" |
| 9 #include "ppapi/c/dev/ppb_websocket_dev.h" |
| 10 |
| 11 namespace ppapi { |
| 12 namespace thunk { |
| 13 |
| 14 class PPB_WebSocket_API { |
| 15 public: |
| 16 virtual ~PPB_WebSocket_API() {} |
| 17 |
| 18 virtual int32_t Connect(PP_Var url, |
| 19 const PP_Var protocols[], |
| 20 uint32_t protocol_count, |
| 21 PP_CompletionCallback callback) = 0; |
| 22 virtual int32_t Close(uint16_t code, |
| 23 PP_Var reason, |
| 24 PP_CompletionCallback callback) = 0; |
| 25 virtual int32_t ReceiveMessage(PP_Var* message, |
| 26 PP_CompletionCallback callback) = 0; |
| 27 virtual int32_t SendMessage(PP_Var message) = 0; |
| 28 virtual uint64_t GetBufferedAmount() = 0; |
| 29 virtual uint16_t GetCloseCode() = 0; |
| 30 virtual PP_Var GetCloseReason() = 0; |
| 31 virtual PP_Bool GetCloseWasClean() = 0; |
| 32 virtual PP_Var GetExtensions() = 0; |
| 33 virtual PP_Var GetProtocol() = 0; |
| 34 virtual PP_WebSocketReadyState_Dev GetReadyState() = 0; |
| 35 virtual PP_Var GetURL() = 0; |
| 36 }; |
| 37 |
| 38 } // namespace thunk |
| 39 } // namespace ppapi |
| 40 |
| 41 #endif // PPAPI_THUNK_WEBSOCKET_API_H_ |
OLD | NEW |