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 #ifndef PPAPI_CPP_PRIVATE_FLASH_NET_CONNECTOR_H_ | 5 #ifndef PPAPI_CPP_PRIVATE_FLASH_NET_CONNECTOR_H_ |
6 #define PPAPI_CPP_PRIVATE_FLASH_NET_CONNECTOR_H_ | 6 #define PPAPI_CPP_PRIVATE_FLASH_NET_CONNECTOR_H_ |
7 | 7 |
8 #include "ppapi/c/private/ppb_flash_net_connector.h" | 8 #include "ppapi/c/private/ppb_flash_net_connector.h" |
9 #include "ppapi/cpp/resource.h" | 9 #include "ppapi/cpp/resource.h" |
10 | 10 |
11 namespace pp { | 11 namespace pp { |
12 | 12 |
13 class CompletionCallback; | 13 class CompletionCallback; |
14 class Instance; | 14 class InstanceHandle; |
15 | 15 |
16 namespace flash { | 16 namespace flash { |
17 | 17 |
18 class NetConnector : public Resource { | 18 class NetConnector : public Resource { |
19 public: | 19 public: |
20 explicit NetConnector(const Instance& instance); | 20 explicit NetConnector(const InstanceHandle& instance); |
21 | 21 |
22 int32_t ConnectTcp(const char* host, | 22 int32_t ConnectTcp(const char* host, |
23 uint16_t port, | 23 uint16_t port, |
24 PP_FileHandle* socket_out, | 24 PP_FileHandle* socket_out, |
25 PP_NetAddress_Private* local_addr_out, | 25 PP_NetAddress_Private* local_addr_out, |
26 PP_NetAddress_Private* remote_addr_out, | 26 PP_NetAddress_Private* remote_addr_out, |
27 const CompletionCallback& cc); | 27 const CompletionCallback& cc); |
28 int32_t ConnectTcpAddress(const PP_NetAddress_Private* addr, | 28 int32_t ConnectTcpAddress(const PP_NetAddress_Private* addr, |
29 PP_FileHandle* socket_out, | 29 PP_FileHandle* socket_out, |
30 PP_NetAddress_Private* local_addr_out, | 30 PP_NetAddress_Private* local_addr_out, |
31 PP_NetAddress_Private* remote_addr_out, | 31 PP_NetAddress_Private* remote_addr_out, |
32 const CompletionCallback& cc); | 32 const CompletionCallback& cc); |
33 }; | 33 }; |
34 | 34 |
35 } // namespace flash | 35 } // namespace flash |
36 } // namespace pp | 36 } // namespace pp |
37 | 37 |
38 #endif // PPAPI_CPP_PRIVATE_FLASH_NET_CONNECTOR_H_ | 38 #endif // PPAPI_CPP_PRIVATE_FLASH_NET_CONNECTOR_H_ |
OLD | NEW |