| 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 | 5 |
| 6 /* From private/ppb_flash_tcp_socket.idl modified Mon Oct 17 16:09:17 2011. */ | 6 /* From private/ppb_flash_tcp_socket.idl modified Wed Nov 9 12:53:35 2011. */ |
| 7 | 7 |
| 8 #ifndef PPAPI_C_PRIVATE_PPB_FLASH_TCP_SOCKET_H_ | 8 #ifndef PPAPI_C_PRIVATE_PPB_FLASH_TCP_SOCKET_H_ |
| 9 #define PPAPI_C_PRIVATE_PPB_FLASH_TCP_SOCKET_H_ | 9 #define PPAPI_C_PRIVATE_PPB_FLASH_TCP_SOCKET_H_ |
| 10 | 10 |
| 11 #include "ppapi/c/pp_bool.h" | 11 #include "ppapi/c/pp_bool.h" |
| 12 #include "ppapi/c/pp_completion_callback.h" | 12 #include "ppapi/c/pp_completion_callback.h" |
| 13 #include "ppapi/c/pp_instance.h" | 13 #include "ppapi/c/pp_instance.h" |
| 14 #include "ppapi/c/pp_macros.h" | 14 #include "ppapi/c/pp_macros.h" |
| 15 #include "ppapi/c/pp_resource.h" | 15 #include "ppapi/c/pp_resource.h" |
| 16 #include "ppapi/c/pp_stdint.h" | 16 #include "ppapi/c/pp_stdint.h" |
| 17 #include "ppapi/c/private/ppb_flash_net_address.h" | 17 #include "ppapi/c/private/ppb_net_address_private.h" |
| 18 | 18 |
| 19 #define PPB_FLASH_TCPSOCKET_INTERFACE_0_2 "PPB_Flash_TCPSocket;0.2" | 19 #define PPB_FLASH_TCPSOCKET_INTERFACE_0_2 "PPB_Flash_TCPSocket;0.2" |
| 20 #define PPB_FLASH_TCPSOCKET_INTERFACE PPB_FLASH_TCPSOCKET_INTERFACE_0_2 | 20 #define PPB_FLASH_TCPSOCKET_INTERFACE PPB_FLASH_TCPSOCKET_INTERFACE_0_2 |
| 21 | 21 |
| 22 /** | 22 /** |
| 23 * @file | 23 * @file |
| 24 * This file defines the <code>PPB_Flash_TCPSocket</code> interface. | 24 * This file defines the <code>PPB_Flash_TCPSocket</code> interface. |
| 25 */ | 25 */ |
| 26 | 26 |
| 27 | 27 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 49 */ | 49 */ |
| 50 int32_t (*Connect)(PP_Resource tcp_socket, | 50 int32_t (*Connect)(PP_Resource tcp_socket, |
| 51 const char* host, | 51 const char* host, |
| 52 uint16_t port, | 52 uint16_t port, |
| 53 struct PP_CompletionCallback callback); | 53 struct PP_CompletionCallback callback); |
| 54 /** | 54 /** |
| 55 * Same as Connect(), but connecting to the address given by |addr|. A typical | 55 * Same as Connect(), but connecting to the address given by |addr|. A typical |
| 56 * use-case would be for reconnections. | 56 * use-case would be for reconnections. |
| 57 */ | 57 */ |
| 58 int32_t (*ConnectWithNetAddress)(PP_Resource tcp_socket, | 58 int32_t (*ConnectWithNetAddress)(PP_Resource tcp_socket, |
| 59 const struct PP_Flash_NetAddress* addr, | 59 const struct PP_NetAddress_Private* addr, |
| 60 struct PP_CompletionCallback callback); | 60 struct PP_CompletionCallback callback); |
| 61 /** | 61 /** |
| 62 * Gets the local address of the socket, if it has been connected. | 62 * Gets the local address of the socket, if it has been connected. |
| 63 * Returns PP_TRUE on success. | 63 * Returns PP_TRUE on success. |
| 64 */ | 64 */ |
| 65 PP_Bool (*GetLocalAddress)(PP_Resource tcp_socket, | 65 PP_Bool (*GetLocalAddress)(PP_Resource tcp_socket, |
| 66 struct PP_Flash_NetAddress* local_addr); | 66 struct PP_NetAddress_Private* local_addr); |
| 67 /** | 67 /** |
| 68 * Gets the remote address of the socket, if it has been connected. | 68 * Gets the remote address of the socket, if it has been connected. |
| 69 * Returns PP_TRUE on success. | 69 * Returns PP_TRUE on success. |
| 70 */ | 70 */ |
| 71 PP_Bool (*GetRemoteAddress)(PP_Resource tcp_socket, | 71 PP_Bool (*GetRemoteAddress)(PP_Resource tcp_socket, |
| 72 struct PP_Flash_NetAddress* remote_addr); | 72 struct PP_NetAddress_Private* remote_addr); |
| 73 /** | 73 /** |
| 74 * Does SSL handshake and moves to sending and receiving encrypted data. The | 74 * Does SSL handshake and moves to sending and receiving encrypted data. The |
| 75 * socket must have been successfully connected. |server_name| will be | 75 * socket must have been successfully connected. |server_name| will be |
| 76 * compared with the name(s) in the server's certificate during the SSL | 76 * compared with the name(s) in the server's certificate during the SSL |
| 77 * handshake. |server_port| is only used to identify an SSL server in the SSL | 77 * handshake. |server_port| is only used to identify an SSL server in the SSL |
| 78 * session cache. | 78 * session cache. |
| 79 * When a proxy server is used, |server_name| and |server_port| refer to the | 79 * When a proxy server is used, |server_name| and |server_port| refer to the |
| 80 * destination server. | 80 * destination server. |
| 81 * If the socket is not connected, or there are pending read/write requests, | 81 * If the socket is not connected, or there are pending read/write requests, |
| 82 * SSLHandshake() will fail without starting a handshake. Otherwise, any | 82 * SSLHandshake() will fail without starting a handshake. Otherwise, any |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 * method. | 120 * method. |
| 121 */ | 121 */ |
| 122 void (*Disconnect)(PP_Resource tcp_socket); | 122 void (*Disconnect)(PP_Resource tcp_socket); |
| 123 }; | 123 }; |
| 124 /** | 124 /** |
| 125 * @} | 125 * @} |
| 126 */ | 126 */ |
| 127 | 127 |
| 128 #endif /* PPAPI_C_PRIVATE_PPB_FLASH_TCP_SOCKET_H_ */ | 128 #endif /* PPAPI_C_PRIVATE_PPB_FLASH_TCP_SOCKET_H_ */ |
| 129 | 129 |
| OLD | NEW |