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

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

Issue 8506016: Remove 'Flash' from TCP/UDP Pepper interfaces. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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) 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 // TODO(yzshen): This (and the .cc file) contain C++ wrappers for things 5 // TODO(yzshen): This (and the .cc file) contain C++ wrappers for things
6 // in ppapi/c/private/ppb_flash_tcp_socket.h. This is currently not used in 6 // in ppapi/c/private/ppb_tcp_socket.h. This is currently not used in
7 // (or even compiled with) Chromium. 7 // (or even compiled with) Chromium.
yzshen1 2011/11/09 23:53:55 Now we can compile it (as well as udp_socket) with
Dmitry Polukhin 2011/11/10 15:10:11 Done.
8 8
9 #ifndef PPAPI_CPP_PRIVATE_FLASH_TCP_SOCKET_H_ 9 #ifndef PPAPI_CPP_PRIVATE_TCP_SOCKET_H_
10 #define PPAPI_CPP_PRIVATE_FLASH_TCP_SOCKET_H_ 10 #define PPAPI_CPP_PRIVATE_TCP_SOCKET_H_
11 11
12 #include "ppapi/c/pp_stdint.h" 12 #include "ppapi/c/pp_stdint.h"
13 #include "ppapi/c/private/ppb_flash_tcp_socket.h" 13 #include "ppapi/c/private/ppb_tcp_socket.h"
14 #include "ppapi/cpp/resource.h" 14 #include "ppapi/cpp/resource.h"
15 15
16 namespace pp { 16 namespace pp {
17 17
18 class CompletionCallback; 18 class CompletionCallback;
19 class Instance; 19 class Instance;
20 20
21 namespace flash {
22
23 class TCPSocket : public Resource { 21 class TCPSocket : public Resource {
24 public: 22 public:
25 explicit TCPSocket(Instance* instance); 23 explicit TCPSocket(Instance* instance);
26 24
27 int32_t Connect(const char* host, 25 int32_t Connect(const char* host,
28 uint16_t port, 26 uint16_t port,
29 const CompletionCallback& callback); 27 const CompletionCallback& callback);
30 int32_t ConnectWithNetAddress(const PP_Flash_NetAddress* addr, 28 int32_t ConnectWithNetAddress(const PP_NetAddress* addr,
31 const CompletionCallback& callback); 29 const CompletionCallback& callback);
32 bool GetLocalAddress(PP_Flash_NetAddress* local_addr); 30 bool GetLocalAddress(PP_NetAddress* local_addr);
33 bool GetRemoteAddress(PP_Flash_NetAddress* remote_addr); 31 bool GetRemoteAddress(PP_NetAddress* remote_addr);
34 int32_t SSLHandshake(const char* server_name, 32 int32_t SSLHandshake(const char* server_name,
35 uint16_t server_port, 33 uint16_t server_port,
36 const CompletionCallback& callback); 34 const CompletionCallback& callback);
37 int32_t Read(char* buffer, 35 int32_t Read(char* buffer,
38 int32_t bytes_to_read, 36 int32_t bytes_to_read,
39 const CompletionCallback& callback); 37 const CompletionCallback& callback);
40 int32_t Write(const char* buffer, 38 int32_t Write(const char* buffer,
41 int32_t bytes_to_write, 39 int32_t bytes_to_write,
42 const CompletionCallback& callback); 40 const CompletionCallback& callback);
43 void Disconnect(); 41 void Disconnect();
44 }; 42 };
45 43
46 } // namespace flash
47 } // namespace pp 44 } // namespace pp
48 45
49 #endif // PPAPI_CPP_PRIVATE_FLASH_TCP_SOCKET_H_ 46 #endif // PPAPI_CPP_PRIVATE_TCP_SOCKET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698