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 #ifndef PPAPI_C_PPB_TRANSPORT_DEV_H_ | 5 #ifndef PPAPI_C_PPB_TRANSPORT_DEV_H_ |
6 #define PPAPI_C_PPB_TRANSPORT_DEV_H_ | 6 #define PPAPI_C_PPB_TRANSPORT_DEV_H_ |
7 | 7 |
8 #include "ppapi/c/pp_bool.h" | 8 #include "ppapi/c/pp_bool.h" |
9 #include "ppapi/c/pp_completion_callback.h" | 9 #include "ppapi/c/pp_completion_callback.h" |
10 #include "ppapi/c/pp_module.h" | 10 #include "ppapi/c/pp_module.h" |
11 #include "ppapi/c/pp_instance.h" | 11 #include "ppapi/c/pp_instance.h" |
12 #include "ppapi/c/pp_resource.h" | 12 #include "ppapi/c/pp_resource.h" |
13 #include "ppapi/c/pp_stdint.h" | 13 #include "ppapi/c/pp_stdint.h" |
14 #include "ppapi/c/pp_var.h" | 14 #include "ppapi/c/pp_var.h" |
15 | 15 |
16 #define PPB_TRANSPORT_DEV_INTERFACE "PPB_Transport;0.4" | 16 #define PPB_TRANSPORT_DEV_INTERFACE_0_4 "PPB_Transport;0.4" |
| 17 #define PPB_TRANSPORT_DEV_INTERFACE PPB_TRANSPORT_DEV_INTERFACE_0_4 |
17 | 18 |
18 struct PPB_Transport_Dev { | 19 struct PPB_Transport_Dev { |
19 // Creates a new transport object with the specified name using the | 20 // Creates a new transport object with the specified name using the |
20 // specified protocol. | 21 // specified protocol. |
21 PP_Resource (*CreateTransport)(PP_Instance instance, | 22 PP_Resource (*CreateTransport)(PP_Instance instance, |
22 const char* name, | 23 const char* name, |
23 const char* proto); | 24 const char* proto); |
24 | 25 |
25 // Returns PP_TRUE if resource is a Transport, PP_FALSE otherwise. | 26 // Returns PP_TRUE if resource is a Transport, PP_FALSE otherwise. |
26 PP_Bool (*IsTransport)(PP_Resource resource); | 27 PP_Bool (*IsTransport)(PP_Resource resource); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 int32_t (*Send)(PP_Resource transport, | 65 int32_t (*Send)(PP_Resource transport, |
65 const void* data, | 66 const void* data, |
66 uint32_t len, | 67 uint32_t len, |
67 struct PP_CompletionCallback cb); | 68 struct PP_CompletionCallback cb); |
68 | 69 |
69 // Disconnects from the remote peer. | 70 // Disconnects from the remote peer. |
70 int32_t (*Close)(PP_Resource transport); | 71 int32_t (*Close)(PP_Resource transport); |
71 }; | 72 }; |
72 | 73 |
73 #endif /* PPAPI_C_PPB_TRANSPORT_DEV_H_ */ | 74 #endif /* PPAPI_C_PPB_TRANSPORT_DEV_H_ */ |
OLD | NEW |