| Index: ppapi/c/dev/ppb_transport_dev.h
|
| ===================================================================
|
| --- ppapi/c/dev/ppb_transport_dev.h (revision 65116)
|
| +++ ppapi/c/dev/ppb_transport_dev.h (working copy)
|
| @@ -5,6 +5,7 @@
|
| #ifndef PPAPI_C_PPB_TRANSPORT_DEV_H_
|
| #define PPAPI_C_PPB_TRANSPORT_DEV_H_
|
|
|
| +#include "ppapi/c/pp_bool.h"
|
| #include "ppapi/c/pp_completion_callback.h"
|
| #include "ppapi/c/pp_module.h"
|
| #include "ppapi/c/pp_instance.h"
|
| @@ -12,7 +13,7 @@
|
| #include "ppapi/c/pp_stdint.h"
|
| #include "ppapi/c/pp_var.h"
|
|
|
| -#define PPB_TRANSPORT_DEV_INTERFACE "PPB_Transport;0.1"
|
| +#define PPB_TRANSPORT_DEV_INTERFACE "PPB_Transport;0.2"
|
|
|
| struct PPB_Transport_Dev {
|
| // Creates a new transport object with the specified name
|
| @@ -21,12 +22,12 @@
|
| const char* name,
|
| const char* proto);
|
|
|
| - // Returns whether or not resource is a Transport
|
| - bool (*IsTransport)(PP_Resource resource);
|
| + // Returns PP_TRUE if resource is a Transport, PP_FALSE otherwise.
|
| + PP_Bool (*IsTransport)(PP_Resource resource);
|
|
|
| - // Returns whether the transport is currently writable
|
| - // (i.e. can send data to the remote peer)
|
| - bool (*IsWritable)(PP_Resource transport);
|
| + // Returns PP_TRUE if the transport is currently writable
|
| + // (i.e. can send data to the remote peer), PP_FALSE otherwise.
|
| + PP_Bool (*IsWritable)(PP_Resource transport);
|
| // TODO(juberti): other getters/setters
|
| // connect state
|
| // connect type, protocol
|
| @@ -36,35 +37,34 @@
|
| // Returns PP_ERROR_WOULDBLOCK and notifies on |cb|
|
| // when connectivity is established (or timeout occurs).
|
| int32_t (*Connect)(PP_Resource transport,
|
| - PP_CompletionCallback cb);
|
| + struct PP_CompletionCallback cb);
|
|
|
| // Obtains another ICE candidate address to be provided
|
| // to the remote peer. Returns PP_ERROR_WOULDBLOCK
|
| // if there are no more addresses to be sent.
|
| int32_t (*GetNextAddress)(PP_Resource transport,
|
| - PP_Var* address,
|
| - PP_CompletionCallback cb);
|
| + struct PP_Var* address,
|
| + struct PP_CompletionCallback cb);
|
| // Provides an ICE candidate address that was received
|
| // from the remote peer.
|
| int32_t (*ReceiveRemoteAddress)(PP_Resource transport,
|
| - PP_Var address);
|
| + struct PP_Var address);
|
|
|
| // Like recv(), receives data. Returns PP_ERROR_WOULDBLOCK
|
| // if there is currently no data to receive.
|
| int32_t (*Recv)(PP_Resource transport,
|
| void* data,
|
| uint32_t len,
|
| - PP_CompletionCallback cb);
|
| + struct PP_CompletionCallback cb);
|
| // Like send(), sends data. Returns PP_ERROR_WOULDBLOCK
|
| // if the socket is currently flow-controlled.
|
| int32_t (*Send)(PP_Resource transport,
|
| const void* data,
|
| uint32_t len,
|
| - PP_CompletionCallback cb);
|
| + struct PP_CompletionCallback cb);
|
|
|
| // Disconnects from the remote peer.
|
| int32_t (*Close)(PP_Resource transport);
|
| };
|
|
|
| #endif // PPAPI_C_PPB_TRANSPORT_DEV_H_
|
| -
|
|
|