Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(276)

Side by Side Diff: ppapi/c/private/ppb_flash_tcp_socket.h

Issue 9405038: Add PPAPI interface for secure sockets in flash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 /* Copyright (c) 2012 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 Thu Nov 10 10:21:43 2011. */ 6 /* From private/ppb_flash_tcp_socket.idl modified Thu Feb 16 10:37:34 2012. */
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"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
83 * failure during the handshake process will cause the socket to be 83 * failure during the handshake process will cause the socket to be
84 * disconnected. 84 * disconnected.
85 */ 85 */
86 int32_t (*SSLHandshake)(PP_Resource tcp_socket, 86 int32_t (*SSLHandshake)(PP_Resource tcp_socket,
87 const char* server_name, 87 const char* server_name,
88 uint16_t server_port, 88 uint16_t server_port,
89 struct PP_CompletionCallback callback); 89 struct PP_CompletionCallback callback);
90 /** 90 /**
91 * Returns the <code>PPB_Flash_X509Certificate</code> for a socket connection
92 * if an SSL connection has been established using <code>SSL_Handshake</code>.
93 * If no SSL connection has been established, a null resource is returned.
94 */
95 PP_Resource (*GetX509Certificate)(PP_Resource tcp_socket);
96 /**
97 * Add a trusted/untrusted root certificate to be used for this connection.
98 * The <code>PP_Resource</code> must be a
99 * <code>PPB_Flash_X509Certificate<code>. <code>PP_TRUE</code> is returned
100 * upon success.
101 */
102 PP_Bool (*AddRootCertificates)(PP_Resource certificate, PP_Bool is_trusted);
103 /**
91 * Reads data from the socket. The size of |buffer| must be at least as large 104 * Reads data from the socket. The size of |buffer| must be at least as large
92 * as |bytes_to_read|. May perform a partial read. Returns the number of bytes 105 * as |bytes_to_read|. May perform a partial read. Returns the number of bytes
93 * read or an error code. If the return value is 0, then it indicates that 106 * read or an error code. If the return value is 0, then it indicates that
94 * end-of-file was reached. 107 * end-of-file was reached.
95 * This method won't return more than 1 megabyte, so if |bytes_to_read| 108 * This method won't return more than 1 megabyte, so if |bytes_to_read|
96 * exceeds 1 megabyte, it will always perform a partial read. 109 * exceeds 1 megabyte, it will always perform a partial read.
97 * Multiple outstanding read requests are not supported. 110 * Multiple outstanding read requests are not supported.
98 */ 111 */
99 int32_t (*Read)(PP_Resource tcp_socket, 112 int32_t (*Read)(PP_Resource tcp_socket,
100 char* buffer, 113 char* buffer,
(...skipping 21 matching lines...) Expand all
122 void (*Disconnect)(PP_Resource tcp_socket); 135 void (*Disconnect)(PP_Resource tcp_socket);
123 }; 136 };
124 137
125 typedef struct PPB_Flash_TCPSocket_0_2 PPB_Flash_TCPSocket; 138 typedef struct PPB_Flash_TCPSocket_0_2 PPB_Flash_TCPSocket;
126 /** 139 /**
127 * @} 140 * @}
128 */ 141 */
129 142
130 #endif /* PPAPI_C_PRIVATE_PPB_FLASH_TCP_SOCKET_H_ */ 143 #endif /* PPAPI_C_PRIVATE_PPB_FLASH_TCP_SOCKET_H_ */
131 144
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698