1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/ipc/glue/Transport_win.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,50 @@ 1.4 +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- 1.5 + * vim: sw=2 ts=8 et : 1.6 + */ 1.7 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.8 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.9 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.10 + 1.11 +#ifndef mozilla_ipc_Transport_win_h 1.12 +#define mozilla_ipc_Transport_win_h 1 1.13 + 1.14 +#include <string> 1.15 + 1.16 +#include "ipc/IPCMessageUtils.h" 1.17 + 1.18 + 1.19 +namespace mozilla { 1.20 +namespace ipc { 1.21 + 1.22 +struct TransportDescriptor 1.23 +{ 1.24 + std::wstring mPipeName; 1.25 + HANDLE mServerPipe; 1.26 +}; 1.27 + 1.28 +} // namespace ipc 1.29 +} // namespace mozilla 1.30 + 1.31 + 1.32 +namespace IPC { 1.33 + 1.34 +template<> 1.35 +struct ParamTraits<mozilla::ipc::TransportDescriptor> 1.36 +{ 1.37 + typedef mozilla::ipc::TransportDescriptor paramType; 1.38 + static void Write(Message* aMsg, const paramType& aParam) 1.39 + { 1.40 + WriteParam(aMsg, aParam.mPipeName); 1.41 + WriteParam(aMsg, aParam.mServerPipe); 1.42 + } 1.43 + static bool Read(const Message* aMsg, void** aIter, paramType* aResult) 1.44 + { 1.45 + return (ReadParam(aMsg, aIter, &aResult->mPipeName) && 1.46 + ReadParam(aMsg, aIter, &aResult->mServerPipe)); 1.47 + } 1.48 +}; 1.49 + 1.50 +} // namespace IPC 1.51 + 1.52 + 1.53 +#endif // mozilla_ipc_Transport_win_h