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

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

Issue 6578007: PPB_Flash cleanup part 1: move the net connector stuff to its own files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/ppapi/proxy
Patch Set: merged ToT Created 9 years, 10 months 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
« no previous file with comments | « ppapi/c/private/ppb_flash.h ('k') | ppapi/cpp/private/flash_net_connector.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef PPAPI_C_PRIVATE_PPB_FLASH_NET_CONNECTOR_H_
6 #define PPAPI_C_PRIVATE_PPB_FLASH_NET_CONNECTOR_H_
7
8 #include "ppapi/c/pp_bool.h"
9 #include "ppapi/c/pp_instance.h"
10 #include "ppapi/c/pp_resource.h"
11 #include "ppapi/c/private/ppb_flash.h" // For |PP_FileHandle|.
12
13 #define PPB_FLASH_NETCONNECTOR_INTERFACE "PPB_Flash_NetConnector;1"
14
15 // This is an opaque type holding a network address.
16 struct PP_Flash_NetAddress {
17 size_t size;
18 char data[128];
19 };
20
21 struct PPB_Flash_NetConnector {
22 PP_Resource (*Create)(PP_Instance instance_id);
23 PP_Bool (*IsFlashNetConnector)(PP_Resource resource_id);
24
25 // Connect to a TCP port given as a host-port pair. The local and remote
26 // addresses of the connection (if successful) are returned in
27 // |local_addr_out| and |remote_addr_out|, respectively, if non-null.
28 int32_t (*ConnectTcp)(PP_Resource connector_id,
29 const char* host,
30 uint16_t port,
31 PP_FileHandle* socket_out,
32 struct PP_Flash_NetAddress* local_addr_out,
33 struct PP_Flash_NetAddress* remote_addr_out,
34 struct PP_CompletionCallback callback);
35
36 // Same as |ConnectTcp()|, but connecting to the address given by |addr|. A
37 // typical use-case would be for reconnections.
38 int32_t (*ConnectTcpAddress)(PP_Resource connector_id,
39 const struct PP_Flash_NetAddress* addr,
40 PP_FileHandle* socket_out,
41 struct PP_Flash_NetAddress* local_addr_out,
42 struct PP_Flash_NetAddress* remote_addr_out,
43 struct PP_CompletionCallback callback);
44 };
45
46 #endif // PPAPI_C_PRIVATE_PPB_FLASH_NET_CONNECTOR_H_
OLDNEW
« no previous file with comments | « ppapi/c/private/ppb_flash.h ('k') | ppapi/cpp/private/flash_net_connector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698