Fix iOS build for XCode 4.6.
[chromium-blink-merge.git] / ppapi / proxy / ppb_tcp_server_socket_private_proxy.h
blobe2e644f042aedc140b13db4862ae36a094b12d9c
1 // Copyright (c) 2012 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.
5 #ifndef PPAPI_PROXY_PPB_TCP_SERVER_SOCKET_PRIVATE_PROXY_H_
6 #define PPAPI_PROXY_PPB_TCP_SERVER_SOCKET_PRIVATE_PROXY_H_
8 #include <map>
9 #include <string>
11 #include "base/basictypes.h"
12 #include "ppapi/c/pp_instance.h"
13 #include "ppapi/c/pp_resource.h"
14 #include "ppapi/c/private/ppb_net_address_private.h"
15 #include "ppapi/proxy/interface_proxy.h"
17 namespace ppapi {
19 class PPB_TCPServerSocket_Shared;
21 namespace proxy {
23 class PPB_TCPServerSocket_Private_Proxy : public InterfaceProxy {
24 public:
25 explicit PPB_TCPServerSocket_Private_Proxy(Dispatcher* dispatcher);
26 virtual ~PPB_TCPServerSocket_Private_Proxy();
28 static PP_Resource CreateProxyResource(PP_Instance instance);
30 void ObjectDestroyed(uint32 socket_id);
32 // InterfaceProxy implementation.
33 virtual bool OnMessageReceived(const IPC::Message& msg);
35 static const ApiID kApiID = API_ID_PPB_TCPSERVERSOCKET_PRIVATE;
37 private:
38 typedef std::map<uint32, PPB_TCPServerSocket_Shared*>
39 IDToServerSocketMap;
41 void OnMsgListenACK(uint32 plugin_dispatcher_id,
42 PP_Resource socket_resource,
43 uint32 socket_id,
44 int32_t status);
45 void OnMsgAcceptACK(uint32 plugin_dispatcher_id,
46 uint32 server_socket_id,
47 uint32 accepted_socket_id,
48 const PP_NetAddress_Private& local_addr,
49 const PP_NetAddress_Private& remote_addr);
51 IDToServerSocketMap id_to_server_socket_;
53 DISALLOW_COPY_AND_ASSIGN(PPB_TCPServerSocket_Private_Proxy);
56 } // namespace proxy
57 } // namespace ppapi
59 #endif // PPAPI_PROXY_PPB_TCP_SERVER_SOCKET_PRIVATE_PROXY_H_