Index: ppapi/native_client/src/shared/ppapi_proxy/browser_ppb_net_address_private_rpc_server.cc |
=================================================================== |
--- ppapi/native_client/src/shared/ppapi_proxy/browser_ppb_net_address_private_rpc_server.cc (revision 119128) |
+++ ppapi/native_client/src/shared/ppapi_proxy/browser_ppb_net_address_private_rpc_server.cc (working copy) |
@@ -177,3 +177,76 @@ |
rpc->result = NACL_SRPC_RESULT_OK; |
} |
+ |
+void PpbNetAddressPrivateRpcServer::PPB_NetAddress_Private_GetFamily( |
+ NaClSrpcRpc* rpc, |
+ NaClSrpcClosure* done, |
+ // input |
+ nacl_abi_size_t addr_bytes, char* addr, |
+ // output |
+ int32_t* addr_family) { |
+ NaClSrpcClosureRunner runner(done); |
+ rpc->result = NACL_SRPC_RESULT_APP_ERROR; |
+ |
+ if (addr_bytes != |
+ static_cast<nacl_abi_size_t>(sizeof(PP_NetAddress_Private))) { |
+ return; |
+ } |
+ |
+ *addr_family = PPBNetAddressPrivateInterface()->GetFamily( |
+ reinterpret_cast<PP_NetAddress_Private*>(addr)); |
+ |
+ DebugPrintf("PPB_NetAddress_Private::GetFamily\n"); |
+ |
+ rpc->result = NACL_SRPC_RESULT_OK; |
+} |
+ |
+void PpbNetAddressPrivateRpcServer::PPB_NetAddress_Private_GetPort( |
+ NaClSrpcRpc* rpc, |
+ NaClSrpcClosure* done, |
+ // input |
+ nacl_abi_size_t addr_bytes, char* addr, |
+ // output |
+ int32_t* port) { |
+ NaClSrpcClosureRunner runner(done); |
+ rpc->result = NACL_SRPC_RESULT_APP_ERROR; |
+ |
+ if (addr_bytes != |
+ static_cast<nacl_abi_size_t>(sizeof(PP_NetAddress_Private))) { |
+ return; |
+ } |
+ |
+ *port = PPBNetAddressPrivateInterface()->GetPort( |
+ reinterpret_cast<PP_NetAddress_Private*>(addr)); |
+ |
+ DebugPrintf("PPB_NetAddress_Private::Port\n"); |
+ |
+ rpc->result = NACL_SRPC_RESULT_OK; |
+} |
+ |
+void PpbNetAddressPrivateRpcServer::PPB_NetAddress_Private_GetAddress( |
+ NaClSrpcRpc* rpc, |
+ NaClSrpcClosure* done, |
+ // input |
+ nacl_abi_size_t addr_bytes, char* addr, |
+ // output |
+ nacl_abi_size_t* address_bytes, char* address) { |
+ NaClSrpcClosureRunner runner(done); |
+ rpc->result = NACL_SRPC_RESULT_APP_ERROR; |
+ |
+ if (addr_bytes != |
+ static_cast<nacl_abi_size_t>(sizeof(PP_NetAddress_Private))) { |
+ return; |
+ } |
+ |
+ DebugPrintf("PPB_NetAddress_Private::GetAddress"); |
+ |
+ if (!PPBNetAddressPrivateInterface()->GetAddress( |
+ reinterpret_cast<PP_NetAddress_Private*>(addr), |
+ address, |
+ static_cast<uint16_t>(*address_bytes))) |
+ return; |
+ |
+ rpc->result = NACL_SRPC_RESULT_OK; |
+} |
+ |