| 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 // TODO(viettrungluu): This (and the .cc file) contain C++ wrappers for some | 5 // TODO(viettrungluu): This (and the .cc file) contain C++ wrappers for things |
| 6 // things in ppapi/c/private/ppb_flash.h. This is currently not used in (or even | 6 // in ppapi/c/private/ppb_flash_net_connector.h. This is currently not used in |
| 7 // compiled with) Chromium. | 7 // (or even compiled with) Chromium. |
| 8 | 8 |
| 9 #ifndef PPAPI_CPP_PRIVATE_FLASH_H_ | 9 #ifndef PPAPI_CPP_PRIVATE_FLASH_NET_CONNECTOR_H_ |
| 10 #define PPAPI_CPP_PRIVATE_FLASH_H_ | 10 #define PPAPI_CPP_PRIVATE_FLASH_NET_CONNECTOR_H_ |
| 11 | 11 |
| 12 #include "ppapi/c/private/ppb_flash.h" | 12 #include "ppapi/c/private/ppb_flash_net_connector.h" |
| 13 #include "ppapi/cpp/resource.h" | 13 #include "ppapi/cpp/resource.h" |
| 14 | 14 |
| 15 namespace pp { | 15 namespace pp { |
| 16 | 16 |
| 17 class CompletionCallback; | 17 class CompletionCallback; |
| 18 class Instance; | 18 class Instance; |
| 19 | 19 |
| 20 namespace flash { | 20 namespace flash { |
| 21 | 21 |
| 22 class NetConnector : public Resource { | 22 class NetConnector : public Resource { |
| 23 public: | 23 public: |
| 24 explicit NetConnector(const Instance& instance); | 24 explicit NetConnector(const Instance& instance); |
| 25 | 25 |
| 26 int32_t ConnectTcp(const char* host, | 26 int32_t ConnectTcp(const char* host, |
| 27 uint16_t port, | 27 uint16_t port, |
| 28 PP_FileHandle* socket_out, | 28 PP_FileHandle* socket_out, |
| 29 PP_Flash_NetAddress* local_addr_out, | 29 PP_Flash_NetAddress* local_addr_out, |
| 30 PP_Flash_NetAddress* remote_addr_out, | 30 PP_Flash_NetAddress* remote_addr_out, |
| 31 const CompletionCallback& cc); | 31 const CompletionCallback& cc); |
| 32 int32_t ConnectTcpAddress(const PP_Flash_NetAddress* addr, | 32 int32_t ConnectTcpAddress(const PP_Flash_NetAddress* addr, |
| 33 PP_FileHandle* socket_out, | 33 PP_FileHandle* socket_out, |
| 34 PP_Flash_NetAddress* local_addr_out, | 34 PP_Flash_NetAddress* local_addr_out, |
| 35 PP_Flash_NetAddress* remote_addr_out, | 35 PP_Flash_NetAddress* remote_addr_out, |
| 36 const CompletionCallback& cc); | 36 const CompletionCallback& cc); |
| 37 }; | 37 }; |
| 38 | 38 |
| 39 } // namespace flash | 39 } // namespace flash |
| 40 } // namespace pp | 40 } // namespace pp |
| 41 | 41 |
| 42 #endif // PPAPI_CPP_PRIVATE_FLASH_H_ | 42 #endif // PPAPI_CPP_PRIVATE_FLASH_NET_CONNECTOR_H_ |
| OLD | NEW |