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

Side by Side Diff: ppapi/cpp/private/tcp_socket_private.h

Issue 9699100: Add functionality to pppapi TCPSocket to support secure sockets in flash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 8 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
« no previous file with comments | « ppapi/c/private/ppb_tcp_socket_private.h ('k') | ppapi/cpp/private/tcp_socket_private.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef PPAPI_CPP_PRIVATE_TCP_SOCKET_PRIVATE_H_ 5 #ifndef PPAPI_CPP_PRIVATE_TCP_SOCKET_PRIVATE_H_
6 #define PPAPI_CPP_PRIVATE_TCP_SOCKET_PRIVATE_H_ 6 #define PPAPI_CPP_PRIVATE_TCP_SOCKET_PRIVATE_H_
7 7
8 #include "ppapi/c/pp_stdint.h" 8 #include "ppapi/c/pp_stdint.h"
9 #include "ppapi/c/private/ppb_tcp_socket_private.h" 9 #include "ppapi/c/private/ppb_tcp_socket_private.h"
10 #include "ppapi/cpp/pass_ref.h" 10 #include "ppapi/cpp/pass_ref.h"
11 #include "ppapi/cpp/private/x509_certificate_private.h"
11 #include "ppapi/cpp/resource.h" 12 #include "ppapi/cpp/resource.h"
12 13
13 namespace pp { 14 namespace pp {
14 15
15 class CompletionCallback; 16 class CompletionCallback;
16 class InstanceHandle; 17 class InstanceHandle;
17 18
18 class TCPSocketPrivate : public Resource { 19 class TCPSocketPrivate : public Resource {
19 public: 20 public:
20 explicit TCPSocketPrivate(const InstanceHandle& instance); 21 explicit TCPSocketPrivate(const InstanceHandle& instance);
21 22
22 TCPSocketPrivate(PassRef, PP_Resource resource); 23 TCPSocketPrivate(PassRef, PP_Resource resource);
23 24
24 // Returns true if the required interface is available. 25 // Returns true if the required interface is available.
25 static bool IsAvailable(); 26 static bool IsAvailable();
26 27
27 int32_t Connect(const char* host, 28 int32_t Connect(const char* host,
28 uint16_t port, 29 uint16_t port,
29 const CompletionCallback& callback); 30 const CompletionCallback& callback);
30 int32_t ConnectWithNetAddress(const PP_NetAddress_Private* addr, 31 int32_t ConnectWithNetAddress(const PP_NetAddress_Private* addr,
31 const CompletionCallback& callback); 32 const CompletionCallback& callback);
32 bool GetLocalAddress(PP_NetAddress_Private* local_addr); 33 bool GetLocalAddress(PP_NetAddress_Private* local_addr);
33 bool GetRemoteAddress(PP_NetAddress_Private* remote_addr); 34 bool GetRemoteAddress(PP_NetAddress_Private* remote_addr);
34 int32_t SSLHandshake(const char* server_name, 35 int32_t SSLHandshake(const char* server_name,
35 uint16_t server_port, 36 uint16_t server_port,
36 const CompletionCallback& callback); 37 const CompletionCallback& callback);
38 X509CertificatePrivate GetServerCertificate();
39 bool AddChainBuildingCertificate(const X509CertificatePrivate& cert,
40 bool trusted);
41
37 int32_t Read(char* buffer, 42 int32_t Read(char* buffer,
38 int32_t bytes_to_read, 43 int32_t bytes_to_read,
39 const CompletionCallback& callback); 44 const CompletionCallback& callback);
40 int32_t Write(const char* buffer, 45 int32_t Write(const char* buffer,
41 int32_t bytes_to_write, 46 int32_t bytes_to_write,
42 const CompletionCallback& callback); 47 const CompletionCallback& callback);
43 void Disconnect(); 48 void Disconnect();
44 }; 49 };
45 50
46 } // namespace pp 51 } // namespace pp
47 52
48 #endif // PPAPI_CPP_PRIVATE_TCP_SOCKET_PRIVATE_H_ 53 #endif // PPAPI_CPP_PRIVATE_TCP_SOCKET_PRIVATE_H_
OLDNEW
« no previous file with comments | « ppapi/c/private/ppb_tcp_socket_private.h ('k') | ppapi/cpp/private/tcp_socket_private.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698