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_UDP_SOCKET_H_ | 5 #ifndef PPAPI_CPP_PRIVATE_FLASH_UDP_SOCKET_H_ |
6 #define PPAPI_CPP_PRIVATE_FLASH_UDP_SOCKET_H_ | 6 #define PPAPI_CPP_PRIVATE_FLASH_UDP_SOCKET_H_ |
7 | 7 |
8 #include "ppapi/c/pp_stdint.h" | 8 #include "ppapi/c/pp_stdint.h" |
9 #include "ppapi/c/private/ppb_flash_udp_socket.h" | 9 #include "ppapi/c/private/ppb_flash_udp_socket.h" |
10 #include "ppapi/cpp/resource.h" | 10 #include "ppapi/cpp/resource.h" |
11 | 11 |
12 namespace pp { | 12 namespace pp { |
13 | 13 |
14 class CompletionCallback; | 14 class CompletionCallback; |
15 class Instance; | 15 class Instance; |
16 | 16 |
17 namespace flash { | 17 namespace flash { |
18 | 18 |
19 class UDPSocket : public Resource { | 19 class UDPSocket : public Resource { |
20 public: | 20 public: |
21 explicit UDPSocket(Instance* instance); | 21 explicit UDPSocket(Instance* instance); |
22 | 22 |
23 int32_t Bind(const PP_Flash_NetAddress* addr, | 23 int32_t Bind(const PP_NetAddress_Private* addr, |
24 const CompletionCallback& callback); | 24 const CompletionCallback& callback); |
25 int32_t RecvFrom(char* buffer, | 25 int32_t RecvFrom(char* buffer, |
26 int32_t num_bytes, | 26 int32_t num_bytes, |
27 const CompletionCallback& callback); | 27 const CompletionCallback& callback); |
28 bool GetRecvFromAddress(PP_Flash_NetAddress* addr); | 28 bool GetRecvFromAddress(PP_NetAddress_Private* addr); |
29 int32_t SendTo(const char* buffer, | 29 int32_t SendTo(const char* buffer, |
30 int32_t num_bytes, | 30 int32_t num_bytes, |
31 const PP_Flash_NetAddress* addr, | 31 const PP_NetAddress_Private* addr, |
32 const CompletionCallback& callback); | 32 const CompletionCallback& callback); |
33 void Close(); | 33 void Close(); |
34 }; | 34 }; |
35 | 35 |
36 } // namespace flash | 36 } // namespace flash |
37 } // namespace pp | 37 } // namespace pp |
38 | 38 |
39 #endif // PPAPI_CPP_PRIVATE_FLASH_UDP_SOCKET_H_ | 39 #endif // PPAPI_CPP_PRIVATE_FLASH_UDP_SOCKET_H_ |
40 | 40 |
OLD | NEW |