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

Side by Side Diff: ppapi/c/private/ppb_flash_net_connector.h

Issue 8511032: Make the Pepper Flash net address just private, not Flash-specific. (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 #ifndef PPAPI_C_PRIVATE_PPB_FLASH_NET_CONNECTOR_H_ 5 #ifndef PPAPI_C_PRIVATE_PPB_FLASH_NET_CONNECTOR_H_
6 #define PPAPI_C_PRIVATE_PPB_FLASH_NET_CONNECTOR_H_ 6 #define PPAPI_C_PRIVATE_PPB_FLASH_NET_CONNECTOR_H_
7 7
8 // TODO(viettrungluu): Remove this interface; it's on life-support right now.
9
8 #include "ppapi/c/pp_bool.h" 10 #include "ppapi/c/pp_bool.h"
9 #include "ppapi/c/pp_instance.h" 11 #include "ppapi/c/pp_instance.h"
10 #include "ppapi/c/pp_resource.h" 12 #include "ppapi/c/pp_resource.h"
11 #include "ppapi/c/private/ppb_flash_file.h" // For |PP_FileHandle|. 13 #include "ppapi/c/private/ppb_flash_file.h" // For |PP_FileHandle|.
12 #include "ppapi/c/private/ppb_flash_tcp_socket.h" 14 #include "ppapi/c/private/ppb_net_address_private.h"
13 15
14 #define PPB_FLASH_NETCONNECTOR_INTERFACE "PPB_Flash_NetConnector;0.2" 16 #define PPB_FLASH_NETCONNECTOR_INTERFACE "PPB_Flash_NetConnector;0.2"
15 17
16 struct PPB_Flash_NetConnector { 18 struct PPB_Flash_NetConnector {
17 PP_Resource (*Create)(PP_Instance instance_id); 19 PP_Resource (*Create)(PP_Instance instance_id);
18 PP_Bool (*IsFlashNetConnector)(PP_Resource resource_id); 20 PP_Bool (*IsFlashNetConnector)(PP_Resource resource_id);
19 21
20 // Connect to a TCP port given as a host-port pair. The local and remote 22 // Connect to a TCP port given as a host-port pair. The local and remote
21 // addresses of the connection (if successful) are returned in 23 // addresses of the connection (if successful) are returned in
22 // |local_addr_out| and |remote_addr_out|, respectively, if non-null. 24 // |local_addr_out| and |remote_addr_out|, respectively, if non-null.
23 int32_t (*ConnectTcp)(PP_Resource connector_id, 25 int32_t (*ConnectTcp)(PP_Resource connector_id,
24 const char* host, 26 const char* host,
25 uint16_t port, 27 uint16_t port,
26 PP_FileHandle* socket_out, 28 PP_FileHandle* socket_out,
27 struct PP_Flash_NetAddress* local_addr_out, 29 struct PP_NetAddress_Private* local_addr_out,
28 struct PP_Flash_NetAddress* remote_addr_out, 30 struct PP_NetAddress_Private* remote_addr_out,
29 struct PP_CompletionCallback callback); 31 struct PP_CompletionCallback callback);
30 32
31 // Same as |ConnectTcp()|, but connecting to the address given by |addr|. A 33 // Same as |ConnectTcp()|, but connecting to the address given by |addr|. A
32 // typical use-case would be for reconnections. 34 // typical use-case would be for reconnections.
33 int32_t (*ConnectTcpAddress)(PP_Resource connector_id, 35 int32_t (*ConnectTcpAddress)(PP_Resource connector_id,
34 const struct PP_Flash_NetAddress* addr, 36 const struct PP_NetAddress_Private* addr,
35 PP_FileHandle* socket_out, 37 PP_FileHandle* socket_out,
36 struct PP_Flash_NetAddress* local_addr_out, 38 struct PP_NetAddress_Private* local_addr_out,
37 struct PP_Flash_NetAddress* remote_addr_out, 39 struct PP_NetAddress_Private* remote_addr_out,
38 struct PP_CompletionCallback callback); 40 struct PP_CompletionCallback callback);
39 }; 41 };
40 42
41 #endif // PPAPI_C_PRIVATE_PPB_FLASH_NET_CONNECTOR_H_ 43 #endif // PPAPI_C_PRIVATE_PPB_FLASH_NET_CONNECTOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698