1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef mozilla_ipc_Transport_posix_h
8 #define mozilla_ipc_Transport_posix_h 1
10 #include "ipc/IPCMessageUtils.h"
15 struct TransportDescriptor
{
20 } // namespace mozilla
25 struct ParamTraits
<mozilla::ipc::TransportDescriptor
> {
26 typedef mozilla::ipc::TransportDescriptor paramType
;
27 static void Write(Message
* aMsg
, const paramType
& aParam
) {
28 WriteParam(aMsg
, mozilla::UniqueFileHandle
{aParam
.mFd
});
30 static bool Read(const Message
* aMsg
, PickleIterator
* aIter
,
32 mozilla::UniqueFileHandle fd
;
33 if (!ReadParam(aMsg
, aIter
, &fd
)) {
36 aResult
->mFd
= fd
.release();
43 #endif // mozilla_ipc_Transport_posix_h