| Index: ppapi/c/private/ppb_tcp_socket_private.h
|
| diff --git a/ppapi/c/private/ppb_tcp_socket_private.h b/ppapi/c/private/ppb_tcp_socket_private.h
|
| index 7cdf5915a15c5cae49c9d299cd0adca3e58218ef..b3a25d8c2cbc9c0e5c8b0083c4939d51cfe7fb84 100644
|
| --- a/ppapi/c/private/ppb_tcp_socket_private.h
|
| +++ b/ppapi/c/private/ppb_tcp_socket_private.h
|
| @@ -3,7 +3,7 @@
|
| * found in the LICENSE file.
|
| */
|
|
|
| -/* From private/ppb_tcp_socket_private.idl modified Wed Nov 16 15:27:20 2011. */
|
| +/* From private/ppb_tcp_socket_private.idl modified Wed Apr 4 14:33:41 2012. */
|
|
|
| #ifndef PPAPI_C_PRIVATE_PPB_TCP_SOCKET_PRIVATE_H_
|
| #define PPAPI_C_PRIVATE_PPB_TCP_SOCKET_PRIVATE_H_
|
| @@ -17,7 +17,8 @@
|
| #include "ppapi/c/private/ppb_net_address_private.h"
|
|
|
| #define PPB_TCPSOCKET_PRIVATE_INTERFACE_0_3 "PPB_TCPSocket_Private;0.3"
|
| -#define PPB_TCPSOCKET_PRIVATE_INTERFACE PPB_TCPSOCKET_PRIVATE_INTERFACE_0_3
|
| +#define PPB_TCPSOCKET_PRIVATE_INTERFACE_0_4 "PPB_TCPSocket_Private;0.4"
|
| +#define PPB_TCPSOCKET_PRIVATE_INTERFACE PPB_TCPSOCKET_PRIVATE_INTERFACE_0_4
|
|
|
| /**
|
| * @file
|
| @@ -33,7 +34,7 @@
|
| * The <code>PPB_TCPSocket_Private</code> interface provides TCP socket
|
| * operations.
|
| */
|
| -struct PPB_TCPSocket_Private_0_3 {
|
| +struct PPB_TCPSocket_Private_0_4 {
|
| /**
|
| * Allocates a TCP socket resource.
|
| */
|
| @@ -88,6 +89,24 @@ struct PPB_TCPSocket_Private_0_3 {
|
| uint16_t server_port,
|
| struct PP_CompletionCallback callback);
|
| /**
|
| + * Returns the server's <code>PPB_Flash_X509Certificate</code> for a socket
|
| + * connection if an SSL connection has been established using
|
| + * <code>SSL_Handshake</code>. If no SSL connection has been established, a
|
| + * null resource is returned.
|
| + */
|
| + PP_Resource (*GetServerCertificate)(PP_Resource tcp_socket);
|
| + /**
|
| + * NOTE: This function is not implemented and will return
|
| + * <code>PP_FALSE</code>.
|
| + * Add a trusted/untrusted chain building certificate to be used for this
|
| + * connection. The <code>PP_Resource</code> must be a
|
| + * <code>PPB_Flash_X509Certificate<code>. <code>PP_TRUE</code> is returned
|
| + * upon success.
|
| + */
|
| + PP_Bool (*AddChainBuildingCertificate)(PP_Resource tcp_socket,
|
| + PP_Resource certificate,
|
| + PP_Bool is_trusted);
|
| + /**
|
| * Reads data from the socket. The size of |buffer| must be at least as large
|
| * as |bytes_to_read|. May perform a partial read. Returns the number of bytes
|
| * read or an error code. If the return value is 0, then it indicates that
|
| @@ -122,7 +141,36 @@ struct PPB_TCPSocket_Private_0_3 {
|
| void (*Disconnect)(PP_Resource tcp_socket);
|
| };
|
|
|
| -typedef struct PPB_TCPSocket_Private_0_3 PPB_TCPSocket_Private;
|
| +typedef struct PPB_TCPSocket_Private_0_4 PPB_TCPSocket_Private;
|
| +
|
| +struct PPB_TCPSocket_Private_0_3 {
|
| + PP_Resource (*Create)(PP_Instance instance);
|
| + PP_Bool (*IsTCPSocket)(PP_Resource resource);
|
| + int32_t (*Connect)(PP_Resource tcp_socket,
|
| + const char* host,
|
| + uint16_t port,
|
| + struct PP_CompletionCallback callback);
|
| + int32_t (*ConnectWithNetAddress)(PP_Resource tcp_socket,
|
| + const struct PP_NetAddress_Private* addr,
|
| + struct PP_CompletionCallback callback);
|
| + PP_Bool (*GetLocalAddress)(PP_Resource tcp_socket,
|
| + struct PP_NetAddress_Private* local_addr);
|
| + PP_Bool (*GetRemoteAddress)(PP_Resource tcp_socket,
|
| + struct PP_NetAddress_Private* remote_addr);
|
| + int32_t (*SSLHandshake)(PP_Resource tcp_socket,
|
| + const char* server_name,
|
| + uint16_t server_port,
|
| + struct PP_CompletionCallback callback);
|
| + int32_t (*Read)(PP_Resource tcp_socket,
|
| + char* buffer,
|
| + int32_t bytes_to_read,
|
| + struct PP_CompletionCallback callback);
|
| + int32_t (*Write)(PP_Resource tcp_socket,
|
| + const char* buffer,
|
| + int32_t bytes_to_write,
|
| + struct PP_CompletionCallback callback);
|
| + void (*Disconnect)(PP_Resource tcp_socket);
|
| +};
|
| /**
|
| * @}
|
| */
|
|
|